mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge trift2.:/MySQL/M51/mysql-5.1
into trift2.:/MySQL/M51/push-5.1 configure.in: Auto merged mysql-test/t/disabled.def: Auto merged sql/field.cc: Auto merged sql/log_event.cc: Auto merged sql/log_event.h: Auto merged sql/rpl_record.cc: Auto merged sql/rpl_utility.cc: Auto merged sql/rpl_utility.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_cache.cc: Auto merged
This commit is contained in:
47
mysql-test/suite/im/r/im_cmd_line.result
Normal file
47
mysql-test/suite/im/r/im_cmd_line.result
Normal file
@ -0,0 +1,47 @@
|
||||
SHOW VARIABLES LIKE 'server_id';
|
||||
Variable_name Value
|
||||
server_id 1
|
||||
SHOW INSTANCES;
|
||||
instance_name state
|
||||
mysqld1 XXXXX
|
||||
mysqld2 offline
|
||||
--> Listing users...
|
||||
im_admin
|
||||
|
||||
==> Adding user 'testuser'...
|
||||
|
||||
--> IM password file:
|
||||
testuser:*0D3CED9BEC10A777AEC23CCC353A8C08A633045E
|
||||
im_admin:*598D51AD2DFF7792045D6DF3DDF9AA1AF737B295
|
||||
--> EOF
|
||||
|
||||
--> Printing out line for 'testuser'...
|
||||
testuser:*0D3CED9BEC10A777AEC23CCC353A8C08A633045E
|
||||
|
||||
--> Listing users...
|
||||
im_admin
|
||||
testuser
|
||||
|
||||
==> Changing the password of 'testuser'...
|
||||
|
||||
--> IM password file:
|
||||
im_admin:*598D51AD2DFF7792045D6DF3DDF9AA1AF737B295
|
||||
testuser:*39C549BDECFBA8AFC3CE6B948C9359A0ECE08DE2
|
||||
--> EOF
|
||||
|
||||
--> Printing out line for 'testuser'...
|
||||
testuser:*39C549BDECFBA8AFC3CE6B948C9359A0ECE08DE2
|
||||
|
||||
--> Listing users...
|
||||
testuser
|
||||
im_admin
|
||||
|
||||
==> Dropping user 'testuser'...
|
||||
|
||||
--> IM password file:
|
||||
im_admin:*598D51AD2DFF7792045D6DF3DDF9AA1AF737B295
|
||||
--> EOF
|
||||
|
||||
--> Listing users...
|
||||
im_admin
|
||||
|
26
mysql-test/suite/im/r/im_daemon_life_cycle.result
Normal file
26
mysql-test/suite/im/r/im_daemon_life_cycle.result
Normal file
@ -0,0 +1,26 @@
|
||||
SHOW VARIABLES LIKE 'server_id';
|
||||
Variable_name Value
|
||||
server_id 1
|
||||
SHOW INSTANCES;
|
||||
instance_name state
|
||||
mysqld1 XXXXX
|
||||
mysqld2 offline
|
||||
Killing the process...
|
||||
Waiting...
|
||||
Success: the process was restarted.
|
||||
Success: server is ready to accept connection on socket.
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- Test for BUG#12751
|
||||
--------------------------------------------------------------------
|
||||
START INSTANCE mysqld2;
|
||||
Success: the process has been started.
|
||||
Killing the process...
|
||||
Waiting...
|
||||
Success: the process was restarted.
|
||||
Success: server is ready to accept connection on socket.
|
||||
SHOW INSTANCE STATUS mysqld1;
|
||||
instance_name state version_number version mysqld_compatible
|
||||
mysqld1 STATE VERSION_NUMBER VERSION no
|
||||
STOP INSTANCE mysqld2;
|
||||
Success: the process has been stopped.
|
225
mysql-test/suite/im/r/im_instance_conf.result
Normal file
225
mysql-test/suite/im/r/im_instance_conf.result
Normal file
@ -0,0 +1,225 @@
|
||||
SHOW VARIABLES LIKE 'server_id';
|
||||
Variable_name Value
|
||||
server_id 1
|
||||
SHOW INSTANCES;
|
||||
instance_name state
|
||||
mysqld1 XXXXX
|
||||
mysqld2 offline
|
||||
--------------------------------------------------------------------
|
||||
server_id = 1
|
||||
server_id = 2
|
||||
--------------------------------------------------------------------
|
||||
CREATE INSTANCE mysqld3
|
||||
server_id = 3,
|
||||
socket = "$MYSQL_TMP_DIR/mysqld_3.sock";
|
||||
SHOW INSTANCES;
|
||||
instance_name state
|
||||
mysqld3 offline
|
||||
mysqld2 offline
|
||||
mysqld1 online
|
||||
--------------------------------------------------------------------
|
||||
server_id = 1
|
||||
server_id = 2
|
||||
server_id=3
|
||||
--------------------------------------------------------------------
|
||||
CREATE INSTANCE mysqld1;
|
||||
ERROR HY000: Instance already exists
|
||||
CREATE INSTANCE mysqld2;
|
||||
ERROR HY000: Instance already exists
|
||||
CREATE INSTANCE mysqld3;
|
||||
ERROR HY000: Instance already exists
|
||||
--------------------------------------------------------------------
|
||||
nonguarded
|
||||
--------------------------------------------------------------------
|
||||
CREATE INSTANCE mysqld4
|
||||
nonguarded,
|
||||
server_id = 4,
|
||||
socket = "$MYSQL_TMP_DIR/mysqld_4.sock";
|
||||
SHOW INSTANCES;
|
||||
instance_name state
|
||||
mysqld3 offline
|
||||
mysqld4 offline
|
||||
mysqld1 online
|
||||
mysqld2 offline
|
||||
--------------------------------------------------------------------
|
||||
nonguarded
|
||||
nonguarded
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
CREATE INSTANCE mysqld5
|
||||
test-A = 000,
|
||||
test-B = test,
|
||||
server_id = 5,
|
||||
socket = "$MYSQL_TMP_DIR/mysqld_5.sock";
|
||||
SHOW INSTANCES;
|
||||
instance_name state
|
||||
mysqld1 online
|
||||
mysqld4 offline
|
||||
mysqld5 offline
|
||||
mysqld2 offline
|
||||
mysqld3 offline
|
||||
--------------------------------------------------------------------
|
||||
test-A=000
|
||||
--------------------------------------------------------------------
|
||||
test-B=test
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
CREATE INSTANCE mysqld6
|
||||
test-C1 = 10 ,
|
||||
test-C2 = 02 ,
|
||||
server_id = 6,
|
||||
socket = "$MYSQL_TMP_DIR/mysqld_6.sock";
|
||||
SHOW INSTANCES;
|
||||
instance_name state
|
||||
mysqld1 online
|
||||
mysqld2 offline
|
||||
mysqld5 offline
|
||||
mysqld6 offline
|
||||
mysqld3 offline
|
||||
mysqld4 offline
|
||||
--------------------------------------------------------------------
|
||||
test-C1=10
|
||||
--------------------------------------------------------------------
|
||||
test-C2=02
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
CREATE INSTANCE mysqld7 test-D = test-D-value ;
|
||||
ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use
|
||||
SHOW INSTANCES;
|
||||
instance_name state
|
||||
mysqld1 online
|
||||
mysqld2 offline
|
||||
mysqld5 offline
|
||||
mysqld6 offline
|
||||
mysqld3 offline
|
||||
mysqld4 offline
|
||||
CREATE INSTANCE mysqld8 test-E 0 ;
|
||||
ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use
|
||||
SHOW INSTANCES;
|
||||
instance_name state
|
||||
mysqld1 online
|
||||
mysqld2 offline
|
||||
mysqld5 offline
|
||||
mysqld6 offline
|
||||
mysqld3 offline
|
||||
mysqld4 offline
|
||||
CREATE INSTANCE mysqld8 test-F = ;
|
||||
ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use
|
||||
SHOW INSTANCES;
|
||||
instance_name state
|
||||
mysqld1 online
|
||||
mysqld2 offline
|
||||
mysqld5 offline
|
||||
mysqld6 offline
|
||||
mysqld3 offline
|
||||
mysqld4 offline
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
CREATE INSTANCE mysqld9
|
||||
test-1=" hello world ",
|
||||
test-2=' ',
|
||||
server_id = 9,
|
||||
socket = "$MYSQL_TMP_DIR/mysqld_9.sock";
|
||||
SHOW INSTANCES;
|
||||
instance_name state
|
||||
mysqld1 online
|
||||
mysqld2 offline
|
||||
mysqld5 offline
|
||||
mysqld6 offline
|
||||
mysqld3 offline
|
||||
mysqld4 offline
|
||||
mysqld9 offline
|
||||
CREATE INSTANCE mysqld10
|
||||
test-3='\b\babc\sdef',
|
||||
server_id = 10,
|
||||
socket = "$MYSQL_TMP_DIR/mysqld_10.sock";
|
||||
SHOW INSTANCES;
|
||||
instance_name state
|
||||
mysqld1 online
|
||||
mysqld9 offline
|
||||
mysqld5 offline
|
||||
mysqld6 offline
|
||||
mysqld3 offline
|
||||
mysqld4 offline
|
||||
mysqld10 offline
|
||||
mysqld2 offline
|
||||
CREATE INSTANCE mysqld11
|
||||
test-4='abc\tdef',
|
||||
test-5='abc\ndef',
|
||||
server_id = 11,
|
||||
socket = "$MYSQL_TMP_DIR/mysqld_11.sock";
|
||||
SHOW INSTANCES;
|
||||
instance_name state
|
||||
mysqld1 online
|
||||
mysqld11 offline
|
||||
mysqld5 offline
|
||||
mysqld6 offline
|
||||
mysqld3 offline
|
||||
mysqld4 offline
|
||||
mysqld10 offline
|
||||
mysqld2 offline
|
||||
mysqld9 offline
|
||||
CREATE INSTANCE mysqld12
|
||||
test-6="abc\rdef",
|
||||
test-7="abc\\def",
|
||||
server_id = 12,
|
||||
socket = "$MYSQL_TMP_DIR/mysqld_12.sock";
|
||||
SHOW INSTANCES;
|
||||
instance_name state
|
||||
mysqld1 online
|
||||
mysqld9 offline
|
||||
mysqld5 offline
|
||||
mysqld6 offline
|
||||
mysqld3 offline
|
||||
mysqld4 offline
|
||||
mysqld10 offline
|
||||
mysqld2 offline
|
||||
mysqld12 offline
|
||||
mysqld11 offline
|
||||
CREATE INSTANCE mysqld13 test-bad=' \ ';
|
||||
ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use
|
||||
SHOW INSTANCES;
|
||||
instance_name state
|
||||
mysqld1 online
|
||||
mysqld9 offline
|
||||
mysqld5 offline
|
||||
mysqld6 offline
|
||||
mysqld3 offline
|
||||
mysqld4 offline
|
||||
mysqld10 offline
|
||||
mysqld2 offline
|
||||
mysqld12 offline
|
||||
mysqld11 offline
|
||||
--------------------------------------------------------------------
|
||||
test-1= hello world
|
||||
--------------------------------------------------------------------
|
||||
test-2=
|
||||
--------------------------------------------------------------------
|
||||
test-3=abc def
|
||||
--------------------------------------------------------------------
|
||||
test-4=abc def
|
||||
--------------------------------------------------------------------
|
||||
test-5=abc
|
||||
--------------------------------------------------------------------
|
||||
test-6=abc
|
||||
def
|
||||
--------------------------------------------------------------------
|
||||
test-7=abc\def
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
CREATE INSTANCE qqq1;
|
73
mysql-test/suite/im/r/im_life_cycle.result
Normal file
73
mysql-test/suite/im/r/im_life_cycle.result
Normal file
@ -0,0 +1,73 @@
|
||||
SHOW VARIABLES LIKE 'server_id';
|
||||
Variable_name Value
|
||||
server_id 1
|
||||
SHOW INSTANCES;
|
||||
instance_name state
|
||||
mysqld1 XXXXX
|
||||
mysqld2 offline
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- 1.1.2.
|
||||
--------------------------------------------------------------------
|
||||
START INSTANCE mysqld2;
|
||||
Success: the process has been started.
|
||||
SHOW VARIABLES LIKE 'port';
|
||||
Variable_name Value
|
||||
port IM_MYSQLD2_PORT
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- 1.1.3.
|
||||
--------------------------------------------------------------------
|
||||
STOP INSTANCE mysqld2;
|
||||
Success: the process has been stopped.
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- 1.1.4.
|
||||
--------------------------------------------------------------------
|
||||
START INSTANCE mysqld3;
|
||||
ERROR HY000: Unknown instance name
|
||||
START INSTANCE mysqld1;
|
||||
ERROR HY000: The instance is already started
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- 1.1.5.
|
||||
--------------------------------------------------------------------
|
||||
STOP INSTANCE mysqld3;
|
||||
ERROR HY000: Unknown instance name
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- 1.1.6.
|
||||
--------------------------------------------------------------------
|
||||
Killing the process...
|
||||
Waiting...
|
||||
Success: the process was restarted.
|
||||
SHOW INSTANCES;
|
||||
instance_name state
|
||||
mysqld1 online
|
||||
mysqld2 offline
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- 1.1.7.
|
||||
--------------------------------------------------------------------
|
||||
START INSTANCE mysqld2;
|
||||
Success: the process has been started.
|
||||
Killing the process...
|
||||
Waiting...
|
||||
Success: the process was killed.
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- 1.1.8.
|
||||
--------------------------------------------------------------------
|
||||
SHOW INSTANCE STATUS;
|
||||
ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- BUG#12813
|
||||
--------------------------------------------------------------------
|
||||
START INSTANCE mysqld1,mysqld2,mysqld3;
|
||||
ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use
|
||||
STOP INSTANCE mysqld1,mysqld2,mysqld3;
|
||||
ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use
|
||||
STOP INSTANCE mysqld2;
|
||||
ERROR HY000: Cannot stop instance. Perhaps the instance is not started, or was started manually, so IM cannot find the pidfile.
|
||||
End of 5.0 tests
|
151
mysql-test/suite/im/r/im_options.result
Normal file
151
mysql-test/suite/im/r/im_options.result
Normal file
@ -0,0 +1,151 @@
|
||||
SHOW VARIABLES LIKE 'server_id';
|
||||
Variable_name Value
|
||||
server_id 1
|
||||
SHOW INSTANCES;
|
||||
instance_name state
|
||||
mysqld1 XXXXX
|
||||
mysqld2 offline
|
||||
UNSET mysqld1.server_id;
|
||||
ERROR HY000: The instance is active. Stop the instance first
|
||||
SET mysqld1.server_id = 11;
|
||||
ERROR HY000: The instance is active. Stop the instance first
|
||||
CREATE INSTANCE mysqld3
|
||||
datadir = '/',
|
||||
server_id = 3,
|
||||
socket = "$MYSQL_TMP_DIR/mysqld_3.sock";
|
||||
START INSTANCE mysqld3;
|
||||
UNSET mysqld3.server_id;
|
||||
ERROR HY000: The instance is active. Stop the instance first
|
||||
SET mysqld3.server_id = 11;
|
||||
ERROR HY000: The instance is active. Stop the instance first
|
||||
STOP INSTANCE mysqld3;
|
||||
SHOW INSTANCE STATUS mysqld3;
|
||||
instance_name state version_number version mysqld_compatible
|
||||
mysqld3 offline VERSION_NUMBER VERSION no
|
||||
UNSET mysqld2.server_id;
|
||||
UNSET mysqld2.server_id;
|
||||
SHOW INSTANCE OPTIONS mysqld2;
|
||||
option_name value
|
||||
instance_name option_value
|
||||
socket option_value
|
||||
pid-file option_value
|
||||
port option_value
|
||||
datadir option_value
|
||||
log option_value
|
||||
log-error option_value
|
||||
log-slow-queries option_value
|
||||
language option_value
|
||||
character-sets-dir option_value
|
||||
basedir option_value
|
||||
shutdown-delay option_value
|
||||
skip-stack-trace option_value
|
||||
loose-skip-innodb option_value
|
||||
loose-skip-ndbcluster option_value
|
||||
nonguarded option_value
|
||||
log-output option_value
|
||||
SET mysqld2.server_id = 2;
|
||||
SET mysqld2.server_id = 2;
|
||||
SHOW INSTANCE OPTIONS mysqld2;
|
||||
option_name value
|
||||
instance_name option_value
|
||||
socket option_value
|
||||
pid-file option_value
|
||||
port option_value
|
||||
datadir option_value
|
||||
log option_value
|
||||
log-error option_value
|
||||
log-slow-queries option_value
|
||||
language option_value
|
||||
character-sets-dir option_value
|
||||
basedir option_value
|
||||
shutdown-delay option_value
|
||||
skip-stack-trace option_value
|
||||
loose-skip-innodb option_value
|
||||
loose-skip-ndbcluster option_value
|
||||
nonguarded option_value
|
||||
log-output option_value
|
||||
server_id option_value
|
||||
UNSET mysqld2.server_id = 11;
|
||||
ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use
|
||||
SET mysqld2.aaa, mysqld3.bbb, mysqld2.ccc = 0010, mysqld3.ddd = 0020;
|
||||
--------------------------------------------------------------------
|
||||
aaa
|
||||
--------------------------------------------------------------------
|
||||
bbb
|
||||
--------------------------------------------------------------------
|
||||
ccc=0010
|
||||
--------------------------------------------------------------------
|
||||
ddd=0020
|
||||
--------------------------------------------------------------------
|
||||
UNSET mysqld2.aaa, mysqld3.bbb, mysqld2.ccc, mysqld3.ddd;
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
SET mysqld2.aaa, mysqld3.bbb, mysqld.ccc = 0010;
|
||||
ERROR HY000: Unknown instance name
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
SET mysqld2.aaa, mysqld3.bbb, mysqld1.ccc = 0010;
|
||||
ERROR HY000: The instance is active. Stop the instance first
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
UNSET mysqld2.server_id, mysqld3.server_id, mysqld.ccc;
|
||||
ERROR HY000: Unknown instance name
|
||||
--------------------------------------------------------------------
|
||||
server_id = 1
|
||||
server_id=2
|
||||
server_id=3
|
||||
--------------------------------------------------------------------
|
||||
UNSET mysqld2.server_id, mysqld3.server_id, mysqld1.ccc;
|
||||
ERROR HY000: The instance is active. Stop the instance first
|
||||
--------------------------------------------------------------------
|
||||
server_id = 1
|
||||
server_id=2
|
||||
server_id=3
|
||||
--------------------------------------------------------------------
|
||||
DROP INSTANCE mysqld3;
|
||||
SET mysqld2.server_id=222;
|
||||
SET mysqld2.server_id = 222;
|
||||
SET mysqld2.server_id = 222 ;
|
||||
SET mysqld2 . server_id = 222 ;
|
||||
SET mysqld2 . server_id = 222 , mysqld2 . aaa , mysqld2 . bbb ;
|
||||
--------------------------------------------------------------------
|
||||
server_id = 1
|
||||
server_id=222
|
||||
--------------------------------------------------------------------
|
||||
aaa
|
||||
--------------------------------------------------------------------
|
||||
bbb
|
||||
--------------------------------------------------------------------
|
||||
UNSET mysqld2 . aaa , mysqld2 . bbb ;
|
||||
--------------------------------------------------------------------
|
||||
server_id = 1
|
||||
server_id=222
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
server_id = 1
|
||||
server_id=222
|
||||
--------------------------------------------------------------------
|
||||
SHOW VARIABLES LIKE 'server_id';
|
||||
Variable_name Value
|
||||
server_id 1
|
||||
SHOW INSTANCES;
|
||||
instance_name state
|
||||
mysqld1 online
|
||||
mysqld2 offline
|
||||
FLUSH INSTANCES;
|
||||
ERROR HY000: At least one instance is active. Stop all instances first
|
||||
STOP INSTANCE mysqld1;
|
||||
SHOW INSTANCES;
|
||||
instance_name state
|
||||
mysqld1 offline
|
||||
mysqld2 offline
|
||||
FLUSH INSTANCES;
|
96
mysql-test/suite/im/r/im_utils.result
Normal file
96
mysql-test/suite/im/r/im_utils.result
Normal file
@ -0,0 +1,96 @@
|
||||
SHOW VARIABLES LIKE 'server_id';
|
||||
Variable_name Value
|
||||
server_id 1
|
||||
SHOW INSTANCES;
|
||||
instance_name state
|
||||
mysqld1 XXXXX
|
||||
mysqld2 offline
|
||||
SHOW INSTANCE OPTIONS mysqld1;
|
||||
option_name value
|
||||
instance_name VALUE
|
||||
socket VALUE
|
||||
pid-file VALUE
|
||||
port VALUE
|
||||
datadir VALUE
|
||||
log VALUE
|
||||
log-error VALUE
|
||||
log-slow-queries VALUE
|
||||
language VALUE
|
||||
character-sets-dir VALUE
|
||||
basedir VALUE
|
||||
server_id VALUE
|
||||
shutdown-delay VALUE
|
||||
skip-stack-trace VALUE
|
||||
loose-skip-innodb VALUE
|
||||
loose-skip-ndbcluster VALUE
|
||||
log-output VALUE
|
||||
SHOW INSTANCE OPTIONS mysqld2;
|
||||
option_name value
|
||||
instance_name VALUE
|
||||
socket VALUE
|
||||
pid-file VALUE
|
||||
port VALUE
|
||||
datadir VALUE
|
||||
log VALUE
|
||||
log-error VALUE
|
||||
log-slow-queries VALUE
|
||||
language VALUE
|
||||
character-sets-dir VALUE
|
||||
basedir VALUE
|
||||
server_id VALUE
|
||||
shutdown-delay VALUE
|
||||
skip-stack-trace VALUE
|
||||
loose-skip-innodb VALUE
|
||||
loose-skip-ndbcluster VALUE
|
||||
nonguarded VALUE
|
||||
log-output VALUE
|
||||
START INSTANCE mysqld2;
|
||||
Success: the process has been started.
|
||||
STOP INSTANCE mysqld2;
|
||||
Success: the process has been stopped.
|
||||
SHOW mysqld1 LOG FILES;
|
||||
Logfile Path File size
|
||||
ERROR LOG PATH FILE_SIZE
|
||||
GENERAL LOG PATH FILE_SIZE
|
||||
SLOW LOG PATH FILE_SIZE
|
||||
SHOW mysqld2 LOG FILES;
|
||||
Logfile Path File size
|
||||
ERROR LOG PATH FILE_SIZE
|
||||
GENERAL LOG PATH FILE_SIZE
|
||||
SLOW LOG PATH FILE_SIZE
|
||||
SHOW mysqld1 LOG ERROR 10;
|
||||
Log
|
||||
LOG_DATA
|
||||
SHOW mysqld1 LOG SLOW 10;
|
||||
Log
|
||||
LOG_DATA
|
||||
SHOW mysqld1 LOG GENERAL 10;
|
||||
Log
|
||||
LOG_DATA
|
||||
SHOW mysqld1 LOG ERROR 10, 2;
|
||||
Log
|
||||
LOG_DATA
|
||||
SHOW mysqld1 LOG SLOW 10, 2;
|
||||
Log
|
||||
LOG_DATA
|
||||
SHOW mysqld1 LOG GENERAL 10, 2;
|
||||
Log
|
||||
LOG_DATA
|
||||
SHOW mysqld2 LOG ERROR 10;
|
||||
Log
|
||||
LOG_DATA
|
||||
SHOW mysqld2 LOG SLOW 10;
|
||||
Log
|
||||
LOG_DATA
|
||||
SHOW mysqld2 LOG GENERAL 10;
|
||||
Log
|
||||
LOG_DATA
|
||||
SHOW mysqld2 LOG ERROR 10, 2;
|
||||
Log
|
||||
LOG_DATA
|
||||
SHOW mysqld2 LOG SLOW 10, 2;
|
||||
Log
|
||||
LOG_DATA
|
||||
SHOW mysqld2 LOG GENERAL 10, 2;
|
||||
Log
|
||||
LOG_DATA
|
20
mysql-test/suite/im/t/disabled.def
Normal file
20
mysql-test/suite/im/t/disabled.def
Normal file
@ -0,0 +1,20 @@
|
||||
##############################################################################
|
||||
#
|
||||
# List the test cases that are to be disabled temporarily.
|
||||
#
|
||||
# Separate the test case name and the comment with ':'.
|
||||
#
|
||||
# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
|
||||
#
|
||||
# Do not use any TAB characters for whitespace.
|
||||
#
|
||||
##############################################################################
|
||||
im_options : Bug#20294 2006-07-24 stewart Instance manager test im_options fails randomly
|
||||
im_daemon_life_cycle : Bug#20294 2007-05-14 alik Instance manager tests fail randomly
|
||||
im_cmd_line : Bug#20294 2007-05-14 alik Instance manager tests fail randomly
|
||||
im_utils : Bug#20294 2007-05-30 alik Instance manager tests fail randomly
|
||||
im_instance_conf : Bug#20294 2007-05-30 alik Instance manager tests fail randomly
|
||||
im_life_cycle : BUG#27851 Instance manager dies on ASSERT in ~Thread_registry() or from not being able to close a mysqld instance.
|
||||
im_instance_conf : BUG#28743 Instance manager generates warnings in test suite
|
||||
im_utils : BUG#28743 Instance manager generates warnings in test suite
|
||||
|
26
mysql-test/suite/im/t/im_check_env.inc
Normal file
26
mysql-test/suite/im/t/im_check_env.inc
Normal file
@ -0,0 +1,26 @@
|
||||
# This file is intended to be used in each IM-test. It contains stamements,
|
||||
# that ensure that starting conditions (environment) for the IM-test are as
|
||||
# expected.
|
||||
|
||||
# Check the running instances.
|
||||
|
||||
--connect (mysql1_con,localhost,root,,mysql,$IM_MYSQLD1_PORT,$IM_MYSQLD1_SOCK)
|
||||
|
||||
--connection mysql1_con
|
||||
|
||||
SHOW VARIABLES LIKE 'server_id';
|
||||
|
||||
--source include/not_windows.inc
|
||||
|
||||
--connection default
|
||||
|
||||
# Let IM detect that mysqld1 is online. This delay should be longer than
|
||||
# monitoring interval.
|
||||
|
||||
--sleep 2
|
||||
|
||||
# Check that IM understands that mysqld1 is online, while mysqld2 is
|
||||
# offline.
|
||||
|
||||
--replace_result starting XXXXX online XXXXX
|
||||
SHOW INSTANCES;
|
68
mysql-test/suite/im/t/im_cmd_line.imtest
Normal file
68
mysql-test/suite/im/t/im_cmd_line.imtest
Normal file
@ -0,0 +1,68 @@
|
||||
###########################################################################
|
||||
#
|
||||
# Tests for user-management command-line options.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
--source suite/im/t/im_check_env.inc
|
||||
|
||||
###########################################################################
|
||||
|
||||
# List users so we are sure about starting conditions.
|
||||
|
||||
--echo --> Listing users...
|
||||
--exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --list-users 2>&1 >/dev/null
|
||||
--echo
|
||||
|
||||
# Add a new user.
|
||||
|
||||
--echo ==> Adding user 'testuser'...
|
||||
--exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --add-user --username=testuser --password=abc 2>&1 >/dev/null
|
||||
--echo
|
||||
|
||||
--echo --> IM password file:
|
||||
--exec cat $IM_PASSWORD_PATH
|
||||
--echo --> EOF
|
||||
--echo
|
||||
|
||||
--echo --> Printing out line for 'testuser'...
|
||||
--exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --print-password-line --username=testuser --password=abc | tail -2 | head -1
|
||||
--echo
|
||||
|
||||
--echo --> Listing users...
|
||||
--exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --list-users 2>&1 >/dev/null
|
||||
--echo
|
||||
|
||||
# Edit user's attributes.
|
||||
|
||||
--echo ==> Changing the password of 'testuser'...
|
||||
--exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --edit-user --username=testuser --password=xyz 2>&1 >/dev/null
|
||||
--echo
|
||||
|
||||
--echo --> IM password file:
|
||||
--exec cat $IM_PASSWORD_PATH
|
||||
--echo --> EOF
|
||||
--echo
|
||||
|
||||
--echo --> Printing out line for 'testuser'...
|
||||
--exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --print-password-line --username=testuser --password=xyz | tail -2 | head -1
|
||||
--echo
|
||||
|
||||
--echo --> Listing users...
|
||||
--exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --list-users 2>&1 >/dev/null
|
||||
--echo
|
||||
|
||||
# Drop user.
|
||||
|
||||
--echo ==> Dropping user 'testuser'...
|
||||
--exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --drop-user --username=testuser 2>&1 >/dev/null
|
||||
--echo
|
||||
|
||||
--echo --> IM password file:
|
||||
--exec cat $IM_PASSWORD_PATH
|
||||
--echo --> EOF
|
||||
--echo
|
||||
|
||||
--echo --> Listing users...
|
||||
--exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --list-users 2>&1 >/dev/null
|
||||
--echo
|
3
mysql-test/suite/im/t/im_daemon_life_cycle-im.opt
Normal file
3
mysql-test/suite/im/t/im_daemon_life_cycle-im.opt
Normal file
@ -0,0 +1,3 @@
|
||||
--run-as-service
|
||||
--log=$MYSQLTEST_VARDIR/log/im.log
|
||||
--monitoring-interval=1
|
100
mysql-test/suite/im/t/im_daemon_life_cycle.imtest
Normal file
100
mysql-test/suite/im/t/im_daemon_life_cycle.imtest
Normal file
@ -0,0 +1,100 @@
|
||||
let $UTIL=$MYSQL_TEST_DIR/suite/im/t;
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# This file contains test for (1.2) test suite.
|
||||
#
|
||||
# Consult WL#2789 for more information.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
--exec $UTIL/log.sh im_daemon_life_cycle im_daemon_life_cycle.imtest started.
|
||||
|
||||
###########################################################################
|
||||
|
||||
--source suite/im/t/im_check_env.inc
|
||||
|
||||
# Turn on reconnect, not on by default anymore.
|
||||
--enable_reconnect
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# The main daemon-life-cycle test case -- check that IM-angel will restart
|
||||
# IM-main if it got killed:
|
||||
# - kill IM-main and check that IM-angel will restart it;
|
||||
# - wait for IM-main to start accepting connections before continue test
|
||||
# case;
|
||||
#
|
||||
# NOTE: timeout is 55 seconds. Timeout should be more than shutdown-delay
|
||||
# specified for managed MySQL instance. Now shutdown-delay is 10 seconds
|
||||
# (set in mysql-test-run.pl). So, 55 seconds should be enough to make 5
|
||||
# attempts.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
--exec $UTIL/log.sh im_daemon_life_cycle Main-test: starting...
|
||||
|
||||
--exec $UTIL/log.sh im_daemon_life_cycle Killing IM-main...
|
||||
--exec $UTIL/kill_n_check.sh $IM_PATH_PID restarted 55 im_daemon_life_cycle
|
||||
|
||||
--exec $UTIL/log.sh im_daemon_life_cycle Waiting for IM-main to start accepting connections...
|
||||
--exec $UTIL/wait_for_socket.sh $EXE_MYSQL $IM_PATH_SOCK $IM_USERNAME $IM_PASSWORD '' 55 im_daemon_life_cycle
|
||||
|
||||
--exec $UTIL/log.sh im_daemon_life_cycle Main-test: done.
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# BUG#12751: Instance Manager: client hangs
|
||||
# - start nonguarded instance (mysqld2);
|
||||
# - kill IM-main and get it restarted by IM-angel;
|
||||
# - check that guarded instance (mysqld1) is accepting connections.
|
||||
# - check that non-guarded instance (mysqld2) were not stopped.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
--echo
|
||||
--echo --------------------------------------------------------------------
|
||||
--echo -- Test for BUG#12751
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
--exec $UTIL/log.sh im_daemon_life_cycle BUG12751: starting...
|
||||
|
||||
# 1. Start mysqld;
|
||||
|
||||
--exec $UTIL/log.sh im_daemon_life_cycle mysqld2: starting...
|
||||
START INSTANCE mysqld2;
|
||||
|
||||
--exec $UTIL/log.sh im_daemon_life_cycle mysqld2: waiting to start...
|
||||
--exec $UTIL/wait_for_process.sh $IM_MYSQLD2_PATH_PID 55 started im_daemon_life_cycle
|
||||
|
||||
--exec $UTIL/log.sh im_daemon_life_cycle mysqld2: started.
|
||||
|
||||
# 2. Restart IM-main;
|
||||
|
||||
--exec $UTIL/log.sh im_daemon_life_cycle Killing IM-main...
|
||||
--exec $UTIL/kill_n_check.sh $IM_PATH_PID restarted 55 im_daemon_life_cycle
|
||||
|
||||
--exec $UTIL/log.sh im_daemon_life_cycle Waiting for IM-main to start accepting connections...
|
||||
--exec $UTIL/wait_for_socket.sh $EXE_MYSQL $IM_PATH_SOCK $IM_USERNAME $IM_PASSWORD '' 55 im_daemon_life_cycle
|
||||
|
||||
# 3. Issue some statement -- connection should be re-established.
|
||||
|
||||
--exec $UTIL/log.sh im_daemon_life_cycle Checking that IM-main processing commands...
|
||||
|
||||
--replace_column 2 STATE 3 VERSION_NUMBER 4 VERSION
|
||||
SHOW INSTANCE STATUS mysqld1;
|
||||
|
||||
# 4. Stop mysqld2, because it will not be stopped by IM, as it is nonguarded.
|
||||
# So, if it we do not stop it, it will be stopped by mysql-test-run.pl with
|
||||
# warning.
|
||||
|
||||
--exec $UTIL/log.sh im_daemon_life_cycle mysqld2: stopping...
|
||||
STOP INSTANCE mysqld2;
|
||||
|
||||
--exec $UTIL/log.sh im_daemon_life_cycle mysqld2: waiting to stop...
|
||||
--exec $UTIL/wait_for_process.sh $IM_MYSQLD2_PATH_PID 55 stopped im_daemon_life_cycle
|
||||
--exec $UTIL/log.sh im_daemon_life_cycle mysqld2: stopped.
|
||||
|
||||
###########################################################################
|
||||
|
||||
--exec $UTIL/log.sh im_daemon_life_cycle BUG12751: done.
|
1
mysql-test/suite/im/t/im_instance_conf-im.opt
Normal file
1
mysql-test/suite/im/t/im_instance_conf-im.opt
Normal file
@ -0,0 +1 @@
|
||||
--monitoring-interval=1
|
244
mysql-test/suite/im/t/im_instance_conf.imtest
Normal file
244
mysql-test/suite/im/t/im_instance_conf.imtest
Normal file
@ -0,0 +1,244 @@
|
||||
###########################################################################
|
||||
#
|
||||
# This test suite checks the following statements:
|
||||
# - CREATE INSTANCE <instance_name> [option1[=option1_value], ...];
|
||||
# - DROP INSTANCE <instance_name>;
|
||||
#
|
||||
# For CREATE INSTANCE we check that:
|
||||
# - CREATE INSTANCE succeeds for non-existing instance;
|
||||
# - CREATE INSTANCE fails for existing instance;
|
||||
# - CREATE INSTANCE can get additional options with and w/o values;
|
||||
# - CREATE INSTANCE parses options and handles grammar errors correctly.
|
||||
# Check that strings with spaces are handled correctly, unknown (for
|
||||
# mysqld) options should also be handled;
|
||||
# - CREATE INSTANCE updates both config file and internal configuration cache;
|
||||
# - CREATE INSTANCE allows to create instances only with properly formed
|
||||
# names (mysqld*);
|
||||
#
|
||||
# For DROP INSTANCE we check that:
|
||||
# - DROP INSTANCE succeeds for existing instance;
|
||||
# - DROP INSTANCE fails for non-existing instance;
|
||||
# - DROP INSTANCE fails for active instance.
|
||||
# - DROP INSTANCE updates both config file and internal configuration cache;
|
||||
#
|
||||
# NOTE: each CREATE INSTANCE statement must specify socket-file-name, otherwise
|
||||
# this results of the test can be affected by another running test suite.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
--source suite/im/t/im_check_env.inc
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# Check starting conditions.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
# Check that the configuration file contains only instances that we expect.
|
||||
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^server_id[^a-zA-Z0-9_\-]' $MYSQLTEST_VARDIR/im.cnf;
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# CREATE INSTANCE tests.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
# Check that CREATE INSTANCE succeeds for non-existing instance and also check
|
||||
# that both config file and internal configuration cache have been updated.
|
||||
|
||||
CREATE INSTANCE mysqld3
|
||||
server_id = 3,
|
||||
socket = "$MYSQL_TMP_DIR/mysqld_3.sock";
|
||||
|
||||
SHOW INSTANCES;
|
||||
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^server_id[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf;
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
# Check that CREATE INSTANCE fails for existing instance. Let's all three
|
||||
# existing instances (running one, stopped one and just created one). Just in
|
||||
# case...
|
||||
|
||||
--error 3012 # ER_CREATE_EXISTING_INSTANCE
|
||||
CREATE INSTANCE mysqld1;
|
||||
|
||||
--error 3012 # ER_CREATE_EXISTING_INSTANCE
|
||||
CREATE INSTANCE mysqld2;
|
||||
|
||||
--error 3012 # ER_CREATE_EXISTING_INSTANCE
|
||||
CREATE INSTANCE mysqld3;
|
||||
|
||||
# Check that CREATE INSTANCE can get additional options with and w/o values.
|
||||
# Ensure that config file is updated properly.
|
||||
|
||||
# - without values;
|
||||
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep "^nonguarded\$" $MYSQLTEST_VARDIR/im.cnf;
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
CREATE INSTANCE mysqld4
|
||||
nonguarded,
|
||||
server_id = 4,
|
||||
socket = "$MYSQL_TMP_DIR/mysqld_4.sock";
|
||||
|
||||
SHOW INSTANCES;
|
||||
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep "^nonguarded\$" $MYSQLTEST_VARDIR/im.cnf;
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
# - with value;
|
||||
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-A[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-B[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
CREATE INSTANCE mysqld5
|
||||
test-A = 000,
|
||||
test-B = test,
|
||||
server_id = 5,
|
||||
socket = "$MYSQL_TMP_DIR/mysqld_5.sock";
|
||||
|
||||
SHOW INSTANCES;
|
||||
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-A[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-B[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf;
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
# Check that CREATE INSTANCE parses options and handles grammar errors
|
||||
# correctly. Check that strings with spaces are handled correctly,
|
||||
# unknown (for mysqld) options should also be handled.
|
||||
|
||||
# - check handling of extra spaces;
|
||||
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-C1[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-C2[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
CREATE INSTANCE mysqld6
|
||||
test-C1 = 10 ,
|
||||
test-C2 = 02 ,
|
||||
server_id = 6,
|
||||
socket = "$MYSQL_TMP_DIR/mysqld_6.sock";
|
||||
|
||||
SHOW INSTANCES;
|
||||
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-C1[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-C2[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf;
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
# - check handling of grammar error;
|
||||
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-D[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-E[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
--error ER_SYNTAX_ERROR
|
||||
CREATE INSTANCE mysqld7 test-D = test-D-value ;
|
||||
SHOW INSTANCES;
|
||||
|
||||
--error ER_SYNTAX_ERROR
|
||||
CREATE INSTANCE mysqld8 test-E 0 ;
|
||||
SHOW INSTANCES;
|
||||
|
||||
--error ER_SYNTAX_ERROR
|
||||
CREATE INSTANCE mysqld8 test-F = ;
|
||||
SHOW INSTANCES;
|
||||
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-D[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-E[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
# - check parsing of string option values
|
||||
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-1[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-2[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-3[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-4[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-5[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-6[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-7[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
CREATE INSTANCE mysqld9
|
||||
test-1=" hello world ",
|
||||
test-2=' ',
|
||||
server_id = 9,
|
||||
socket = "$MYSQL_TMP_DIR/mysqld_9.sock";
|
||||
SHOW INSTANCES;
|
||||
|
||||
CREATE INSTANCE mysqld10
|
||||
test-3='\b\babc\sdef',
|
||||
server_id = 10,
|
||||
socket = "$MYSQL_TMP_DIR/mysqld_10.sock";
|
||||
# test-3='abc def'
|
||||
SHOW INSTANCES;
|
||||
|
||||
CREATE INSTANCE mysqld11
|
||||
test-4='abc\tdef',
|
||||
test-5='abc\ndef',
|
||||
server_id = 11,
|
||||
socket = "$MYSQL_TMP_DIR/mysqld_11.sock";
|
||||
SHOW INSTANCES;
|
||||
|
||||
CREATE INSTANCE mysqld12
|
||||
test-6="abc\rdef",
|
||||
test-7="abc\\def",
|
||||
server_id = 12,
|
||||
socket = "$MYSQL_TMP_DIR/mysqld_12.sock";
|
||||
# test-6=abc
|
||||
SHOW INSTANCES;
|
||||
|
||||
--error ER_SYNTAX_ERROR
|
||||
CREATE INSTANCE mysqld13 test-bad=' \ ';
|
||||
SHOW INSTANCES;
|
||||
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-1[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-2[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-3[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-4[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-5[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-6[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-7[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^test-bad' $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
|
||||
# Check that CREATE INSTANCE allows to create instances only with properly
|
||||
# formed names (mysqld*).
|
||||
|
||||
--error 3014 # ER_MALFORMED_INSTANCE_NAME
|
||||
CREATE INSTANCE qqq1;
|
||||
|
1
mysql-test/suite/im/t/im_life_cycle-im.opt
Normal file
1
mysql-test/suite/im/t/im_life_cycle-im.opt
Normal file
@ -0,0 +1 @@
|
||||
--monitoring-interval=1
|
205
mysql-test/suite/im/t/im_life_cycle.imtest
Normal file
205
mysql-test/suite/im/t/im_life_cycle.imtest
Normal file
@ -0,0 +1,205 @@
|
||||
let $UTIL=$MYSQL_TEST_DIR/suite/im/t;
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# This file contains test for (1.1) test suite.
|
||||
#
|
||||
# Consult WL#2789 for more information.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
--source suite/im/t/im_check_env.inc
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# 1.1.2. Check 'START INSTANCE' command:
|
||||
# - start the second instance;
|
||||
# - check that it is reported as online;
|
||||
# - execute some SQL-statement on mysqld2 to ensure that it is really up and
|
||||
# running;
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
--echo
|
||||
--echo --------------------------------------------------------------------
|
||||
--echo -- 1.1.2.
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
START INSTANCE mysqld2;
|
||||
# FIXME: START INSTANCE should be synchronous.
|
||||
--exec $UTIL/wait_for_process.sh $IM_MYSQLD2_PATH_PID 30 started im_life_cycle
|
||||
|
||||
# FIXME: Result of SHOW INSTANCES here is not deterministic unless START
|
||||
# INSTANCE is synchronous. Even waiting for mysqld to start by looking at
|
||||
# its pid file is not enough, because it is unknown when IM detects that
|
||||
# mysqld has started.
|
||||
# SHOW INSTANCES;
|
||||
|
||||
--connect (mysql_con,localhost,root,,mysql,$IM_MYSQLD2_PORT,$IM_MYSQLD2_SOCK)
|
||||
--connection mysql_con
|
||||
|
||||
--replace_result $IM_MYSQLD2_PORT IM_MYSQLD2_PORT
|
||||
SHOW VARIABLES LIKE 'port';
|
||||
|
||||
--connection default
|
||||
--disconnect mysql_con
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# 1.1.3. Check 'STOP INSTANCE' command:
|
||||
# - stop the second instance;
|
||||
# - check that it is reported as offline;
|
||||
# - TODO: try to execute some SQL-statement to ensure that it is really down;
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
--echo
|
||||
--echo --------------------------------------------------------------------
|
||||
--echo -- 1.1.3.
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
STOP INSTANCE mysqld2;
|
||||
# FIXME: STOP INSTANCE should be synchronous.
|
||||
--exec $UTIL/wait_for_process.sh $IM_MYSQLD2_PATH_PID 30 stopped im_life_cycle
|
||||
|
||||
# FIXME: Result of SHOW INSTANCES here is not deterministic unless START
|
||||
# INSTANCE is synchronous. Even waiting for mysqld to start by looking at
|
||||
# its pid file is not enough, because it is unknown when IM detects that
|
||||
# mysqld has started.
|
||||
# SHOW INSTANCES;
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# 1.1.4. Check that Instance Manager reports correct errors for 'START
|
||||
# INSTANCE' command:
|
||||
# - if the client tries to start unregistered instance;
|
||||
# - if the client tries to start already started instance;
|
||||
# - if the client submits invalid arguments;
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
--echo
|
||||
--echo --------------------------------------------------------------------
|
||||
--echo -- 1.1.4.
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
--error 3000 # ER_BAD_INSTANCE_NAME
|
||||
START INSTANCE mysqld3;
|
||||
|
||||
--error 3002 # ER_INSTANCE_ALREADY_STARTED
|
||||
START INSTANCE mysqld1;
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# 1.1.5. Check that Instance Manager reports correct errors for
|
||||
# 'STOP INSTANCE' command:
|
||||
# - if the client tries to start unregistered instance;
|
||||
# - if the client tries to start already stopped instance;
|
||||
# - if the client submits invalid arguments;
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
--echo
|
||||
--echo --------------------------------------------------------------------
|
||||
--echo -- 1.1.5.
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
--error 3000 # ER_BAD_INSTANCE_NAME
|
||||
STOP INSTANCE mysqld3;
|
||||
|
||||
# TODO: IM should be fixed.
|
||||
# BUG#12673: Instance Manager allows to stop the instance many times
|
||||
# --error 3002 # ER_INSTANCE_ALREADY_STARTED
|
||||
# STOP INSTANCE mysqld2;
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# 1.1.6. Check that Instance Manager is able to restart guarded instances.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
--echo
|
||||
--echo --------------------------------------------------------------------
|
||||
--echo -- 1.1.6.
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
--exec $UTIL/kill_n_check.sh $IM_MYSQLD1_PATH_PID restarted 30 im_life_cycle
|
||||
|
||||
# Give some time to IM to detect that mysqld was restarted. It should be
|
||||
# longer than monitoring interval.
|
||||
|
||||
--sleep 3
|
||||
|
||||
SHOW INSTANCES;
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# 1.1.7. Check that Instance Manager does not restart non-guarded instance.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
--echo
|
||||
--echo --------------------------------------------------------------------
|
||||
--echo -- 1.1.7.
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
START INSTANCE mysqld2;
|
||||
# FIXME: START INSTANCE should be synchronous.
|
||||
--exec $UTIL/wait_for_process.sh $IM_MYSQLD2_PATH_PID 30 started im_life_cycle
|
||||
|
||||
# FIXME: Result of SHOW INSTANCES here is not deterministic unless START
|
||||
# INSTANCE is synchronous. Even waiting for mysqld to start by looking at
|
||||
# its pid file is not enough, because it is unknown when IM detects that
|
||||
# mysqld has started.
|
||||
# SHOW INSTANCES;
|
||||
|
||||
--exec $UTIL/kill_n_check.sh $IM_MYSQLD2_PATH_PID killed 10 im_life_cycle
|
||||
|
||||
# FIXME: Result of SHOW INSTANCES here is not deterministic unless START
|
||||
# INSTANCE is synchronous. Even waiting for mysqld to start by looking at
|
||||
# its pid file is not enough, because it is unknown when IM detects that
|
||||
# mysqld has started.
|
||||
# SHOW INSTANCES;
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# 1.1.8. Check that Instance Manager returns an error on
|
||||
# incomplete SHOW INSTANCE STATUS command.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
--echo
|
||||
--echo --------------------------------------------------------------------
|
||||
--echo -- 1.1.8.
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
--error ER_SYNTAX_ERROR
|
||||
SHOW INSTANCE STATUS;
|
||||
|
||||
#
|
||||
# Tests for bug fixes
|
||||
#
|
||||
|
||||
#
|
||||
# Bug #12813 Instance Manager: START/STOP INSTANCE commands accept
|
||||
# a list as argument.
|
||||
#
|
||||
|
||||
--echo
|
||||
--echo --------------------------------------------------------------------
|
||||
--echo -- BUG#12813
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
--error ER_SYNTAX_ERROR
|
||||
START INSTANCE mysqld1,mysqld2,mysqld3;
|
||||
|
||||
--error ER_SYNTAX_ERROR
|
||||
STOP INSTANCE mysqld1,mysqld2,mysqld3;
|
||||
|
||||
#
|
||||
# Bug #12673: Instance Manager: allows to stop the instance many times
|
||||
#
|
||||
--error 3001
|
||||
STOP INSTANCE mysqld2;
|
||||
|
||||
--echo End of 5.0 tests
|
1
mysql-test/suite/im/t/im_options-im.opt
Normal file
1
mysql-test/suite/im/t/im_options-im.opt
Normal file
@ -0,0 +1 @@
|
||||
--monitoring-interval=1
|
248
mysql-test/suite/im/t/im_options.imtest
Normal file
248
mysql-test/suite/im/t/im_options.imtest
Normal file
@ -0,0 +1,248 @@
|
||||
###########################################################################
|
||||
#
|
||||
# This test suite checks the following statements:
|
||||
# - SET <instance id>.<option name> = <option value>;
|
||||
# - UNSET <instance id>.<option name> = <option value>;
|
||||
# - FLUSH INSTANCES;
|
||||
#
|
||||
# For SET/UNSET we check that:
|
||||
# - SET ignores spaces correctly;
|
||||
# - UNSET does not allow option-value part (= <option value>);
|
||||
# - SET/UNSET can be applied several times w/o error;
|
||||
# - SET/UNSET is allowed only for stopped instances;
|
||||
# - SET/UNSET updates both the configuration cache in IM and
|
||||
# the configuration file;
|
||||
#
|
||||
# For FLUSH INSTANCES we check that:
|
||||
# - FLUSH INSTANCES is allowed only when all instances are stopped;
|
||||
#
|
||||
# According to the IM implementation details, we should play at least with the
|
||||
# following options:
|
||||
# - server_id
|
||||
# - port
|
||||
# - nonguarded
|
||||
#
|
||||
# Let's test SET statement on the option 'server_id'. It's expected that
|
||||
# originally the instances have the following server ids and states:
|
||||
# - mysqld1: server_id: 1; running (online)
|
||||
# - mysqld2: server_id: 2; stopped (offline)
|
||||
#
|
||||
# NOTE: each CREATE INSTANCE statement must specify socket-file-name, otherwise
|
||||
# this results of the test can be affected by another running test suite.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
--source suite/im/t/im_check_env.inc
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# Check that SET/UNSET is allowed only for stopped instances.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
# - check that SET/UNSET is denied for running instances;
|
||||
|
||||
--error 3015 # ER_INSTANCE_IS_ACTIVE
|
||||
UNSET mysqld1.server_id;
|
||||
|
||||
--error 3015 # ER_INSTANCE_IS_ACTIVE
|
||||
SET mysqld1.server_id = 11;
|
||||
|
||||
# - check that SET/UNSET is denied for active instances:
|
||||
# - create dummy misconfigured instance;
|
||||
# - start it;
|
||||
# - try to set/unset options;
|
||||
|
||||
CREATE INSTANCE mysqld3
|
||||
datadir = '/',
|
||||
server_id = 3,
|
||||
socket = "$MYSQL_TMP_DIR/mysqld_3.sock";
|
||||
START INSTANCE mysqld3;
|
||||
|
||||
# FIXME: START INSTANCE should be synchronous.
|
||||
--sleep 3
|
||||
# should be longer than monitoring interval and enough to start instance.
|
||||
|
||||
# NOTE: We can not analyze state of the instance here -- it can be Failed or
|
||||
# Starting because Instance Manager is trying to start the misconfigured
|
||||
# instance several times.
|
||||
|
||||
--error 3015 # ER_INSTANCE_IS_ACTIVE
|
||||
UNSET mysqld3.server_id;
|
||||
|
||||
--error 3015 # ER_INSTANCE_IS_ACTIVE
|
||||
SET mysqld3.server_id = 11;
|
||||
|
||||
STOP INSTANCE mysqld3;
|
||||
|
||||
# FIXME: STOP INSTANCE should be synchronous.
|
||||
--sleep 3
|
||||
# should be longer than monitoring interval and enough to stop instance.
|
||||
|
||||
--replace_column 3 VERSION_NUMBER 4 VERSION
|
||||
SHOW INSTANCE STATUS mysqld3;
|
||||
|
||||
# - check that SET/UNSET succeed for stopped instances;
|
||||
# - check that SET/UNSET can be applied multiple times;
|
||||
|
||||
UNSET mysqld2.server_id;
|
||||
UNSET mysqld2.server_id;
|
||||
|
||||
--replace_column 2 option_value
|
||||
SHOW INSTANCE OPTIONS mysqld2;
|
||||
|
||||
SET mysqld2.server_id = 2;
|
||||
SET mysqld2.server_id = 2;
|
||||
|
||||
--replace_column 2 option_value
|
||||
SHOW INSTANCE OPTIONS mysqld2;
|
||||
|
||||
# - check that UNSET does not allow option-value part (= <option value>);
|
||||
|
||||
--error ER_SYNTAX_ERROR
|
||||
UNSET mysqld2.server_id = 11;
|
||||
|
||||
# - check that SET/UNSET working properly with multiple options;
|
||||
|
||||
SET mysqld2.aaa, mysqld3.bbb, mysqld2.ccc = 0010, mysqld3.ddd = 0020;
|
||||
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep "^aaa\$" $MYSQLTEST_VARDIR/im.cnf ;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep "^bbb\$" $MYSQLTEST_VARDIR/im.cnf ;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^ccc[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf ;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^ddd[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf ;
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
UNSET mysqld2.aaa, mysqld3.bbb, mysqld2.ccc, mysqld3.ddd;
|
||||
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep "^aaa\$" $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep "^bbb\$" $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^ccc[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^ddd[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
# - check that if some instance name is invalid or the active is active,
|
||||
# whole SET-statement will not be executed;
|
||||
|
||||
--error 3000 # ER_BAD_INSTANCE_NAME
|
||||
SET mysqld2.aaa, mysqld3.bbb, mysqld.ccc = 0010;
|
||||
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep "^aaa\$" $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep "^bbb\$" $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^ccc[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
--error 3015 # ER_INSTANCE_IS_ACTIVE
|
||||
SET mysqld2.aaa, mysqld3.bbb, mysqld1.ccc = 0010;
|
||||
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep "^aaa\$" $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep "^bbb\$" $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^ccc[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
# - check that if some instance name is invalid or the active is active,
|
||||
# whole UNSET-statement will not be executed;
|
||||
|
||||
--error 3000 # ER_BAD_INSTANCE_NAME
|
||||
UNSET mysqld2.server_id, mysqld3.server_id, mysqld.ccc;
|
||||
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^server_id[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf;
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
--error 3015 # ER_INSTANCE_IS_ACTIVE
|
||||
UNSET mysqld2.server_id, mysqld3.server_id, mysqld1.ccc;
|
||||
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^server_id[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf;
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
DROP INSTANCE mysqld3;
|
||||
|
||||
# - check that spaces are handled correctly;
|
||||
|
||||
SET mysqld2.server_id=222;
|
||||
SET mysqld2.server_id = 222;
|
||||
SET mysqld2.server_id = 222 ;
|
||||
SET mysqld2 . server_id = 222 ;
|
||||
SET mysqld2 . server_id = 222 , mysqld2 . aaa , mysqld2 . bbb ;
|
||||
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^server_id[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf ;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep "^aaa\$" $MYSQLTEST_VARDIR/im.cnf ;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep "^bbb\$" $MYSQLTEST_VARDIR/im.cnf ;
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
UNSET mysqld2 . aaa , mysqld2 . bbb ;
|
||||
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^server_id[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf ;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep "^aaa\$" $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep "^bbb\$" $MYSQLTEST_VARDIR/im.cnf || true;
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# Check that SET/UNSET updates both the configuration cache in IM and
|
||||
# the configuration file.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
# - check that the configuration file has been updated (i.e. contains
|
||||
# server_id=SERVER_ID for mysqld2);
|
||||
|
||||
--echo --------------------------------------------------------------------
|
||||
--exec grep '^server_id[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf ;
|
||||
--echo --------------------------------------------------------------------
|
||||
|
||||
# - (for mysqld1) check that the running instance has not been affected:
|
||||
# connect to the instance and check that 'SHOW VARIABLES LIKE 'server_id''
|
||||
# returns zero;
|
||||
|
||||
--connection mysql1_con
|
||||
|
||||
SHOW VARIABLES LIKE 'server_id';
|
||||
|
||||
--connection default
|
||||
|
||||
# - check that internal cache of Instance Manager has been affected;
|
||||
# TODO: we should check only server_id option here.
|
||||
|
||||
# SHOW INSTANCE OPTIONS mysqld2;
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# Check that FLUSH INSTANCES is allowed only when all instances are stopped.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
SHOW INSTANCES;
|
||||
|
||||
--error 3016 # ER_THERE_IS_ACTIVE_INSTACE
|
||||
FLUSH INSTANCES;
|
||||
|
||||
STOP INSTANCE mysqld1;
|
||||
# FIXME: STOP INSTANCE should be synchronous.
|
||||
--sleep 3
|
||||
# should be longer than monitoring interval and enough to stop instance.
|
||||
|
||||
SHOW INSTANCES;
|
||||
|
||||
FLUSH INSTANCES;
|
1
mysql-test/suite/im/t/im_utils-im.opt
Normal file
1
mysql-test/suite/im/t/im_utils-im.opt
Normal file
@ -0,0 +1 @@
|
||||
--monitoring-interval=1
|
107
mysql-test/suite/im/t/im_utils.imtest
Normal file
107
mysql-test/suite/im/t/im_utils.imtest
Normal file
@ -0,0 +1,107 @@
|
||||
###########################################################################
|
||||
#
|
||||
# This file contains test for (2) test suite.
|
||||
#
|
||||
# Consult WL#2789 for more information.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
--source suite/im/t/im_check_env.inc
|
||||
|
||||
let $UTIL=$MYSQL_TEST_DIR/suite/im/t;
|
||||
|
||||
###########################################################################
|
||||
|
||||
#
|
||||
# Check 'SHOW INSTANCE OPTIONS' command.
|
||||
#
|
||||
# Since configuration of an mysqld-instance contains directories, we should
|
||||
# completely ignore the second column (values) in order to make the test
|
||||
# case produce the same results on different installations;
|
||||
# TODO: ignore values of only directory-specific options.
|
||||
#
|
||||
|
||||
--replace_column 2 VALUE
|
||||
SHOW INSTANCE OPTIONS mysqld1;
|
||||
|
||||
--replace_column 2 VALUE
|
||||
SHOW INSTANCE OPTIONS mysqld2;
|
||||
|
||||
#
|
||||
# Before checking log files, we should start the second instance (mysqld2) to
|
||||
# give it a chance to create log files.
|
||||
#
|
||||
|
||||
START INSTANCE mysqld2;
|
||||
--exec $UTIL/wait_for_process.sh $IM_MYSQLD2_PATH_PID 30 started im_utils
|
||||
|
||||
STOP INSTANCE mysqld2;
|
||||
--exec $UTIL/wait_for_process.sh $IM_MYSQLD2_PATH_PID 30 stopped im_utils
|
||||
|
||||
#
|
||||
# Check 'SHOW LOG FILES' command:
|
||||
# - check that log files of both offline and online instances are accessible;
|
||||
# - since placement of the log files is installation-specific, we should
|
||||
# ignore it in comparisson;
|
||||
# - also, we should ignore log file size, since it may depend on the version
|
||||
# being tested;
|
||||
#
|
||||
|
||||
--replace_column 2 PATH 3 FILE_SIZE
|
||||
SHOW mysqld1 LOG FILES;
|
||||
|
||||
--replace_column 2 PATH 3 FILE_SIZE
|
||||
SHOW mysqld2 LOG FILES;
|
||||
|
||||
#
|
||||
# Check 'SHOW LOG' command:
|
||||
# - check that all three kinds of logs are available for both offline and
|
||||
# online instances;
|
||||
# - we should ignore the value, because it is very specific and depends on
|
||||
# many factors; we only check that Instance Manager is able to provide log
|
||||
# files.
|
||||
#
|
||||
|
||||
# mysqld1 (online) w/o the optional argument.
|
||||
|
||||
--replace_column 1 LOG_DATA
|
||||
SHOW mysqld1 LOG ERROR 10;
|
||||
|
||||
--replace_column 1 LOG_DATA
|
||||
SHOW mysqld1 LOG SLOW 10;
|
||||
|
||||
--replace_column 1 LOG_DATA
|
||||
SHOW mysqld1 LOG GENERAL 10;
|
||||
|
||||
# mysqld1 (online) with the optional argument.
|
||||
|
||||
--replace_column 1 LOG_DATA
|
||||
SHOW mysqld1 LOG ERROR 10, 2;
|
||||
|
||||
--replace_column 1 LOG_DATA
|
||||
SHOW mysqld1 LOG SLOW 10, 2;
|
||||
|
||||
--replace_column 1 LOG_DATA
|
||||
SHOW mysqld1 LOG GENERAL 10, 2;
|
||||
|
||||
# mysqld2 (offline) w/o the optional argument.
|
||||
|
||||
--replace_column 1 LOG_DATA
|
||||
SHOW mysqld2 LOG ERROR 10;
|
||||
|
||||
--replace_column 1 LOG_DATA
|
||||
SHOW mysqld2 LOG SLOW 10;
|
||||
|
||||
--replace_column 1 LOG_DATA
|
||||
SHOW mysqld2 LOG GENERAL 10;
|
||||
|
||||
# mysqld2 (offline) with the optional argument.
|
||||
|
||||
--replace_column 1 LOG_DATA
|
||||
SHOW mysqld2 LOG ERROR 10, 2;
|
||||
|
||||
--replace_column 1 LOG_DATA
|
||||
SHOW mysqld2 LOG SLOW 10, 2;
|
||||
|
||||
--replace_column 1 LOG_DATA
|
||||
SHOW mysqld2 LOG GENERAL 10, 2;
|
147
mysql-test/suite/im/t/kill_n_check.sh
Executable file
147
mysql-test/suite/im/t/kill_n_check.sh
Executable file
@ -0,0 +1,147 @@
|
||||
#!/bin/sh
|
||||
|
||||
###########################################################################
|
||||
|
||||
# NOTE: this script returns 0 (success) even in case of failure (except for
|
||||
# usage-error). This is because this script is executed under
|
||||
# mysql-test-run[.pl] and it's better to examine particular problem in log
|
||||
# file, than just having said that the test case has failed.
|
||||
|
||||
###########################################################################
|
||||
|
||||
basename=`basename "$0"`
|
||||
dirname=`dirname "$0"`
|
||||
|
||||
###########################################################################
|
||||
|
||||
. "$dirname/utils.sh"
|
||||
|
||||
###########################################################################
|
||||
|
||||
check_restart()
|
||||
{
|
||||
if [ ! -r "$pid_path" ]; then
|
||||
log_debug "No '$pid_path' found."
|
||||
user_msg='the process was killed'
|
||||
return 1
|
||||
fi
|
||||
|
||||
new_pid=`cat "$pid_path" 2>/dev/null`
|
||||
err_code=$?
|
||||
|
||||
log_debug "err_code: $err_code; original_pid: $original_pid; new_pid: $new_pid."
|
||||
|
||||
if [ $err_code -eq 0 -a "$original_pid" = "$new_pid" ]; then
|
||||
log_debug "The process was not restarted."
|
||||
user_msg='the process was not restarted'
|
||||
return 1
|
||||
fi
|
||||
|
||||
log_debug "The process was restarted."
|
||||
user_msg='the process was restarted'
|
||||
return 0
|
||||
}
|
||||
|
||||
###########################################################################
|
||||
|
||||
if [ $# -ne 4 ]; then
|
||||
echo "Usage: $basename <pid file path> killed|restarted <timeout> <test id>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pid_path="$1"
|
||||
expected_result="$2"
|
||||
total_timeout="$3"
|
||||
test_id="$4"
|
||||
log_file="$MYSQLTEST_VARDIR/log/$test_id.script.log"
|
||||
|
||||
log_debug "-- $basename: starting --"
|
||||
log_debug "pid_path: '$pid_path'"
|
||||
log_debug "expected_result: '$expected_result'"
|
||||
log_debug "total_timeout: '$total_timeout'"
|
||||
log_debug "test_id: '$test_id'"
|
||||
log_debug "log_file: '$log_file'"
|
||||
|
||||
###########################################################################
|
||||
|
||||
if [ "$expected_result" != 'killed' -a \
|
||||
"$expected_result" != 'restarted' ]; then
|
||||
log_error "Invalid second argument ($expected_result): 'killed' or 'restarted' expected."
|
||||
quit 0
|
||||
fi
|
||||
|
||||
if [ -z "$pid_path" ]; then
|
||||
log_error "Invalid PID path ($pid_path)."
|
||||
quit 0
|
||||
fi
|
||||
|
||||
if [ ! -r "$pid_path" ]; then
|
||||
log_error "PID file ($pid_path) does not exist."
|
||||
quit 0
|
||||
fi
|
||||
|
||||
if [ -z "$total_timeout" ]; then
|
||||
log_error "Timeout is not specified."
|
||||
quit 0
|
||||
fi
|
||||
|
||||
###########################################################################
|
||||
|
||||
original_pid=`cat "$pid_path"`
|
||||
log_debug "original_pid: $original_pid."
|
||||
|
||||
log_info "Killing the process..."
|
||||
|
||||
kill -9 $original_pid
|
||||
|
||||
###########################################################################
|
||||
|
||||
log_info "Waiting..."
|
||||
|
||||
if [ "$expected_result" = "restarted" ]; then
|
||||
|
||||
# Wait for the process to restart.
|
||||
|
||||
cur_attempt=1
|
||||
|
||||
while true; do
|
||||
|
||||
log_debug "cur_attempt: $cur_attempt."
|
||||
|
||||
if check_restart; then
|
||||
log_info "Success: $user_msg."
|
||||
quit 0
|
||||
fi
|
||||
|
||||
[ $cur_attempt -ge $total_timeout ] && break
|
||||
|
||||
log_debug "Sleeping for 1 second..."
|
||||
sleep 1
|
||||
|
||||
cur_attempt=`expr $cur_attempt + 1`
|
||||
|
||||
done
|
||||
|
||||
log_error "$user_msg."
|
||||
quit 0
|
||||
|
||||
else # $expected_result == killed
|
||||
|
||||
# Here we have to sleep for some long time to ensure that the process will
|
||||
# not be restarted.
|
||||
|
||||
log_debug "Sleeping for $total_timeout seconds..."
|
||||
sleep $total_timeout
|
||||
|
||||
new_pid=`cat "$pid_path" 2>/dev/null`
|
||||
log_debug "new_pid: $new_pid."
|
||||
|
||||
if [ "$new_pid" -a "$new_pid" -ne "$original_pid" ]; then
|
||||
log_error "The process was restarted."
|
||||
else
|
||||
log_info "Success: the process was killed."
|
||||
fi
|
||||
|
||||
quit 0
|
||||
|
||||
fi
|
24
mysql-test/suite/im/t/log.sh
Executable file
24
mysql-test/suite/im/t/log.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
###########################################################################
|
||||
|
||||
basename=`basename "$0"`
|
||||
dirname=`dirname "$0"`
|
||||
|
||||
###########################################################################
|
||||
|
||||
. "$dirname/utils.sh"
|
||||
|
||||
###########################################################################
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "Usage: $basename <test id> log message ..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test_id="$1"
|
||||
log_file="$MYSQLTEST_VARDIR/log/$test_id.script.log"
|
||||
|
||||
shift
|
||||
|
||||
log_debug "$*"
|
55
mysql-test/suite/im/t/utils.sh
Normal file
55
mysql-test/suite/im/t/utils.sh
Normal file
@ -0,0 +1,55 @@
|
||||
###########################################################################
|
||||
#
|
||||
# This file provides utility functions and is included by other scripts.
|
||||
#
|
||||
# The following global variables must be set before calling functions from this
|
||||
# file:
|
||||
# - basename -- base name of the calling script (main application);
|
||||
# - log_file -- where to store log records;
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
log()
|
||||
{
|
||||
[ -z "$log_file" ] && return;
|
||||
|
||||
log_level="$1"
|
||||
log_msg="$2"
|
||||
ts=`date`
|
||||
|
||||
echo "[$ts] [$basename] [$log_level] $log_msg" >> "$log_file";
|
||||
}
|
||||
|
||||
###########################################################################
|
||||
|
||||
log_debug()
|
||||
{
|
||||
log 'DEBUG' "$1"
|
||||
}
|
||||
|
||||
###########################################################################
|
||||
|
||||
log_info()
|
||||
{
|
||||
log 'INFO' "$1"
|
||||
echo "$1"
|
||||
}
|
||||
|
||||
###########################################################################
|
||||
|
||||
log_error()
|
||||
{
|
||||
log 'ERROR' "$1"
|
||||
echo "Error: $1"
|
||||
}
|
||||
|
||||
###########################################################################
|
||||
|
||||
quit()
|
||||
{
|
||||
exit_status="$1"
|
||||
|
||||
log_debug "-- $basename: finished (exit_status: $exit_status) --"
|
||||
|
||||
exit $exit_status
|
||||
}
|
114
mysql-test/suite/im/t/wait_for_process.sh
Executable file
114
mysql-test/suite/im/t/wait_for_process.sh
Executable file
@ -0,0 +1,114 @@
|
||||
#!/bin/sh
|
||||
|
||||
###########################################################################
|
||||
|
||||
# NOTE: this script returns 0 (success) even in case of failure (except for
|
||||
# usage-error). This is because this script is executed under
|
||||
# mysql-test-run[.pl] and it's better to examine particular problem in log
|
||||
# file, than just having said that the test case has failed.
|
||||
|
||||
###########################################################################
|
||||
|
||||
basename=`basename "$0"`
|
||||
dirname=`dirname "$0"`
|
||||
|
||||
###########################################################################
|
||||
|
||||
. "$dirname/utils.sh"
|
||||
|
||||
###########################################################################
|
||||
|
||||
check_started()
|
||||
{
|
||||
if [ ! -r "$pid_path" ]; then
|
||||
log_debug "No PID-file ($pid_path) found -- not started."
|
||||
return 1
|
||||
fi
|
||||
|
||||
new_pid=`cat "$pid_path" 2>/dev/null`
|
||||
err_code=$?
|
||||
|
||||
log_debug "err_code: $err_code; new_pid: $new_pid."
|
||||
|
||||
if [ $? -ne 0 -o -z "$new_pid" ]; then
|
||||
log_debug "The process was not started."
|
||||
return 1
|
||||
fi
|
||||
|
||||
log_debug "The process was started."
|
||||
return 0
|
||||
}
|
||||
|
||||
###########################################################################
|
||||
|
||||
check_stopped()
|
||||
{
|
||||
if [ -r "$pid_path" ]; then
|
||||
log_debug "PID-file '$pid_path' exists -- not stopped."
|
||||
return 1
|
||||
fi
|
||||
|
||||
log_debug "No PID-file ($pid_path) found -- stopped."
|
||||
return 0
|
||||
}
|
||||
|
||||
###########################################################################
|
||||
|
||||
if [ $# -ne 4 ]; then
|
||||
echo "Usage: $basename <pid file path> <total attempts> started|stopped <test id>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pid_path="$1"
|
||||
total_attempts="$2"
|
||||
event="$3"
|
||||
test_id="$4"
|
||||
log_file="$MYSQLTEST_VARDIR/log/$test_id.script.log"
|
||||
|
||||
log_debug "-- $basename: starting --"
|
||||
log_debug "pid_path: '$pid_path'"
|
||||
log_debug "total_attempts: '$total_attempts'"
|
||||
log_debug "event: '$event'"
|
||||
log_debug "test_id: '$test_id'"
|
||||
log_debug "log_file: '$log_file'"
|
||||
|
||||
###########################################################################
|
||||
|
||||
case "$event" in
|
||||
started)
|
||||
check_fn='check_started';
|
||||
;;
|
||||
|
||||
stopped)
|
||||
check_fn='check_stopped';
|
||||
;;
|
||||
|
||||
*)
|
||||
log_error "Invalid third argument ('started' or 'stopped' expected)."
|
||||
quit 0
|
||||
esac
|
||||
|
||||
###########################################################################
|
||||
|
||||
cur_attempt=1
|
||||
|
||||
while true; do
|
||||
|
||||
log_debug "cur_attempt: $cur_attempt."
|
||||
|
||||
if ( eval $check_fn ); then
|
||||
log_info "Success: the process has been $event."
|
||||
quit 0
|
||||
fi
|
||||
|
||||
[ $cur_attempt -ge $total_attempts ] && break
|
||||
|
||||
log_debug "Sleeping for 1 second..."
|
||||
sleep 1
|
||||
|
||||
cur_attempt=`expr $cur_attempt + 1`
|
||||
|
||||
done
|
||||
|
||||
log_error "The process has not been $event in $total_attempts secs."
|
||||
quit 0
|
94
mysql-test/suite/im/t/wait_for_socket.sh
Executable file
94
mysql-test/suite/im/t/wait_for_socket.sh
Executable file
@ -0,0 +1,94 @@
|
||||
#!/bin/sh
|
||||
|
||||
###########################################################################
|
||||
|
||||
# NOTE: this script returns 0 (success) even in case of failure (except for
|
||||
# usage-error). This is because this script is executed under
|
||||
# mysql-test-run[.pl] and it's better to examine particular problem in log
|
||||
# file, than just having said that the test case has failed.
|
||||
|
||||
###########################################################################
|
||||
|
||||
basename=`basename "$0"`
|
||||
dirname=`dirname "$0"`
|
||||
|
||||
###########################################################################
|
||||
|
||||
. "$dirname/utils.sh"
|
||||
|
||||
###########################################################################
|
||||
|
||||
if [ $# -ne 7 ]; then
|
||||
echo "Usage: wait_for_socket.sh <executable path> <socket path> <username> <password> <db> <timeout> <test id>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
client_exe="$1"
|
||||
socket_path="$2"
|
||||
username="$3"
|
||||
password="$4"
|
||||
db="$5"
|
||||
total_timeout="$6"
|
||||
test_id="$7"
|
||||
log_file="$MYSQLTEST_VARDIR/log/$test_id.script.log"
|
||||
|
||||
log_debug "-- $basename: starting --"
|
||||
log_debug "client_exe: '$client_exe'"
|
||||
log_debug "socket_path: '$socket_path'"
|
||||
log_debug "username: '$username'"
|
||||
log_debug "password: '$password'"
|
||||
log_debug "db: '$db'"
|
||||
log_debug "total_timeout: '$total_timeout'"
|
||||
log_debug "test_id: '$test_id'"
|
||||
log_debug "log_file: '$log_file'"
|
||||
|
||||
###########################################################################
|
||||
|
||||
if [ -z "$client_exe" ]; then
|
||||
log_error "Invalid path to client executable ($client_exe)."
|
||||
quit 0;
|
||||
fi
|
||||
|
||||
if [ ! -x "$client_exe" ]; then
|
||||
log_error "Client by path '$client_exe' is not available."
|
||||
quit 0;
|
||||
fi
|
||||
|
||||
if [ -z "$socket_path" ]; then
|
||||
log_error "Invalid socket patch ($socket_path)."
|
||||
quit 0
|
||||
fi
|
||||
|
||||
###########################################################################
|
||||
|
||||
client_args="--no-defaults --silent --socket=$socket_path --connect_timeout=1 "
|
||||
|
||||
[ -n "$username" ] && client_args="$client_args --user=$username "
|
||||
[ -n "$password" ] && client_args="$client_args --password=$password "
|
||||
[ -n "$db" ] && client_args="$client_args $db"
|
||||
|
||||
log_debug "client_args: '$client_args'"
|
||||
|
||||
###########################################################################
|
||||
|
||||
cur_attempt=1
|
||||
|
||||
while true; do
|
||||
|
||||
log_debug "cur_attempt: $cur_attempt."
|
||||
|
||||
if ( echo 'quit' | "$client_exe" $client_args >/dev/null 2>&1 ); then
|
||||
log_info "Success: server is ready to accept connection on socket."
|
||||
quit 0
|
||||
fi
|
||||
|
||||
[ $cur_attempt -ge $total_timeout ] && break
|
||||
|
||||
sleep 1
|
||||
|
||||
cur_attempt=`expr $cur_attempt + 1`
|
||||
|
||||
done
|
||||
|
||||
log_error "Server does not accept connections after $total_timeout seconds."
|
||||
quit 0
|
@ -22,4 +22,4 @@ ndb_partition_error2 : HF is not sure if the test can work as internded on all
|
||||
#ndb_binlog_ddl_multi : BUG#18976 2006-04-10 kent CRBR: multiple binlog, second binlog may miss schema log events
|
||||
#ndb_binlog_discover : bug#21806 2006-08-24
|
||||
#ndb_autodiscover3 : bug#21806
|
||||
ndb_autodiscover3 : Bug#20872 2007-07-15 ingo master*.err: miscellaneous error messages
|
||||
#ndb_autodiscover3 : Bug#20872 2007-07-15 ingo master*.err: miscellaneous error messages
|
||||
|
@ -17,6 +17,18 @@
|
||||
--echo --- All SQL functions should be rejected, otherwise BUG (see 18198)
|
||||
--echo -------------------------------------------------------------------------
|
||||
|
||||
let $sqlfunc = ascii(col1);
|
||||
let $valsqlfunc = ascii('a');
|
||||
let $coltype = char(30);
|
||||
--source suite/parts/inc/partition_blocked_sql_funcs.inc
|
||||
# --source include/partition_blocked_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = ord(col1);
|
||||
let $valsqlfunc = ord('a');
|
||||
let $coltype = char(30);
|
||||
--source suite/parts/inc/partition_blocked_sql_funcs.inc
|
||||
# --source include/partition_blocked_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = greatest(col1,15);
|
||||
let $valsqlfunc = greatest(1,15);
|
||||
let $coltype = int;
|
||||
@ -151,12 +163,6 @@ let $coltype = int;
|
||||
--source suite/parts/inc/partition_blocked_sql_funcs.inc
|
||||
# --source include/partition_blocked_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = datediff(col1,col1);
|
||||
let $valsqlfunc = datediff('1997-11-30 23:59:59','1997-12-31');
|
||||
let $coltype = datetime;
|
||||
--source suite/parts/inc/partition_blocked_sql_funcs.inc
|
||||
# --source include/partition_blocked_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = period_add(col1,5);
|
||||
let $valsqlfunc = period_add(9804,5);
|
||||
let $coltype = datetime;
|
||||
@ -190,6 +196,12 @@ let $coltype = datetime;
|
||||
--source suite/parts/inc/partition_blocked_sql_funcs.inc
|
||||
# --source include/partition_blocked_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = weekofyear(col1);
|
||||
let $valsqlfunc = weekofyear('2002-05-01');
|
||||
let $coltype = datetime;
|
||||
--source suite/parts/inc/partition_blocked_sql_funcs.inc
|
||||
# --source include/partition_blocked_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = cast(col1 as signed);
|
||||
let $valsqlfunc = cast(123 as signed);
|
||||
let $coltype = varchar(30);
|
||||
|
@ -1,4 +0,0 @@
|
||||
1 1
|
||||
2 9
|
||||
3 3
|
||||
4 8
|
@ -1,4 +0,0 @@
|
||||
1 2006-02-03
|
||||
2 2006-01-17
|
||||
3 2006-01-25
|
||||
4 2006-02-05
|
@ -1,4 +0,0 @@
|
||||
1 5.1230
|
||||
2 13.345
|
||||
3 17.987
|
||||
4 15.654
|
@ -1,45 +0,0 @@
|
||||
1 5
|
||||
2 13
|
||||
3 15
|
||||
4 17
|
||||
5 23
|
||||
6 34
|
||||
7 56
|
||||
8 56
|
||||
9 45
|
||||
10 34
|
||||
11 78
|
||||
12 89
|
||||
13 67
|
||||
14 46
|
||||
15 34
|
||||
16 324
|
||||
17 345
|
||||
18 34
|
||||
19 78
|
||||
20 567
|
||||
21 4
|
||||
22 435
|
||||
23 34
|
||||
24 45
|
||||
25 4565
|
||||
26 4
|
||||
27 3
|
||||
28 2
|
||||
29 3
|
||||
30 5
|
||||
31 6
|
||||
32 8
|
||||
33 9
|
||||
34 745
|
||||
35 34
|
||||
36 34
|
||||
37 324
|
||||
38 67
|
||||
39 78
|
||||
40 89
|
||||
41 90
|
||||
42 78967
|
||||
50 56
|
||||
51 34
|
||||
55 123
|
@ -1,4 +0,0 @@
|
||||
1 09:09:15.000002
|
||||
2 04:30:01.000018
|
||||
3 00:59:22.000024
|
||||
4 05:30:34.000037
|
@ -40,61 +40,42 @@ let $val4 = 15 ;
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
# --source include/partition_supported_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = ascii(col1);
|
||||
let $valsqlfunc = ascii('5');
|
||||
let $coltype = char(1);
|
||||
let $infile = part_supported_sql_funcs_int_ch1.inc;
|
||||
let $val1 = '1';
|
||||
let $val2 = '9';
|
||||
let $val3 = '3';
|
||||
let $val4 = '8';
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
# --source include/partition_supported_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = cast(ceiling(col1) as signed integer);
|
||||
let $valsqlfunc = cast(ceiling(15) as signed integer);
|
||||
let $sqlfunc = ceiling(col1);
|
||||
let $valsqlfunc = ceiling(15);
|
||||
let $coltype = float(7,4);
|
||||
let $infile = part_supported_sql_funcs_int_float.inc;
|
||||
let $val1 = 5.1230;
|
||||
let $val2 = 13.345;
|
||||
let $val3 = 17.987;
|
||||
let $val4 = 15.654 ;
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
# DISABLED due to bug 30577
|
||||
#--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
# --source include/partition_supported_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = cast(floor(col1) as signed);
|
||||
let $valsqlfunc = cast(floor(15.123) as signed);
|
||||
let $sqlfunc = floor(col1);
|
||||
let $valsqlfunc = floor(15.123);
|
||||
let $coltype = float(7,4);
|
||||
let $infile = part_supported_sql_funcs_int_float.inc;
|
||||
let $val1 = 5.1230;
|
||||
let $val2 = 13.345;
|
||||
let $val3 = 17.987;
|
||||
let $val4 = 15.654 ;
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
# DISABLED due to bug 30577
|
||||
#--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
# --source include/partition_supported_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = cast(mod(col1,10) as signed);
|
||||
let $valsqlfunc = cast(mod(15,10) as signed);
|
||||
let $coltype = float(7,4);
|
||||
let $infile = part_supported_sql_funcs_int_float.inc;
|
||||
let $val1 = 5.0000;
|
||||
let $sqlfunc = mod(col1,10);
|
||||
let $valsqlfunc = mod(15,10);
|
||||
let $coltype = int;
|
||||
let $infile = part_supported_sql_funcs_int_int.inc;
|
||||
let $val1 = 5;
|
||||
let $val2 = 19;
|
||||
let $val3 = 17;
|
||||
let $val4 = 15 ;
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
# --source include/partition_supported_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = ord(col1);
|
||||
let $valsqlfunc = ord('a');
|
||||
let $coltype = char(3);
|
||||
let $infile = part_supported_sql_funcs_int_ch1.inc;
|
||||
let $val1 = '1';
|
||||
let $val2 = '9';
|
||||
let $val3 = '3';
|
||||
let $val4 = '8';
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
# --source include/partition_supported_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = day(col1);
|
||||
let $valsqlfunc = day('2006-12-21');
|
||||
let $coltype = date;
|
||||
@ -243,6 +224,18 @@ let $val4 = '2006-02-06';
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
# --source include/partition_supported_sql_funcs.inc
|
||||
|
||||
# DATEDIFF() is implemented as (TO_DAYS(d1) - TO_DAYS(d2))
|
||||
let $sqlfunc = datediff(col1, '2006-01-01');
|
||||
let $valsqlfunc = datediff('2006-02-02', '2006-01-01');
|
||||
let $coltype = date;
|
||||
let $infile = part_supported_sql_funcs_int_date.inc;
|
||||
let $val1 = '2006-02-03';
|
||||
let $val2 = '2006-01-17';
|
||||
let $val3 = '2006-01-25';
|
||||
let $val4 = '2006-02-06';
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
# --source include/partition_supported_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = weekday(col1);
|
||||
let $valsqlfunc = weekday('2006-10-14');
|
||||
let $coltype = date;
|
||||
@ -254,17 +247,6 @@ let $val4 = '2006-02-06';
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
# --source include/partition_supported_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = weekofyear(col1);
|
||||
let $valsqlfunc = weekofyear('2006-02-14');
|
||||
let $coltype = date;
|
||||
let $infile = part_supported_sql_funcs_int_date.inc;
|
||||
let $val1 = '2006-01-03';
|
||||
let $val2 = '2006-03-17';
|
||||
let $val3 = '2006-05-25';
|
||||
let $val4 = '2006-09-06';
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
# --source include/partition_supported_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = year(col1)-1990;
|
||||
let $valsqlfunc = year('2005-10-14')-1990;
|
||||
let $coltype = date;
|
||||
|
@ -43,16 +43,16 @@ SELECT IF(9999 - 1000 + 1 > @max_row, @max_row , 9999 - 1000 + 1)
|
||||
ALTER TABLE t1 ADD PARTITION (PARTITION part2);
|
||||
#
|
||||
--echo # 1.1.2 Assign HASH partitioning
|
||||
ALTER TABLE t1 PARTITION BY HASH(CAST(YEAR(f_date) AS SIGNED INTEGER));
|
||||
ALTER TABLE t1 PARTITION BY HASH(YEAR(f_date));
|
||||
--source include/partition_layout.inc
|
||||
--source suite/parts/inc/partition_check_read1.inc
|
||||
#
|
||||
--echo # 1.1.3 Assign other HASH partitioning to already partitioned table
|
||||
--echo # + test and switch back + test
|
||||
ALTER TABLE t1 PARTITION BY HASH(CAST(f_varchar AS SIGNED INTEGER));
|
||||
ALTER TABLE t1 PARTITION BY HASH(DAYOFYEAR(f_date));
|
||||
--source include/partition_layout.inc
|
||||
--source suite/parts/inc/partition_check_read1.inc
|
||||
ALTER TABLE t1 PARTITION BY HASH(CAST(YEAR(f_date) AS SIGNED INTEGER));
|
||||
ALTER TABLE t1 PARTITION BY HASH(YEAR(f_date));
|
||||
--source include/partition_layout.inc
|
||||
--source suite/parts/inc/partition_check_read1.inc
|
||||
#
|
||||
|
@ -36,8 +36,9 @@
|
||||
eval $insert_first_half;
|
||||
# Possible/Expected return codes for ALTER TABLE ...
|
||||
# 0
|
||||
# 1491: A PRIMARY KEY need to include all fields in the partition function
|
||||
# A UNIQUE INDEX need to include all fields in the partition function
|
||||
# 1030: ER_GET_ERRNO
|
||||
# 1500: ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF
|
||||
# 1504: ER_DROP_PARTITION_NON_EXISTENT
|
||||
--disable_abort_on_error
|
||||
eval $alter;
|
||||
--enable_abort_on_error
|
||||
@ -47,11 +48,11 @@ if ($no_debug)
|
||||
}
|
||||
eval SET @my_errno = $mysql_errno;
|
||||
let $run_test= `SELECT @my_errno = 0`;
|
||||
let $unexpected_error= `SELECT @my_errno NOT IN (0,1030,1491,1495)`;
|
||||
let $unexpected_error= `SELECT @my_errno NOT IN (0,1030,1500,1504)`;
|
||||
if ($unexpected_error)
|
||||
{
|
||||
--echo # The last command got an unexepected error response.
|
||||
--echo # Expected/handled SQL codes are 0,1030,1491,1495
|
||||
--echo # Expected/handled SQL codes are 0,1030,1500,1504
|
||||
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
|
||||
--echo # Sorry, have to abort.
|
||||
exit;
|
||||
|
@ -15,8 +15,7 @@
|
||||
--echo -------------------------------------------------------------------------
|
||||
--echo --- $sqlfunc in partition with coltype $coltype
|
||||
--echo -------------------------------------------------------------------------
|
||||
--echo must all fail! (delete 0 and comment char, if bug fixed)
|
||||
--disable_abort_on_error
|
||||
--echo must all fail!
|
||||
--disable_warnings
|
||||
drop table if exists t1 ;
|
||||
drop table if exists t2 ;
|
||||
@ -26,32 +25,31 @@ drop table if exists t5 ;
|
||||
drop table if exists t6 ;
|
||||
--enable_warnings
|
||||
|
||||
#--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
eval create table t1 (col1 $coltype) engine=$engine
|
||||
partition by range($sqlfunc)
|
||||
(partition p0 values less than (15),
|
||||
partition p1 values less than (31));
|
||||
|
||||
#--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
eval create table t2 (col1 $coltype) engine=$engine
|
||||
partition by list($sqlfunc)
|
||||
(partition p0 values in (1,2,3,4,5,6,7,8,9,10),
|
||||
partition p1 values in (11,12,13,14,15,16,17,18,19,20),
|
||||
partition p2 values in (21,22,23,24,25,26,27,28,29,30));
|
||||
|
||||
#--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
eval create table t3 (col1 $coltype) engine=$engine
|
||||
partition by hash($sqlfunc);
|
||||
--enable_abort_on_error
|
||||
|
||||
--error 0,ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
eval create table t4 (colint int, col1 $coltype) engine=$engine
|
||||
partition by range(colint)
|
||||
subpartition by hash($sqlfunc) subpartitions 2
|
||||
(partition p0 values less than (15),
|
||||
partition p1 values less than (31));
|
||||
|
||||
--error 0,ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
eval create table t5 (colint int, col1 $coltype) engine=$engine
|
||||
partition by list(colint)
|
||||
subpartition by hash($sqlfunc) subpartitions 2
|
||||
@ -59,7 +57,7 @@ subpartition by hash($sqlfunc) subpartitions 2
|
||||
partition p1 values in (11,12,13,14,15,16,17,18,19,20),
|
||||
partition p2 values in (21,22,23,24,25,26,27,28,29,30));
|
||||
|
||||
--error 0,ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
eval create table t6 (colint int, col1 $coltype) engine=$engine
|
||||
partition by range(colint)
|
||||
(partition p0 values less than ($valsqlfunc),
|
||||
@ -75,50 +73,44 @@ drop table if exists t55 ;
|
||||
drop table if exists t66 ;
|
||||
--enable_warnings
|
||||
|
||||
#--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
eval create table t11 (col1 $coltype) engine=$engine ;
|
||||
|
||||
#--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
eval create table t22 (col1 $coltype) engine=$engine ;
|
||||
|
||||
#--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
eval create table t33 (col1 $coltype) engine=$engine ;
|
||||
|
||||
--error 0,ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
eval create table t44 (colint int, col1 $coltype) engine=$engine ;
|
||||
|
||||
--error 0,ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
eval create table t55 (colint int, col1 $coltype) engine=$engine ;
|
||||
|
||||
--error 0,ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
eval create table t66 (colint int, col1 $coltype) engine=$engine ;
|
||||
|
||||
#--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
eval alter table t11
|
||||
partition by range($sqlfunc)
|
||||
(partition p0 values less than (15),
|
||||
partition p1 values less than (31));
|
||||
|
||||
#--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
eval alter table t22
|
||||
partition by list($sqlfunc)
|
||||
(partition p0 values in (1,2,3,4,5,6,7,8,9,10),
|
||||
partition p1 values in (11,12,13,14,15,16,17,18,19,20),
|
||||
partition p2 values in (21,22,23,24,25,26,27,28,29,30));
|
||||
|
||||
#--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
eval alter table t33
|
||||
partition by hash($sqlfunc);
|
||||
--enable_abort_on_error
|
||||
|
||||
--error 0,ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
eval alter table t44
|
||||
partition by range(colint)
|
||||
subpartition by hash($sqlfunc) subpartitions 2
|
||||
(partition p0 values less than (15),
|
||||
partition p1 values less than (31));
|
||||
|
||||
--error 0,ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
eval alter table t55
|
||||
partition by list(colint)
|
||||
subpartition by hash($sqlfunc) subpartitions 2
|
||||
@ -126,7 +118,7 @@ subpartition by hash($sqlfunc) subpartitions 2
|
||||
partition p1 values in (11,12,13,14,15,16,17,18,19,20),
|
||||
partition p2 values in (21,22,23,24,25,26,27,28,29,30));
|
||||
|
||||
--error 0,ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
|
||||
eval alter table t66
|
||||
partition by range(colint)
|
||||
(partition p0 values less than ($valsqlfunc),
|
||||
|
@ -156,8 +156,8 @@ if ($run)
|
||||
# partitioning mechanism.
|
||||
# Sideeffect: Attempt to INSERT one record
|
||||
# DUPLICATE KEY will appear if we have UNIQUE columns
|
||||
# 1022: Can't write; duplicate key in table 't1' UIDX/PK(f_int1)
|
||||
# 1062: Duplicate entry '2' for key 1 UIDX/PK(f_int2)
|
||||
# 1022: ER_DUP_KEY
|
||||
# 1062: ER_DUP_ENTRY
|
||||
--disable_abort_on_error
|
||||
INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
|
||||
SELECT f_int1, f_int1, CAST(f_int1 AS CHAR),
|
||||
@ -200,7 +200,8 @@ if ($any_unique)
|
||||
## 1.3.1 Check, if f_int1 is UNIQUE
|
||||
# Sideeffect: Attempt to INSERT one record
|
||||
# DUPLICATE KEY will appear if we have UNIQUE columns
|
||||
# 1022: Can't write; duplicate key in table 't1' UIDX/PK
|
||||
# 1022: ER_DUP_KEY
|
||||
# 1062: ER_DUP_ENTRY
|
||||
--disable_abort_on_error
|
||||
INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
|
||||
SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR),
|
||||
@ -494,8 +495,9 @@ WHERE f_charbig = '#SINGLE#' AND f_int1 IN (-1,@cur_value);
|
||||
# 4.7 Insert one record with such a big value for f_int1, so that in case
|
||||
# - f_int1 is used within the partitioning algorithm
|
||||
# - we use range partitioning
|
||||
# we get error ER_NO_PARTITION_FOR_GIVEN_VALUE (1514)
|
||||
# we get error ER_NO_PARTITION_FOR_GIVEN_VALUE (1523)
|
||||
# "Table has no partition for value ...."
|
||||
# or ER_SAME_NAME_PARTITION (1514)
|
||||
--disable_abort_on_error
|
||||
eval INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#$max_int_4##';
|
||||
--enable_abort_on_error
|
||||
@ -504,11 +506,11 @@ if ($no_debug)
|
||||
--disable_query_log
|
||||
}
|
||||
eval SET @my_errno = $mysql_errno;
|
||||
let $unexpected_error= `SELECT @my_errno NOT IN (0,1505,1514)`;
|
||||
let $unexpected_error= `SELECT @my_errno NOT IN (0,1514,1523)`;
|
||||
if ($unexpected_error)
|
||||
{
|
||||
--echo # The last command got an unexepected error response.
|
||||
--echo # Expected/handled SQL codes are 0,1514
|
||||
--echo # Expected/handled SQL codes are 0,1514,1523
|
||||
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
|
||||
--echo # Sorry, have to abort.
|
||||
exit;
|
||||
@ -555,8 +557,8 @@ INSERT t1 SET f_int1 = 0 , f_int2 = 0,
|
||||
# f1 "=" NULL is a delicate value which might stress the partitioning
|
||||
# mechanism if the result of the expression in the partitioning algorithm
|
||||
# becomes NULL.
|
||||
# Not: This INSERT will fail, if f_int1 is PRIMARY KEY or UNIQUE INDEX
|
||||
# 1048: Column 'f_int1' cannot be null
|
||||
# This INSERT will fail, if f_int1 is PRIMARY KEY or UNIQUE INDEX
|
||||
# 1048: ER_BAD_NULL_ERROR
|
||||
--disable_abort_on_error
|
||||
|
||||
INSERT INTO t1
|
||||
|
@ -49,7 +49,7 @@ select * from t2;
|
||||
drop table t2;
|
||||
|
||||
eval create table t3 (a date not null, primary key(a)) engine=$engine
|
||||
partition by range (cast(month(a) as unsigned)) subpartition by key (a)
|
||||
partition by range (month(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values less than (4),
|
||||
partition quarter2 values less than (7),
|
||||
@ -69,7 +69,7 @@ select * from t3;
|
||||
drop table t3;
|
||||
|
||||
eval create table t4 (a date not null, primary key(a)) engine=$engine
|
||||
partition by list (cast(month(a) as unsigned)) subpartition by key (a)
|
||||
partition by list (month(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values in (1,2,3),
|
||||
partition quarter2 values in (4,5,6),
|
||||
|
@ -46,7 +46,7 @@ select * from t2;
|
||||
drop table t2;
|
||||
|
||||
eval create table t3 (a datetime not null, primary key(a)) engine=$engine
|
||||
partition by range (cast(month(a) as unsigned)) subpartition by key (a)
|
||||
partition by range (month(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values less than (4),
|
||||
partition quarter2 values less than (7),
|
||||
@ -66,7 +66,7 @@ select * from t3;
|
||||
drop table t3;
|
||||
|
||||
eval create table t4 (a datetime not null, primary key(a)) engine=$engine
|
||||
partition by list (cast(month(a) as unsigned)) subpartition by key (a)
|
||||
partition by list (month(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values in (1,2,3),
|
||||
partition quarter2 values in (4,5,6),
|
||||
|
@ -47,8 +47,15 @@ dec $count;
|
||||
select count(*) from t2;
|
||||
drop table t2;
|
||||
|
||||
# Bug 30577: FLOOR() and CEILING() not usable as partition functions
|
||||
# Partition functions are required to return INT_RESULT; FLOOR() and
|
||||
# CEILING() do not, unless they have an INT argument. Disable this
|
||||
# portion of the test until bug 30577 is fixed.
|
||||
|
||||
--disable_parsing
|
||||
|
||||
eval create table t3 (a decimal(18,9) not null, primary key(a)) engine=$engine
|
||||
partition by range (cast(floor(a) as signed)) subpartition by key (a) subpartitions 2 (
|
||||
partition by range (floor(a)) subpartition by key (a) subpartitions 2 (
|
||||
partition pa2 values less than (2),
|
||||
partition pa4 values less than (4),
|
||||
partition pa6 values less than (6),
|
||||
@ -70,7 +77,7 @@ select count(*) from t3;
|
||||
drop table t3;
|
||||
|
||||
eval create table t4 (a decimal(18,9) not null, primary key(a)) engine=$engine
|
||||
partition by list (cast(floor(a) as signed)) subpartition by key (a) subpartitions 2 (
|
||||
partition by list (floor(a)) subpartition by key (a) subpartitions 2 (
|
||||
partition pa2 values in (1,2),
|
||||
partition pa4 values in (3,4),
|
||||
partition pa6 values in (5,6),
|
||||
@ -90,3 +97,6 @@ dec $count;
|
||||
--enable_query_log
|
||||
select count(*) from t4;
|
||||
drop table t4;
|
||||
|
||||
# Disabled due to Bug 30577
|
||||
--enable_parsing
|
||||
|
@ -29,9 +29,9 @@ let $partitioning= ;
|
||||
if ($with_partitioning)
|
||||
{
|
||||
let $partitioning= PARTITION BY HASH(f_int1) PARTITIONS 2;
|
||||
--disable_query_log
|
||||
if ($with_directories)
|
||||
{
|
||||
--disable_query_log
|
||||
eval SET @aux =
|
||||
'PARTITION BY HASH(f_int1) PARTITIONS 2
|
||||
(PARTITION p1
|
||||
@ -39,7 +39,6 @@ $index_directory,
|
||||
PARTITION p2
|
||||
$index_directory)';
|
||||
let $partitioning= `SELECT @aux`;
|
||||
--enable_query_log
|
||||
}
|
||||
}
|
||||
eval CREATE TABLE t1 (
|
||||
@ -47,6 +46,7 @@ $column_list
|
||||
$unique
|
||||
)
|
||||
$partitioning;
|
||||
--enable_query_log
|
||||
eval $insert_all;
|
||||
--source suite/parts/inc/partition_check.inc
|
||||
# --source include/partition_check.inc
|
||||
@ -54,9 +54,9 @@ DROP TABLE t1;
|
||||
--source suite/parts/inc/partition_check_drop.inc
|
||||
|
||||
#----------- PARTITION BY KEY
|
||||
--disable_query_log
|
||||
if ($with_partitioning)
|
||||
{
|
||||
--disable_query_log
|
||||
eval SET @aux =
|
||||
'PARTITION BY KEY(f_int1) PARTITIONS 5';
|
||||
let $partitioning= `SELECT @aux`;
|
||||
@ -76,7 +76,6 @@ PARTITION p4,
|
||||
PARTITION p5
|
||||
$index_directory)';
|
||||
let $partitioning= `SELECT @aux`;
|
||||
--enable_query_log
|
||||
}
|
||||
}
|
||||
eval CREATE TABLE t1 (
|
||||
@ -84,6 +83,7 @@ $column_list
|
||||
$unique
|
||||
)
|
||||
$partitioning;
|
||||
--enable_query_log
|
||||
eval $insert_all;
|
||||
--source suite/parts/inc/partition_check.inc
|
||||
# --source include/partition_check.inc
|
||||
@ -91,9 +91,9 @@ DROP TABLE t1;
|
||||
--source suite/parts/inc/partition_check_drop.inc
|
||||
|
||||
#----------- PARTITION BY LIST
|
||||
--disable_query_log
|
||||
if ($with_partitioning)
|
||||
{
|
||||
--disable_query_log
|
||||
eval SET @aux =
|
||||
'PARTITION BY LIST(MOD(f_int1,4))
|
||||
(PARTITION part_3 VALUES IN (-3)
|
||||
@ -119,6 +119,7 @@ $column_list
|
||||
$unique
|
||||
)
|
||||
$partitioning;
|
||||
--enable_query_log
|
||||
eval $insert_all;
|
||||
--source suite/parts/inc/partition_check.inc
|
||||
# --source include/partition_check.inc
|
||||
@ -126,9 +127,9 @@ DROP TABLE t1;
|
||||
--source suite/parts/inc/partition_check_drop.inc
|
||||
|
||||
#----------- PARTITION BY RANGE
|
||||
--disable_query_log
|
||||
if ($with_partitioning)
|
||||
{
|
||||
#--disable_query_log
|
||||
eval SET @aux = 'PARTITION BY RANGE(f_int1)
|
||||
(PARTITION parta VALUES LESS THAN (0)
|
||||
$index_directory,
|
||||
@ -143,13 +144,13 @@ $data_directory,
|
||||
PARTITION partf VALUES LESS THAN $MAX_VALUE
|
||||
$index_directory)';
|
||||
let $partitioning= `SELECT @aux`;
|
||||
#--enable_query_log
|
||||
}
|
||||
eval CREATE TABLE t1 (
|
||||
$column_list
|
||||
$unique
|
||||
)
|
||||
$partitioning;
|
||||
--enable_query_log
|
||||
eval $insert_all;
|
||||
--source suite/parts/inc/partition_check.inc
|
||||
# --source include/partition_check.inc
|
||||
@ -157,9 +158,9 @@ DROP TABLE t1;
|
||||
--source suite/parts/inc/partition_check_drop.inc
|
||||
|
||||
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
|
||||
--disable_query_log
|
||||
if ($with_partitioning)
|
||||
{
|
||||
--disable_query_log
|
||||
eval SET @aux =
|
||||
'PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
|
||||
(PARTITION parta VALUES LESS THAN (0)
|
||||
@ -171,13 +172,13 @@ PARTITION partd VALUES LESS THAN $MAX_VALUE
|
||||
$data_directory
|
||||
$index_directory)';
|
||||
let $partitioning= `SELECT @aux`;
|
||||
--enable_query_log
|
||||
}
|
||||
eval CREATE TABLE t1 (
|
||||
$column_list
|
||||
$unique
|
||||
)
|
||||
$partitioning;
|
||||
--enable_query_log
|
||||
eval $insert_all;
|
||||
--source suite/parts/inc/partition_check.inc
|
||||
# --source include/partition_check.inc
|
||||
@ -185,9 +186,9 @@ DROP TABLE t1;
|
||||
--source suite/parts/inc/partition_check_drop.inc
|
||||
|
||||
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
|
||||
--disable_query_log
|
||||
if ($with_partitioning)
|
||||
{
|
||||
--disable_query_log
|
||||
eval SET @aux = 'PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1)
|
||||
(PARTITION part1 VALUES LESS THAN (0)
|
||||
$data_directory
|
||||
@ -202,13 +203,13 @@ $index_directory
|
||||
PARTITION part4 VALUES LESS THAN $MAX_VALUE
|
||||
(SUBPARTITION subpart41, SUBPARTITION subpart42))';
|
||||
let $partitioning= `SELECT @aux`;
|
||||
--enable_query_log
|
||||
}
|
||||
eval CREATE TABLE t1 (
|
||||
$column_list
|
||||
$unique
|
||||
)
|
||||
$partitioning;
|
||||
--enable_query_log
|
||||
eval $insert_all;
|
||||
--source suite/parts/inc/partition_check.inc
|
||||
# --source include/partition_check.inc
|
||||
@ -216,9 +217,9 @@ DROP TABLE t1;
|
||||
--source suite/parts/inc/partition_check_drop.inc
|
||||
|
||||
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH
|
||||
--disable_query_log
|
||||
if ($with_partitioning)
|
||||
{
|
||||
--disable_query_log
|
||||
eval SET @aux =
|
||||
'PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1)
|
||||
(PARTITION part1 VALUES IN (0)
|
||||
@ -246,13 +247,13 @@ eval SET @aux =
|
||||
$data_directory
|
||||
$index_directory))';
|
||||
let $partitioning= `SELECT @aux`;
|
||||
--enable_query_log
|
||||
}
|
||||
eval CREATE TABLE t1 (
|
||||
$column_list
|
||||
$unique
|
||||
)
|
||||
$partitioning;
|
||||
--enable_query_log
|
||||
eval $insert_all;
|
||||
--source suite/parts/inc/partition_check.inc
|
||||
# --source include/partition_check.inc
|
||||
|
@ -48,8 +48,15 @@ select count(*) from t2;
|
||||
drop table t2;
|
||||
|
||||
|
||||
# Bug 30577: FLOOR() and CEILING() not usable as partition functions
|
||||
# Partition functions are required to return INT_RESULT; FLOOR() and
|
||||
# CEILING() do not, unless they have an INT argument. Disable this
|
||||
# portion of the test until bug 30577 is fixed.
|
||||
|
||||
--disable_parsing
|
||||
|
||||
eval create table t3 (a double not null, primary key(a)) engine=$engine
|
||||
partition by range (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 (
|
||||
partition by range (floor(a)) subpartition by key (a) subpartitions 3 (
|
||||
partition pa1 values less than (3),
|
||||
partition pa3 values less than (6),
|
||||
partition pa10 values less than (10)
|
||||
@ -69,7 +76,7 @@ select * from t3;
|
||||
drop table t3;
|
||||
|
||||
eval create table t4 (a double not null, primary key(a)) engine=$engine
|
||||
partition by list (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 (
|
||||
partition by list (floor(a)) subpartition by key (a) subpartitions 3 (
|
||||
partition pa1 values in (1,2,3),
|
||||
partition pa3 values in (4,5,6),
|
||||
partition pa10 values in (7,8,9,10)
|
||||
@ -87,3 +94,6 @@ dec $count;
|
||||
select count(*) from t4;
|
||||
select * from t4;
|
||||
drop table t4;
|
||||
|
||||
# Disabled due to Bug 30577
|
||||
--enable_parsing
|
||||
|
@ -53,7 +53,7 @@ eval create table t3 (a enum (
|
||||
'M','N','O','P','Q','R','S','T','U','V','W','X',
|
||||
'Y','Z'
|
||||
) not null, primary key(a)) engine=$engine
|
||||
partition by range (cast(a as unsigned)) subpartition by key (a) subpartitions 3 (
|
||||
partition by range (a) subpartition by key (a) subpartitions 3 (
|
||||
partition pa9 values less than (10),
|
||||
partition pa18 values less than (19),
|
||||
partition pa27 values less than (28),
|
||||
@ -72,28 +72,3 @@ select count(*) from t3;
|
||||
select * from t3;
|
||||
drop table t3;
|
||||
|
||||
eval create table t4 (a enum (
|
||||
'1','2','3','4','5','6','7','8','9','0',
|
||||
'A','B','C','D','E','F','G','H','I','J','K','L',
|
||||
'M','N','O','P','Q','R','S','T','U','V','W','X',
|
||||
'Y','Z'
|
||||
) not null, primary key(a)) engine=$engine
|
||||
partition by list (cast(a as unsigned)) subpartition by key (a) subpartitions 3 (
|
||||
partition pa9 values in (1,2,3,4,5,6,7,8,9),
|
||||
partition pa18 values in (10,11,12,13,14,15,16,17,18),
|
||||
partition pa27 values in (19,20,21,22,23,24,25,26,27),
|
||||
partition pa36 values in (28,29,30,31,32,33,34,35,36)
|
||||
);
|
||||
show create table t4;
|
||||
let $letter=36;
|
||||
--echo $count inserts;
|
||||
#--disable_query_log
|
||||
while ($letter)
|
||||
{
|
||||
#eval insert into t4 values ($letter);
|
||||
dec $letter;
|
||||
}
|
||||
select count(*) from t4;
|
||||
select * from t4;
|
||||
drop table t4;
|
||||
|
||||
|
@ -51,8 +51,15 @@ dec $count;
|
||||
select count(*) from t2;
|
||||
drop table t2;
|
||||
|
||||
# Bug 30577: FLOOR() and CEILING() not usable as partition functions
|
||||
# Partition functions are required to return INT_RESULT; FLOOR() and
|
||||
# CEILING() do not, unless they have an INT argument. Disable this
|
||||
# portion of the test until bug 30577 is fixed.
|
||||
|
||||
--disable_parsing
|
||||
|
||||
eval create table t3 (a float not null, primary key(a)) engine=$engine
|
||||
partition by range (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 (
|
||||
partition by range (floor(a)) subpartition by key (a) subpartitions 3 (
|
||||
partition pa1 values less than (3),
|
||||
partition pa3 values less than (6),
|
||||
partition pa10 values less than (10)
|
||||
@ -72,7 +79,7 @@ select * from t3;
|
||||
drop table t3;
|
||||
|
||||
eval create table t4 (a float not null, primary key(a)) engine=$engine
|
||||
partition by list (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 (
|
||||
partition by list (floor(a)) subpartition by key (a) subpartitions 3 (
|
||||
partition pa1 values in (1,2,3),
|
||||
partition pa3 values in (4,5,6),
|
||||
partition pa10 values in (7,8,9,10)
|
||||
@ -90,3 +97,6 @@ dec $count;
|
||||
select count(*) from t4;
|
||||
select * from t4;
|
||||
drop table t4;
|
||||
|
||||
# Disabled due to Bug 30577
|
||||
--enable_parsing
|
||||
|
@ -56,6 +56,7 @@ eval INSERT INTO t0_definition SET state = 'old',
|
||||
file_list = $file_list;
|
||||
|
||||
# Print the create table statement into the protocol
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
SELECT create_command FROM t0_definition WHERE state = 'old';
|
||||
if ($do_file_tests)
|
||||
{
|
||||
|
@ -55,6 +55,7 @@ let $run= `SELECT @aux`;
|
||||
if ($run)
|
||||
{
|
||||
--vertical_results
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
SELECT state,
|
||||
REPLACE(create_command,'\n',' ') AS "Table definition",
|
||||
REPLACE(file_list ,'\n',' ') AS "File list"
|
||||
|
@ -44,9 +44,9 @@ let $partitioning= ;
|
||||
if ($with_partitioning)
|
||||
{
|
||||
let $partitioning= PARTITION BY HASH(f_int1) PARTITIONS 2;
|
||||
--disable_query_log
|
||||
if ($with_directories)
|
||||
{
|
||||
--disable_query_log
|
||||
eval SET @aux =
|
||||
'PARTITION BY HASH(f_int1) PARTITIONS 2
|
||||
(PARTITION p1
|
||||
@ -56,7 +56,6 @@ PARTITION p2
|
||||
$data_directory
|
||||
$index_directory)';
|
||||
let $partitioning= `SELECT @aux`;
|
||||
--enable_query_log
|
||||
}
|
||||
}
|
||||
eval CREATE TABLE t1 (
|
||||
@ -64,6 +63,7 @@ $column_list
|
||||
$unique
|
||||
)
|
||||
$partitioning;
|
||||
--enable_query_log
|
||||
eval $insert_all;
|
||||
--source suite/parts/inc/partition_check.inc
|
||||
# --source include/partition_check.inc
|
||||
@ -71,15 +71,14 @@ DROP TABLE t1;
|
||||
--source suite/parts/inc/partition_check_drop.inc
|
||||
|
||||
#----------- PARTITION BY KEY
|
||||
--disable_query_log
|
||||
if ($with_partitioning)
|
||||
{
|
||||
--disable_query_log
|
||||
eval SET @aux =
|
||||
'PARTITION BY KEY(f_int1) PARTITIONS 5';
|
||||
let $partitioning= `SELECT @aux`;
|
||||
if ($with_directories)
|
||||
{
|
||||
--disable_query_log
|
||||
eval SET @aux =
|
||||
'PARTITION BY HASH(f_int1) PARTITIONS 5
|
||||
(PARTITION p1
|
||||
@ -98,7 +97,6 @@ PARTITION p5
|
||||
$data_directory
|
||||
$index_directory)';
|
||||
let $partitioning= `SELECT @aux`;
|
||||
--enable_query_log
|
||||
}
|
||||
}
|
||||
eval CREATE TABLE t1 (
|
||||
@ -106,6 +104,7 @@ $column_list
|
||||
$unique
|
||||
)
|
||||
$partitioning;
|
||||
--enable_query_log
|
||||
eval $insert_all;
|
||||
--source suite/parts/inc/partition_check.inc
|
||||
# --source include/partition_check.inc
|
||||
@ -113,9 +112,9 @@ DROP TABLE t1;
|
||||
--source suite/parts/inc/partition_check_drop.inc
|
||||
|
||||
#----------- PARTITION BY LIST
|
||||
--disable_query_log
|
||||
if ($with_partitioning)
|
||||
{
|
||||
--disable_query_log
|
||||
eval SET @aux =
|
||||
'PARTITION BY LIST(MOD(f_int1,4))
|
||||
(PARTITION part_3 VALUES IN (-3)
|
||||
@ -141,6 +140,7 @@ $column_list
|
||||
$unique
|
||||
)
|
||||
$partitioning;
|
||||
--enable_query_log
|
||||
eval $insert_all;
|
||||
--source suite/parts/inc/partition_check.inc
|
||||
# --source include/partition_check.inc
|
||||
@ -148,9 +148,9 @@ DROP TABLE t1;
|
||||
--source suite/parts/inc/partition_check_drop.inc
|
||||
|
||||
#----------- PARTITION BY RANGE
|
||||
--disable_query_log
|
||||
if ($with_partitioning)
|
||||
{
|
||||
#--disable_query_log
|
||||
eval SET @aux = 'PARTITION BY RANGE(f_int1)
|
||||
(PARTITION parta VALUES LESS THAN (0)
|
||||
$data_directory
|
||||
@ -171,13 +171,13 @@ PARTITION partf VALUES LESS THAN $MAX_VALUE
|
||||
$data_directory
|
||||
$index_directory)';
|
||||
let $partitioning= `SELECT @aux`;
|
||||
#--enable_query_log
|
||||
}
|
||||
eval CREATE TABLE t1 (
|
||||
$column_list
|
||||
$unique
|
||||
)
|
||||
$partitioning;
|
||||
--enable_query_log
|
||||
eval $insert_all;
|
||||
--source suite/parts/inc/partition_check.inc
|
||||
# --source include/partition_check.inc
|
||||
@ -185,9 +185,9 @@ DROP TABLE t1;
|
||||
--source suite/parts/inc/partition_check_drop.inc
|
||||
|
||||
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
|
||||
--disable_query_log
|
||||
if ($with_partitioning)
|
||||
{
|
||||
--disable_query_log
|
||||
eval SET @aux =
|
||||
'PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
|
||||
(PARTITION parta VALUES LESS THAN (0)
|
||||
@ -203,13 +203,13 @@ PARTITION partd VALUES LESS THAN $MAX_VALUE
|
||||
$data_directory
|
||||
$index_directory)';
|
||||
let $partitioning= `SELECT @aux`;
|
||||
--enable_query_log
|
||||
}
|
||||
eval CREATE TABLE t1 (
|
||||
$column_list
|
||||
$unique
|
||||
)
|
||||
$partitioning;
|
||||
--enable_query_log
|
||||
eval $insert_all;
|
||||
--source suite/parts/inc/partition_check.inc
|
||||
# --source include/partition_check.inc
|
||||
@ -217,9 +217,9 @@ DROP TABLE t1;
|
||||
--source suite/parts/inc/partition_check_drop.inc
|
||||
|
||||
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
|
||||
--disable_query_log
|
||||
if ($with_partitioning)
|
||||
{
|
||||
--disable_query_log
|
||||
eval SET @aux = 'PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1)
|
||||
(PARTITION part1 VALUES LESS THAN (0)
|
||||
$data_directory
|
||||
@ -238,13 +238,13 @@ $data_directory
|
||||
$index_directory
|
||||
(SUBPARTITION subpart41, SUBPARTITION subpart42))';
|
||||
let $partitioning= `SELECT @aux`;
|
||||
--enable_query_log
|
||||
}
|
||||
eval CREATE TABLE t1 (
|
||||
$column_list
|
||||
$unique
|
||||
)
|
||||
$partitioning;
|
||||
--enable_query_log
|
||||
eval $insert_all;
|
||||
--source suite/parts/inc/partition_check.inc
|
||||
# --source include/partition_check.inc
|
||||
@ -252,9 +252,9 @@ DROP TABLE t1;
|
||||
--source suite/parts/inc/partition_check_drop.inc
|
||||
|
||||
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH
|
||||
--disable_query_log
|
||||
if ($with_partitioning)
|
||||
{
|
||||
--disable_query_log
|
||||
eval SET @aux =
|
||||
'PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1)
|
||||
(PARTITION part1 VALUES IN (0)
|
||||
@ -290,13 +290,13 @@ eval SET @aux =
|
||||
$data_directory
|
||||
$index_directory))';
|
||||
let $partitioning= `SELECT @aux`;
|
||||
--enable_query_log
|
||||
}
|
||||
eval CREATE TABLE t1 (
|
||||
$column_list
|
||||
$unique
|
||||
)
|
||||
$partitioning;
|
||||
--enable_query_log
|
||||
eval $insert_all;
|
||||
--source suite/parts/inc/partition_check.inc
|
||||
# --source include/partition_check.inc
|
||||
@ -304,9 +304,9 @@ DROP TABLE t1;
|
||||
--source suite/parts/inc/partition_check_drop.inc
|
||||
|
||||
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY
|
||||
--disable_query_log
|
||||
if ($with_partitioning)
|
||||
{
|
||||
--disable_query_log
|
||||
eval SET @aux =
|
||||
'PARTITION BY LIST(ABS(MOD(f_int1,2)))
|
||||
SUBPARTITION BY KEY(f_int1) SUBPARTITIONS $sub_part_no
|
||||
@ -320,13 +320,13 @@ SUBPARTITION BY KEY(f_int1) SUBPARTITIONS $sub_part_no
|
||||
$data_directory
|
||||
$index_directory)';
|
||||
let $partitioning= `SELECT @aux`;
|
||||
--enable_query_log
|
||||
}
|
||||
eval CREATE TABLE t1 (
|
||||
$column_list
|
||||
$unique
|
||||
)
|
||||
$partitioning;
|
||||
--enable_query_log
|
||||
eval $insert_all;
|
||||
--source suite/parts/inc/partition_check.inc
|
||||
# --source include/partition_check.inc
|
||||
|
@ -43,41 +43,3 @@ insert into t2 values ('1,2,3'),('2,3,4'),('3,4,5'),('4,5,6'),('5,6,7'),('6,7,8'
|
||||
select count(*) from t2;
|
||||
select * from t2 order by a;
|
||||
drop table t2;
|
||||
|
||||
eval create table t3 (a set (
|
||||
'1','2','3','4','5','6','7','8','9','0'
|
||||
) not null, primary key(a)) engine=$engine
|
||||
partition by range (cast(a as unsigned)) subpartition by key (a) subpartitions 3 (
|
||||
partition pa9 values less than (10),
|
||||
partition pa18 values less than (19),
|
||||
partition pa27 values less than (28),
|
||||
partition pa36 values less than (37),
|
||||
partition pa64 values less than (65),
|
||||
partition pa128 values less than (129),
|
||||
partition pa256 values less than (257),
|
||||
partition pa512 values less than (513),
|
||||
partition pa768 values less than (769),
|
||||
partition pa1024 values less than (1025)
|
||||
);
|
||||
show create table t3;
|
||||
#insert into t3 values ('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9'),('0');
|
||||
#insert into t3 values ('1,2'),('2,3'),('3,4'),('4,5'),('5,6'),('6,7'),('7,8'),('8,9'),('9,0'),('0,1');
|
||||
#insert into t3 values ('1,2,3'),('2,3,4'),('3,4,5'),('4,5,6'),('5,6,7'),('6,7,8'),('7,8,9'),('8,9,0'),('9,0,1'),('0,1,2');
|
||||
select count(*) from t3;
|
||||
select * from t3 order by a;
|
||||
drop table t3;
|
||||
|
||||
eval create table t4 (a set (
|
||||
'1','2','3') not null, primary key(a)) engine=$engine
|
||||
partition by list (cast(a as unsigned)) subpartition by key (a) subpartitions 3 (
|
||||
partition pa9 values in (1,2,3,4,5,6,7,8,9),
|
||||
partition pa18 values in (10,11,12,13,14,15,16,17,18),
|
||||
partition pa27 values in (19,20,21,22,23,24,25,26,27)
|
||||
);
|
||||
show create table t4;
|
||||
#insert into t4 values ('1'),('2'),('3');
|
||||
#insert into t4 values ('1,2'),('2,3'),('3,1');
|
||||
#insert into t4 values ('1,2,3');
|
||||
select count(*) from t4;
|
||||
select * from t4 order by a;
|
||||
drop table t4;
|
||||
|
@ -83,14 +83,9 @@ eval insert into t3 values ($val1);
|
||||
eval insert into t3 values ($val2);
|
||||
eval insert into t3 values ($val3);
|
||||
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval load data infile '$MYSQL_TEST_DIR/suite/parts/inc/$infile' into table t4;
|
||||
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval load data infile '$MYSQL_TEST_DIR/suite/parts/inc/$infile' into table t5;
|
||||
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval load data infile '$MYSQL_TEST_DIR/suite/parts/inc/$infile' into table t6;
|
||||
eval load data infile '../std_data_ln/parts/$infile' into table t4;
|
||||
eval load data infile '../std_data_ln/parts/$infile' into table t5;
|
||||
eval load data infile '../std_data_ln/parts/$infile' into table t6;
|
||||
|
||||
eval select $sqlfunc from t1 order by col1;
|
||||
|
||||
|
@ -331,13 +331,13 @@ $column_list
|
||||
PARTITION BY RANGE(f_int1)
|
||||
( PARTITION part1 VALUES LESS THAN (NULL),
|
||||
PARTITION part2 VALUES LESS THAN (1000));
|
||||
--echo # 3.5.1.2 VALUE LESS THAN (CAST(NULL AS SIGNED INTEGER)) is not allowed
|
||||
--echo # 3.5.1.2 VALUE LESS THAN (NULL) is not allowed
|
||||
--error 1064
|
||||
eval CREATE TABLE t1 (
|
||||
$column_list
|
||||
)
|
||||
PARTITION BY RANGE(f_int1)
|
||||
( PARTITION part1 VALUES LESS THAN (CAST(NULL AS SIGNED INTEGER)),
|
||||
( PARTITION part1 VALUES LESS THAN (NULL),
|
||||
PARTITION part2 VALUES LESS THAN (1000));
|
||||
--echo # 3.5.2 NULL in LIST partitioning clause
|
||||
--echo # 3.5.2.1 VALUE IN (NULL)
|
||||
@ -349,14 +349,14 @@ PARTITION BY LIST(MOD(f_int1,2))
|
||||
PARTITION part2 VALUES IN (0),
|
||||
PARTITION part3 VALUES IN (1));
|
||||
DROP TABLE t1;
|
||||
--echo # 3.5.2.2 VALUE IN (CAST(NULL AS SIGNED INTEGER))
|
||||
--echo # 3.5.2.2 VALUE IN (NULL)
|
||||
# Attention: It is intended that there is no partition with
|
||||
# VALUES IN (0), because there was a time where NULL was treated as zero
|
||||
eval CREATE TABLE t1 (
|
||||
$column_list
|
||||
)
|
||||
PARTITION BY LIST(MOD(f_int1,2))
|
||||
( PARTITION part1 VALUES IN (CAST(NULL AS SIGNED INTEGER)),
|
||||
( PARTITION part1 VALUES IN (NULL),
|
||||
PARTITION part3 VALUES IN (1));
|
||||
--source suite/parts/inc/partition_layout_check1.inc
|
||||
# --source include/partition_layout_check1.inc
|
||||
@ -368,7 +368,7 @@ eval CREATE TABLE t1 (
|
||||
$column_list
|
||||
)
|
||||
PARTITION BY LIST(MOD(f_int1,2))
|
||||
( PARTITION part1 VALUES IN (CAST(NULL AS SIGNED INTEGER)),
|
||||
( PARTITION part1 VALUES IN (NULL),
|
||||
PARTITION part2 VALUES IN (0),
|
||||
PARTITION part3 VALUES IN (1));
|
||||
--source suite/parts/inc/partition_layout_check1.inc
|
||||
|
@ -28,15 +28,15 @@ eval SET @my_errno= $mysql_errno ;
|
||||
let $run= `SELECT @my_errno = 0`;
|
||||
# Expected error codes are
|
||||
# 0
|
||||
# 1064 ERROR 42000: You have an error in your SQL syntax
|
||||
# Reason: assign -1 partitions
|
||||
# 1486 ERROR HY000: Too many partitions (including subpartitions) were defined
|
||||
# 1491 ERROR HY000: Number of partitions = 0 is not an allowed value
|
||||
let $unexpected_error= `SELECT @my_errno NOT IN (0,1064,1487,1492)`;
|
||||
# 1064 ER_PARSE_ERROR
|
||||
# Reason: assign -1 partitions
|
||||
# 1496 ER_TOO_MANY_PARTITIONS_ERROR
|
||||
# 1501 ER_NO_PARTS_ERROR
|
||||
let $unexpected_error= `SELECT @my_errno NOT IN (0,1064,1496,1501)`;
|
||||
if ($unexpected_error)
|
||||
{
|
||||
--echo # The last command got an unexepected error response.
|
||||
--echo # Expected/handled SQL codes are 0,1064,1487,1492
|
||||
--echo # Expected/handled SQL codes are 0,1064,1496,1501
|
||||
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
|
||||
--echo # Sorry, have to abort.
|
||||
exit;
|
||||
@ -66,15 +66,15 @@ eval SET @my_errno= $mysql_errno ;
|
||||
let $run= `SELECT @my_errno = 0`;
|
||||
# Expected error codes are
|
||||
# 0
|
||||
# 1064 ERROR 42000: You have an error in your SQL syntax
|
||||
# Reason: assign -1 subpartitions
|
||||
# 1487 ERROR HY000: Too many partitions (including subpartitions) were defined
|
||||
# 1492 ERROR HY000: Number of partitions = 0 is not an allowed value
|
||||
let $unexpected_error= `SELECT @my_errno NOT IN (0,1064,1487,1492)`;
|
||||
# 1064 ER_PARSE_ERROR
|
||||
# Reason: assign -1 partitions
|
||||
# 1496 ER_TOO_MANY_PARTITIONS_ERROR
|
||||
# 1501 ER_NO_PARTS_ERROR
|
||||
let $unexpected_error= `SELECT @my_errno NOT IN (0,1064,1496,1501)`;
|
||||
if ($unexpected_error)
|
||||
{
|
||||
--echo # The last command got an unexepected error response.
|
||||
--echo # Expected/handled SQL codes are 0,1064,1487,1492
|
||||
--echo # Expected/handled SQL codes are 0,1064,1496,1501
|
||||
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
|
||||
--echo # Sorry, have to abort.
|
||||
exit;
|
||||
|
@ -46,7 +46,7 @@ select * from t2;
|
||||
drop table t2;
|
||||
|
||||
eval create table t3 (a time not null, primary key(a)) engine=$engine
|
||||
partition by range (cast(second(a) as unsigned)) subpartition by key (a)
|
||||
partition by range (second(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values less than (16),
|
||||
partition quarter2 values less than (31),
|
||||
@ -66,7 +66,7 @@ select * from t3;
|
||||
drop table t3;
|
||||
|
||||
eval create table t4 (a time not null, primary key(a)) engine=$engine
|
||||
partition by list (cast(second(a) as unsigned)) subpartition by key (a)
|
||||
partition by list (second(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15),
|
||||
partition quarter2 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30),
|
||||
|
@ -46,7 +46,7 @@ select * from t2;
|
||||
drop table t2;
|
||||
|
||||
eval create table t3 (a timestamp not null, primary key(a)) engine=$engine
|
||||
partition by range (cast(month(a) as unsigned)) subpartition by key (a)
|
||||
partition by range (month(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values less than (4),
|
||||
partition quarter2 values less than (7),
|
||||
@ -66,7 +66,7 @@ select * from t3;
|
||||
drop table t3;
|
||||
|
||||
eval create table t4 (a timestamp not null, primary key(a)) engine=$engine
|
||||
partition by list (cast(month(a) as unsigned)) subpartition by key (a)
|
||||
partition by list (month(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values in (0,1,2,3),
|
||||
partition quarter2 values in (4,5,6),
|
||||
|
@ -12,6 +12,16 @@
|
||||
# Change: #
|
||||
################################################################################
|
||||
|
||||
|
||||
--echo
|
||||
--echo This test relies on the CAST() function for partitioning, which
|
||||
--echo is not allowed. Not deleting it yet, as it may have some useful
|
||||
--echo bits in it. See Bug #30581, "partition_value tests use disallowed
|
||||
--echo CAST() function"
|
||||
--echo
|
||||
|
||||
--disable_parsing
|
||||
|
||||
--echo
|
||||
--echo #========================================================================
|
||||
--echo # Calculation of "exotic" results within the partition function
|
||||
@ -155,3 +165,5 @@ VALUES(NULL,NULL,NULL,NULL,NULL);
|
||||
eval SELECT COUNT(*) = 1 FROM t1 WHERE f_char2 IS NULL;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
|
||||
--enable_parsing
|
||||
|
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
@ -64,7 +64,7 @@ t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
|
||||
@ -78,15 +78,15 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
ALTER TABLE t1 ADD PARTITION (PARTITION part2);
|
||||
ERROR HY000: Partition management on a not partitioned table is not possible
|
||||
# 1.1.2 Assign HASH partitioning
|
||||
ALTER TABLE t1 PARTITION BY HASH(CAST(YEAR(f_date) AS SIGNED INTEGER));
|
||||
ALTER TABLE t1 PARTITION BY HASH(YEAR(f_date));
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
@ -95,51 +95,30 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
# check read row by row success: 1
|
||||
# 1.1.3 Assign other HASH partitioning to already partitioned table
|
||||
# + test and switch back + test
|
||||
ALTER TABLE t1 PARTITION BY HASH(CAST(f_varchar AS SIGNED INTEGER));
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: '20 '
|
||||
Warning 1292 Truncated incorrect INTEGER value: '19 '
|
||||
Warning 1292 Truncated incorrect INTEGER value: '18 '
|
||||
Warning 1292 Truncated incorrect INTEGER value: '17 '
|
||||
Warning 1292 Truncated incorrect INTEGER value: '16 '
|
||||
Warning 1292 Truncated incorrect INTEGER value: '15 '
|
||||
Warning 1292 Truncated incorrect INTEGER value: '14 '
|
||||
Warning 1292 Truncated incorrect INTEGER value: '13 '
|
||||
Warning 1292 Truncated incorrect INTEGER value: '12 '
|
||||
Warning 1292 Truncated incorrect INTEGER value: '11 '
|
||||
Warning 1292 Truncated incorrect INTEGER value: '10 '
|
||||
Warning 1292 Truncated incorrect INTEGER value: '9 '
|
||||
Warning 1292 Truncated incorrect INTEGER value: '8 '
|
||||
Warning 1292 Truncated incorrect INTEGER value: '7 '
|
||||
Warning 1292 Truncated incorrect INTEGER value: '6 '
|
||||
Warning 1292 Truncated incorrect INTEGER value: '5 '
|
||||
Warning 1292 Truncated incorrect INTEGER value: '4 '
|
||||
Warning 1292 Truncated incorrect INTEGER value: '3 '
|
||||
Warning 1292 Truncated incorrect INTEGER value: '2 '
|
||||
Warning 1292 Truncated incorrect INTEGER value: '1 '
|
||||
ALTER TABLE t1 PARTITION BY HASH(DAYOFYEAR(f_date));
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(f_varchar AS SIGNED INTEGER)) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (DAYOFYEAR(f_date)) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
ALTER TABLE t1 PARTITION BY HASH(CAST(YEAR(f_date) AS SIGNED INTEGER));
|
||||
ALTER TABLE t1 PARTITION BY HASH(YEAR(f_date));
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
@ -158,9 +137,9 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part1 ALL NULL NULL NULL NULL 7 Using where
|
||||
@ -177,9 +156,9 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where
|
||||
@ -193,9 +172,9 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB, PARTITION p5 ENGINE = InnoDB, PARTITION p6 ENGINE = InnoDB, PARTITION p7 ENGINE = InnoDB) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB, PARTITION p5 ENGINE = InnoDB, PARTITION p6 ENGINE = InnoDB, PARTITION p7 ENGINE = InnoDB) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 3 Using where
|
||||
@ -221,9 +200,9 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB, PARTITION p5 ENGINE = InnoDB, PARTITION p6 ENGINE = InnoDB) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB, PARTITION p5 ENGINE = InnoDB, PARTITION p6 ENGINE = InnoDB) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p6 ALL NULL NULL NULL NULL 3 Using where
|
||||
@ -236,9 +215,9 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB, PARTITION p5 ENGINE = InnoDB) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB, PARTITION p5 ENGINE = InnoDB) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p4 ALL NULL NULL NULL NULL 4 Using where
|
||||
@ -251,9 +230,9 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 4 Using where
|
||||
@ -266,9 +245,9 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where
|
||||
@ -281,9 +260,9 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part1 ALL NULL NULL NULL NULL 7 Using where
|
||||
@ -296,9 +275,9 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 10 Using where
|
||||
@ -311,9 +290,9 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = InnoDB) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = InnoDB) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
@ -331,7 +310,7 @@ t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
|
||||
@ -370,7 +349,7 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
|
||||
@ -392,8 +371,8 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
@ -416,8 +395,8 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 7 Using where
|
||||
@ -435,8 +414,8 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 5 Using where
|
||||
@ -454,8 +433,8 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB, PARTITION p5 ENGINE = InnoDB, PARTITION p6 ENGINE = InnoDB, PARTITION p7 ENGINE = InnoDB) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p6 ALL NULL NULL NULL NULL 3 Using where
|
||||
@ -480,8 +459,8 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB, PARTITION p5 ENGINE = InnoDB, PARTITION p6 ENGINE = InnoDB) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 4 Using where
|
||||
@ -498,8 +477,8 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB, PARTITION p5 ENGINE = InnoDB) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 3 Using where
|
||||
@ -516,8 +495,8 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p4 ALL NULL NULL NULL NULL 10 Using where
|
||||
@ -534,8 +513,8 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 5 Using where
|
||||
@ -552,8 +531,8 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 7 Using where
|
||||
@ -570,8 +549,8 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 10 Using where
|
||||
@ -588,8 +567,8 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = InnoDB) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
@ -610,7 +589,7 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
|
||||
|
@ -64,9 +64,9 @@ t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
|
||||
@ -80,17 +80,17 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
ALTER TABLE t1 ADD PARTITION (PARTITION part2);
|
||||
ERROR HY000: Partition management on a not partitioned table is not possible
|
||||
# 1.1.2 Assign HASH partitioning
|
||||
ALTER TABLE t1 PARTITION BY HASH(CAST(YEAR(f_date) AS SIGNED INTEGER));
|
||||
ALTER TABLE t1 PARTITION BY HASH(YEAR(f_date));
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
@ -99,55 +99,34 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
# check read row by row success: 1
|
||||
# 1.1.3 Assign other HASH partitioning to already partitioned table
|
||||
# + test and switch back + test
|
||||
ALTER TABLE t1 PARTITION BY HASH(CAST(f_varchar AS SIGNED INTEGER));
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: '20'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '19'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '18'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '17'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '16'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '15'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '14'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '13'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '12'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '11'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '10'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '90'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '80'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '70'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '60'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '50'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '40'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '30'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '20'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '10'
|
||||
ALTER TABLE t1 PARTITION BY HASH(DAYOFYEAR(f_date));
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(f_varchar AS SIGNED INTEGER)) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (DAYOFYEAR(f_date)) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
# check read single success: 1
|
||||
# check read all success: 1
|
||||
# check read row by row success: 1
|
||||
ALTER TABLE t1 PARTITION BY HASH(CAST(YEAR(f_date) AS SIGNED INTEGER));
|
||||
ALTER TABLE t1 PARTITION BY HASH(YEAR(f_date));
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
@ -166,15 +145,15 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part1 ALL NULL NULL NULL NULL 7 Using where
|
||||
@ -191,17 +170,17 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where
|
||||
@ -215,25 +194,25 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM, PARTITION p5 ENGINE = MyISAM, PARTITION p6 ENGINE = MyISAM, PARTITION p7 ENGINE = MyISAM) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p6.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p6.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p7.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p7.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM, PARTITION p5 ENGINE = MyISAM, PARTITION p6 ENGINE = MyISAM, PARTITION p7 ENGINE = MyISAM) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p6.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p6.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p7.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p7.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 3 Using where
|
||||
@ -259,23 +238,23 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM, PARTITION p5 ENGINE = MyISAM, PARTITION p6 ENGINE = MyISAM) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p6.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p6.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM, PARTITION p5 ENGINE = MyISAM, PARTITION p6 ENGINE = MyISAM) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p6.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p6.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p6 ALL NULL NULL NULL NULL 3 Using where
|
||||
@ -288,21 +267,21 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM, PARTITION p5 ENGINE = MyISAM) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM, PARTITION p5 ENGINE = MyISAM) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p4 ALL NULL NULL NULL NULL 4 Using where
|
||||
@ -315,19 +294,19 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 4 Using where
|
||||
@ -340,17 +319,17 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where
|
||||
@ -363,15 +342,15 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part1 ALL NULL NULL NULL NULL 7 Using where
|
||||
@ -384,13 +363,13 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 10 Using where
|
||||
@ -403,11 +382,11 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = MyISAM) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = MyISAM) */
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
@ -425,9 +404,9 @@ t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
|
||||
@ -460,9 +439,9 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
|
||||
@ -484,10 +463,10 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
@ -510,14 +489,14 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 7 Using where
|
||||
@ -535,16 +514,16 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 5 Using where
|
||||
@ -562,24 +541,24 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM, PARTITION p5 ENGINE = MyISAM, PARTITION p6 ENGINE = MyISAM, PARTITION p7 ENGINE = MyISAM) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p6.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p6.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p7.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p7.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p6.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p6.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p7.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p7.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p6 ALL NULL NULL NULL NULL 3 Using where
|
||||
@ -604,22 +583,22 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM, PARTITION p5 ENGINE = MyISAM, PARTITION p6 ENGINE = MyISAM) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p6.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p6.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p6.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p6.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 4 Using where
|
||||
@ -636,20 +615,20 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM, PARTITION p5 ENGINE = MyISAM) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 3 Using where
|
||||
@ -666,18 +645,18 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p4 ALL NULL NULL NULL NULL 10 Using where
|
||||
@ -694,16 +673,16 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 5 Using where
|
||||
@ -720,14 +699,14 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 7 Using where
|
||||
@ -744,12 +723,12 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 10 Using where
|
||||
@ -766,10 +745,10 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = MyISAM) */
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
|
||||
@ -790,9 +769,9 @@ t1 CREATE TABLE `t1` (
|
||||
`f_char2` char(20) DEFAULT NULL,
|
||||
`f_charbig` varchar(1000) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.MYD
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.MYI
|
||||
/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.MYD
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.MYI
|
||||
MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -186,7 +186,7 @@ a
|
||||
1971-01-01 00:00:59
|
||||
drop table t2;
|
||||
create table t3 (a timestamp not null, primary key(a)) engine='InnoDB'
|
||||
partition by range (cast(month(a) as unsigned)) subpartition by key (a)
|
||||
partition by range (month(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values less than (4),
|
||||
partition quarter2 values less than (7),
|
||||
@ -198,7 +198,7 @@ Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = InnoDB, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = InnoDB) */
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = InnoDB, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = InnoDB) */
|
||||
12 inserts;
|
||||
insert into t3 values (date_add('1970-01-01 00:00:00',interval 12-1 month));
|
||||
insert into t3 values (date_add('1970-01-01 00:00:00',interval 11-1 month));
|
||||
@ -233,7 +233,7 @@ a
|
||||
1970-12-01 00:00:00
|
||||
drop table t3;
|
||||
create table t4 (a timestamp not null, primary key(a)) engine='InnoDB'
|
||||
partition by list (cast(month(a) as unsigned)) subpartition by key (a)
|
||||
partition by list (month(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values in (0,1,2,3),
|
||||
partition quarter2 values in (4,5,6),
|
||||
@ -245,7 +245,7 @@ Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (0,1,2,3) ENGINE = InnoDB, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = InnoDB, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = InnoDB, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = InnoDB) */
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (0,1,2,3) ENGINE = InnoDB, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = InnoDB, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = InnoDB, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = InnoDB) */
|
||||
12 inserts;
|
||||
insert into t4 values (date_add('1970-01-01 00:00:00',interval 12-1 month));
|
||||
insert into t4 values (date_add('1970-01-01 00:00:00',interval 11-1 month));
|
||||
@ -517,7 +517,7 @@ a
|
||||
1970-03-28
|
||||
drop table t2;
|
||||
create table t3 (a date not null, primary key(a)) engine='InnoDB'
|
||||
partition by range (cast(month(a) as unsigned)) subpartition by key (a)
|
||||
partition by range (month(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values less than (4),
|
||||
partition quarter2 values less than (7),
|
||||
@ -529,7 +529,7 @@ Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` date NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = InnoDB, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = InnoDB) */
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = InnoDB, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = InnoDB) */
|
||||
12 inserts;
|
||||
insert into t3 values (adddate(19700101,interval 12-1 month));
|
||||
insert into t3 values (adddate(19700101,interval 11-1 month));
|
||||
@ -562,7 +562,7 @@ a
|
||||
1970-12-01
|
||||
drop table t3;
|
||||
create table t4 (a date not null, primary key(a)) engine='InnoDB'
|
||||
partition by list (cast(month(a) as unsigned)) subpartition by key (a)
|
||||
partition by list (month(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values in (1,2,3),
|
||||
partition quarter2 values in (4,5,6),
|
||||
@ -574,7 +574,7 @@ Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`a` date NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3) ENGINE = InnoDB, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = InnoDB, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = InnoDB, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = InnoDB) */
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3) ENGINE = InnoDB, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = InnoDB, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = InnoDB, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = InnoDB) */
|
||||
12 inserts;
|
||||
insert into t4 values (adddate(19700101,interval 12-1 month));
|
||||
insert into t4 values (adddate(19700101,interval 11-1 month));
|
||||
@ -794,7 +794,7 @@ a
|
||||
00:01:59
|
||||
drop table t2;
|
||||
create table t3 (a time not null, primary key(a)) engine='InnoDB'
|
||||
partition by range (cast(second(a) as unsigned)) subpartition by key (a)
|
||||
partition by range (second(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values less than (16),
|
||||
partition quarter2 values less than (31),
|
||||
@ -806,7 +806,7 @@ Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` time NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(second(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (16) ENGINE = InnoDB, PARTITION quarter2 VALUES LESS THAN (31) ENGINE = InnoDB, PARTITION quarter3 VALUES LESS THAN (46) ENGINE = InnoDB, PARTITION quarter4 VALUES LESS THAN (61) ENGINE = InnoDB) */
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (second(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (16) ENGINE = InnoDB, PARTITION quarter2 VALUES LESS THAN (31) ENGINE = InnoDB, PARTITION quarter3 VALUES LESS THAN (46) ENGINE = InnoDB, PARTITION quarter4 VALUES LESS THAN (61) ENGINE = InnoDB) */
|
||||
59 inserts;
|
||||
insert into t3 values (100000+59);
|
||||
insert into t3 values (100000+58);
|
||||
@ -933,7 +933,7 @@ a
|
||||
10:00:59
|
||||
drop table t3;
|
||||
create table t4 (a time not null, primary key(a)) engine='InnoDB'
|
||||
partition by list (cast(second(a) as unsigned)) subpartition by key (a)
|
||||
partition by list (second(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15),
|
||||
partition quarter2 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30),
|
||||
@ -945,7 +945,7 @@ Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`a` time NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(second(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) ENGINE = InnoDB, PARTITION quarter2 VALUES IN (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = InnoDB, PARTITION quarter3 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45) ENGINE = InnoDB, PARTITION quarter4 VALUES IN (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (second(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) ENGINE = InnoDB, PARTITION quarter2 VALUES IN (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = InnoDB, PARTITION quarter3 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45) ENGINE = InnoDB, PARTITION quarter4 VALUES IN (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */
|
||||
59 inserts;
|
||||
insert into t4 values (100000+59);
|
||||
insert into t4 values (100000+58);
|
||||
@ -1259,7 +1259,7 @@ a
|
||||
1970-01-01 00:00:59
|
||||
drop table t2;
|
||||
create table t3 (a datetime not null, primary key(a)) engine='InnoDB'
|
||||
partition by range (cast(month(a) as unsigned)) subpartition by key (a)
|
||||
partition by range (month(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values less than (4),
|
||||
partition quarter2 values less than (7),
|
||||
@ -1271,7 +1271,7 @@ Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` datetime NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = InnoDB, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = InnoDB) */
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = InnoDB, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = InnoDB) */
|
||||
12 inserts;
|
||||
insert into t3 values (adddate(19700101000000,interval 12-1 month));
|
||||
insert into t3 values (adddate(19700101000000,interval 11-1 month));
|
||||
@ -1304,7 +1304,7 @@ a
|
||||
1970-12-01 00:00:00
|
||||
drop table t3;
|
||||
create table t4 (a datetime not null, primary key(a)) engine='InnoDB'
|
||||
partition by list (cast(month(a) as unsigned)) subpartition by key (a)
|
||||
partition by list (month(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values in (1,2,3),
|
||||
partition quarter2 values in (4,5,6),
|
||||
@ -1316,7 +1316,7 @@ Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`a` datetime NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3) ENGINE = InnoDB, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = InnoDB, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = InnoDB, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = InnoDB) */
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3) ENGINE = InnoDB, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = InnoDB, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = InnoDB, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = InnoDB) */
|
||||
12 inserts;
|
||||
insert into t4 values (adddate(19700101000000,interval 12-1 month));
|
||||
insert into t4 values (adddate(19700101000000,interval 11-1 month));
|
||||
|
@ -186,7 +186,7 @@ a
|
||||
1971-01-01 00:00:59
|
||||
drop table t2;
|
||||
create table t3 (a timestamp not null, primary key(a)) engine='MyISAM'
|
||||
partition by range (cast(month(a) as unsigned)) subpartition by key (a)
|
||||
partition by range (month(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values less than (4),
|
||||
partition quarter2 values less than (7),
|
||||
@ -198,7 +198,7 @@ Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = MyISAM, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = MyISAM) */
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = MyISAM, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = MyISAM) */
|
||||
12 inserts;
|
||||
insert into t3 values (date_add('1970-01-01 00:00:00',interval 12-1 month));
|
||||
insert into t3 values (date_add('1970-01-01 00:00:00',interval 11-1 month));
|
||||
@ -233,7 +233,7 @@ a
|
||||
1970-12-01 00:00:00
|
||||
drop table t3;
|
||||
create table t4 (a timestamp not null, primary key(a)) engine='MyISAM'
|
||||
partition by list (cast(month(a) as unsigned)) subpartition by key (a)
|
||||
partition by list (month(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values in (0,1,2,3),
|
||||
partition quarter2 values in (4,5,6),
|
||||
@ -245,7 +245,7 @@ Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (0,1,2,3) ENGINE = MyISAM, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = MyISAM, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = MyISAM, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = MyISAM) */
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (0,1,2,3) ENGINE = MyISAM, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = MyISAM, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = MyISAM, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = MyISAM) */
|
||||
12 inserts;
|
||||
insert into t4 values (date_add('1970-01-01 00:00:00',interval 12-1 month));
|
||||
insert into t4 values (date_add('1970-01-01 00:00:00',interval 11-1 month));
|
||||
@ -517,7 +517,7 @@ a
|
||||
1970-03-28
|
||||
drop table t2;
|
||||
create table t3 (a date not null, primary key(a)) engine='MyISAM'
|
||||
partition by range (cast(month(a) as unsigned)) subpartition by key (a)
|
||||
partition by range (month(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values less than (4),
|
||||
partition quarter2 values less than (7),
|
||||
@ -529,7 +529,7 @@ Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` date NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = MyISAM, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = MyISAM) */
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = MyISAM, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = MyISAM) */
|
||||
12 inserts;
|
||||
insert into t3 values (adddate(19700101,interval 12-1 month));
|
||||
insert into t3 values (adddate(19700101,interval 11-1 month));
|
||||
@ -562,7 +562,7 @@ a
|
||||
1970-12-01
|
||||
drop table t3;
|
||||
create table t4 (a date not null, primary key(a)) engine='MyISAM'
|
||||
partition by list (cast(month(a) as unsigned)) subpartition by key (a)
|
||||
partition by list (month(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values in (1,2,3),
|
||||
partition quarter2 values in (4,5,6),
|
||||
@ -574,7 +574,7 @@ Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`a` date NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3) ENGINE = MyISAM, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = MyISAM, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = MyISAM, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = MyISAM) */
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3) ENGINE = MyISAM, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = MyISAM, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = MyISAM, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = MyISAM) */
|
||||
12 inserts;
|
||||
insert into t4 values (adddate(19700101,interval 12-1 month));
|
||||
insert into t4 values (adddate(19700101,interval 11-1 month));
|
||||
@ -794,7 +794,7 @@ a
|
||||
00:01:59
|
||||
drop table t2;
|
||||
create table t3 (a time not null, primary key(a)) engine='MyISAM'
|
||||
partition by range (cast(second(a) as unsigned)) subpartition by key (a)
|
||||
partition by range (second(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values less than (16),
|
||||
partition quarter2 values less than (31),
|
||||
@ -806,7 +806,7 @@ Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` time NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(second(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (16) ENGINE = MyISAM, PARTITION quarter2 VALUES LESS THAN (31) ENGINE = MyISAM, PARTITION quarter3 VALUES LESS THAN (46) ENGINE = MyISAM, PARTITION quarter4 VALUES LESS THAN (61) ENGINE = MyISAM) */
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (second(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (16) ENGINE = MyISAM, PARTITION quarter2 VALUES LESS THAN (31) ENGINE = MyISAM, PARTITION quarter3 VALUES LESS THAN (46) ENGINE = MyISAM, PARTITION quarter4 VALUES LESS THAN (61) ENGINE = MyISAM) */
|
||||
59 inserts;
|
||||
insert into t3 values (100000+59);
|
||||
insert into t3 values (100000+58);
|
||||
@ -933,7 +933,7 @@ a
|
||||
10:00:59
|
||||
drop table t3;
|
||||
create table t4 (a time not null, primary key(a)) engine='MyISAM'
|
||||
partition by list (cast(second(a) as unsigned)) subpartition by key (a)
|
||||
partition by list (second(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15),
|
||||
partition quarter2 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30),
|
||||
@ -945,7 +945,7 @@ Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`a` time NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(second(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) ENGINE = MyISAM, PARTITION quarter2 VALUES IN (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = MyISAM, PARTITION quarter3 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45) ENGINE = MyISAM, PARTITION quarter4 VALUES IN (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (second(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) ENGINE = MyISAM, PARTITION quarter2 VALUES IN (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = MyISAM, PARTITION quarter3 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45) ENGINE = MyISAM, PARTITION quarter4 VALUES IN (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */
|
||||
59 inserts;
|
||||
insert into t4 values (100000+59);
|
||||
insert into t4 values (100000+58);
|
||||
@ -1259,7 +1259,7 @@ a
|
||||
1970-01-01 00:00:59
|
||||
drop table t2;
|
||||
create table t3 (a datetime not null, primary key(a)) engine='MyISAM'
|
||||
partition by range (cast(month(a) as unsigned)) subpartition by key (a)
|
||||
partition by range (month(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values less than (4),
|
||||
partition quarter2 values less than (7),
|
||||
@ -1271,7 +1271,7 @@ Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` datetime NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = MyISAM, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = MyISAM) */
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = MyISAM, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = MyISAM) */
|
||||
12 inserts;
|
||||
insert into t3 values (adddate(19700101000000,interval 12-1 month));
|
||||
insert into t3 values (adddate(19700101000000,interval 11-1 month));
|
||||
@ -1304,7 +1304,7 @@ a
|
||||
1970-12-01 00:00:00
|
||||
drop table t3;
|
||||
create table t4 (a datetime not null, primary key(a)) engine='MyISAM'
|
||||
partition by list (cast(month(a) as unsigned)) subpartition by key (a)
|
||||
partition by list (month(a)) subpartition by key (a)
|
||||
subpartitions 3 (
|
||||
partition quarter1 values in (1,2,3),
|
||||
partition quarter2 values in (4,5,6),
|
||||
@ -1316,7 +1316,7 @@ Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`a` datetime NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3) ENGINE = MyISAM, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = MyISAM, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = MyISAM, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = MyISAM) */
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3) ENGINE = MyISAM, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = MyISAM, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = MyISAM, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = MyISAM) */
|
||||
12 inserts;
|
||||
insert into t4 values (adddate(19700101000000,interval 12-1 month));
|
||||
insert into t4 values (adddate(19700101000000,interval 11-1 month));
|
||||
|
@ -87,95 +87,3 @@ select count(*) from t2;
|
||||
count(*)
|
||||
3072
|
||||
drop table t2;
|
||||
create table t3 (a decimal(18,9) not null, primary key(a)) engine='InnoDB'
|
||||
partition by range (cast(floor(a) as signed)) subpartition by key (a) subpartitions 2 (
|
||||
partition pa2 values less than (2),
|
||||
partition pa4 values less than (4),
|
||||
partition pa6 values less than (6),
|
||||
partition pa8 values less than (8),
|
||||
partition pa10 values less than (10)
|
||||
);
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` decimal(18,9) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 2 (PARTITION pa2 VALUES LESS THAN (2) ENGINE = InnoDB, PARTITION pa4 VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION pa6 VALUES LESS THAN (6) ENGINE = InnoDB, PARTITION pa8 VALUES LESS THAN (8) ENGINE = InnoDB, PARTITION pa10 VALUES LESS THAN (10) ENGINE = InnoDB) */
|
||||
9*3 inserts;
|
||||
insert into t3 values (9);
|
||||
insert into t3 values (9+0.333333333);
|
||||
insert into t3 values (9+0.755555555);
|
||||
insert into t3 values (8);
|
||||
insert into t3 values (8+0.333333333);
|
||||
insert into t3 values (8+0.755555555);
|
||||
insert into t3 values (7);
|
||||
insert into t3 values (7+0.333333333);
|
||||
insert into t3 values (7+0.755555555);
|
||||
insert into t3 values (6);
|
||||
insert into t3 values (6+0.333333333);
|
||||
insert into t3 values (6+0.755555555);
|
||||
insert into t3 values (5);
|
||||
insert into t3 values (5+0.333333333);
|
||||
insert into t3 values (5+0.755555555);
|
||||
insert into t3 values (4);
|
||||
insert into t3 values (4+0.333333333);
|
||||
insert into t3 values (4+0.755555555);
|
||||
insert into t3 values (3);
|
||||
insert into t3 values (3+0.333333333);
|
||||
insert into t3 values (3+0.755555555);
|
||||
insert into t3 values (2);
|
||||
insert into t3 values (2+0.333333333);
|
||||
insert into t3 values (2+0.755555555);
|
||||
insert into t3 values (1);
|
||||
insert into t3 values (1+0.333333333);
|
||||
insert into t3 values (1+0.755555555);
|
||||
select count(*) from t3;
|
||||
count(*)
|
||||
27
|
||||
drop table t3;
|
||||
create table t4 (a decimal(18,9) not null, primary key(a)) engine='InnoDB'
|
||||
partition by list (cast(floor(a) as signed)) subpartition by key (a) subpartitions 2 (
|
||||
partition pa2 values in (1,2),
|
||||
partition pa4 values in (3,4),
|
||||
partition pa6 values in (5,6),
|
||||
partition pa8 values in (7,8),
|
||||
partition pa10 values in (9,10)
|
||||
);
|
||||
show create table t4;
|
||||
Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`a` decimal(18,9) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 2 (PARTITION pa2 VALUES IN (1,2) ENGINE = InnoDB, PARTITION pa4 VALUES IN (3,4) ENGINE = InnoDB, PARTITION pa6 VALUES IN (5,6) ENGINE = InnoDB, PARTITION pa8 VALUES IN (7,8) ENGINE = InnoDB, PARTITION pa10 VALUES IN (9,10) ENGINE = InnoDB) */
|
||||
9*3 inserts;
|
||||
insert into t4 values (9);
|
||||
insert into t4 values (9+0.333333333);
|
||||
insert into t4 values (9+0.755555555);
|
||||
insert into t4 values (8);
|
||||
insert into t4 values (8+0.333333333);
|
||||
insert into t4 values (8+0.755555555);
|
||||
insert into t4 values (7);
|
||||
insert into t4 values (7+0.333333333);
|
||||
insert into t4 values (7+0.755555555);
|
||||
insert into t4 values (6);
|
||||
insert into t4 values (6+0.333333333);
|
||||
insert into t4 values (6+0.755555555);
|
||||
insert into t4 values (5);
|
||||
insert into t4 values (5+0.333333333);
|
||||
insert into t4 values (5+0.755555555);
|
||||
insert into t4 values (4);
|
||||
insert into t4 values (4+0.333333333);
|
||||
insert into t4 values (4+0.755555555);
|
||||
insert into t4 values (3);
|
||||
insert into t4 values (3+0.333333333);
|
||||
insert into t4 values (3+0.755555555);
|
||||
insert into t4 values (2);
|
||||
insert into t4 values (2+0.333333333);
|
||||
insert into t4 values (2+0.755555555);
|
||||
insert into t4 values (1);
|
||||
insert into t4 values (1+0.333333333);
|
||||
insert into t4 values (1+0.755555555);
|
||||
select count(*) from t4;
|
||||
count(*)
|
||||
27
|
||||
drop table t4;
|
||||
|
@ -87,95 +87,3 @@ select count(*) from t2;
|
||||
count(*)
|
||||
196605
|
||||
drop table t2;
|
||||
create table t3 (a decimal(18,9) not null, primary key(a)) engine='MYISAM'
|
||||
partition by range (cast(floor(a) as signed)) subpartition by key (a) subpartitions 2 (
|
||||
partition pa2 values less than (2),
|
||||
partition pa4 values less than (4),
|
||||
partition pa6 values less than (6),
|
||||
partition pa8 values less than (8),
|
||||
partition pa10 values less than (10)
|
||||
);
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` decimal(18,9) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 2 (PARTITION pa2 VALUES LESS THAN (2) ENGINE = MyISAM, PARTITION pa4 VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION pa6 VALUES LESS THAN (6) ENGINE = MyISAM, PARTITION pa8 VALUES LESS THAN (8) ENGINE = MyISAM, PARTITION pa10 VALUES LESS THAN (10) ENGINE = MyISAM) */
|
||||
9*3 inserts;
|
||||
insert into t3 values (9);
|
||||
insert into t3 values (9+0.333333333);
|
||||
insert into t3 values (9+0.755555555);
|
||||
insert into t3 values (8);
|
||||
insert into t3 values (8+0.333333333);
|
||||
insert into t3 values (8+0.755555555);
|
||||
insert into t3 values (7);
|
||||
insert into t3 values (7+0.333333333);
|
||||
insert into t3 values (7+0.755555555);
|
||||
insert into t3 values (6);
|
||||
insert into t3 values (6+0.333333333);
|
||||
insert into t3 values (6+0.755555555);
|
||||
insert into t3 values (5);
|
||||
insert into t3 values (5+0.333333333);
|
||||
insert into t3 values (5+0.755555555);
|
||||
insert into t3 values (4);
|
||||
insert into t3 values (4+0.333333333);
|
||||
insert into t3 values (4+0.755555555);
|
||||
insert into t3 values (3);
|
||||
insert into t3 values (3+0.333333333);
|
||||
insert into t3 values (3+0.755555555);
|
||||
insert into t3 values (2);
|
||||
insert into t3 values (2+0.333333333);
|
||||
insert into t3 values (2+0.755555555);
|
||||
insert into t3 values (1);
|
||||
insert into t3 values (1+0.333333333);
|
||||
insert into t3 values (1+0.755555555);
|
||||
select count(*) from t3;
|
||||
count(*)
|
||||
27
|
||||
drop table t3;
|
||||
create table t4 (a decimal(18,9) not null, primary key(a)) engine='MYISAM'
|
||||
partition by list (cast(floor(a) as signed)) subpartition by key (a) subpartitions 2 (
|
||||
partition pa2 values in (1,2),
|
||||
partition pa4 values in (3,4),
|
||||
partition pa6 values in (5,6),
|
||||
partition pa8 values in (7,8),
|
||||
partition pa10 values in (9,10)
|
||||
);
|
||||
show create table t4;
|
||||
Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`a` decimal(18,9) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 2 (PARTITION pa2 VALUES IN (1,2) ENGINE = MyISAM, PARTITION pa4 VALUES IN (3,4) ENGINE = MyISAM, PARTITION pa6 VALUES IN (5,6) ENGINE = MyISAM, PARTITION pa8 VALUES IN (7,8) ENGINE = MyISAM, PARTITION pa10 VALUES IN (9,10) ENGINE = MyISAM) */
|
||||
9*3 inserts;
|
||||
insert into t4 values (9);
|
||||
insert into t4 values (9+0.333333333);
|
||||
insert into t4 values (9+0.755555555);
|
||||
insert into t4 values (8);
|
||||
insert into t4 values (8+0.333333333);
|
||||
insert into t4 values (8+0.755555555);
|
||||
insert into t4 values (7);
|
||||
insert into t4 values (7+0.333333333);
|
||||
insert into t4 values (7+0.755555555);
|
||||
insert into t4 values (6);
|
||||
insert into t4 values (6+0.333333333);
|
||||
insert into t4 values (6+0.755555555);
|
||||
insert into t4 values (5);
|
||||
insert into t4 values (5+0.333333333);
|
||||
insert into t4 values (5+0.755555555);
|
||||
insert into t4 values (4);
|
||||
insert into t4 values (4+0.333333333);
|
||||
insert into t4 values (4+0.755555555);
|
||||
insert into t4 values (3);
|
||||
insert into t4 values (3+0.333333333);
|
||||
insert into t4 values (3+0.755555555);
|
||||
insert into t4 values (2);
|
||||
insert into t4 values (2+0.333333333);
|
||||
insert into t4 values (2+0.755555555);
|
||||
insert into t4 values (1);
|
||||
insert into t4 values (1+0.333333333);
|
||||
insert into t4 values (1+0.755555555);
|
||||
select count(*) from t4;
|
||||
count(*)
|
||||
27
|
||||
drop table t4;
|
||||
|
@ -89,152 +89,6 @@ select count(*) from t2;
|
||||
count(*)
|
||||
49152
|
||||
drop table t2;
|
||||
create table t3 (a float not null, primary key(a)) engine='MYISAM'
|
||||
partition by range (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 (
|
||||
partition pa1 values less than (3),
|
||||
partition pa3 values less than (6),
|
||||
partition pa10 values less than (10)
|
||||
);
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` float NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa1 VALUES LESS THAN (3) ENGINE = MyISAM, PARTITION pa3 VALUES LESS THAN (6) ENGINE = MyISAM, PARTITION pa10 VALUES LESS THAN (10) ENGINE = MyISAM) */
|
||||
9*3 inserts;
|
||||
insert into t3 values (9);
|
||||
insert into t3 values (9+0.33);
|
||||
insert into t3 values (9+0.75);
|
||||
insert into t3 values (8);
|
||||
insert into t3 values (8+0.33);
|
||||
insert into t3 values (8+0.75);
|
||||
insert into t3 values (7);
|
||||
insert into t3 values (7+0.33);
|
||||
insert into t3 values (7+0.75);
|
||||
insert into t3 values (6);
|
||||
insert into t3 values (6+0.33);
|
||||
insert into t3 values (6+0.75);
|
||||
insert into t3 values (5);
|
||||
insert into t3 values (5+0.33);
|
||||
insert into t3 values (5+0.75);
|
||||
insert into t3 values (4);
|
||||
insert into t3 values (4+0.33);
|
||||
insert into t3 values (4+0.75);
|
||||
insert into t3 values (3);
|
||||
insert into t3 values (3+0.33);
|
||||
insert into t3 values (3+0.75);
|
||||
insert into t3 values (2);
|
||||
insert into t3 values (2+0.33);
|
||||
insert into t3 values (2+0.75);
|
||||
insert into t3 values (1);
|
||||
insert into t3 values (1+0.33);
|
||||
insert into t3 values (1+0.75);
|
||||
select count(*) from t3;
|
||||
count(*)
|
||||
27
|
||||
select * from t3;
|
||||
a
|
||||
1
|
||||
1.33
|
||||
1.75
|
||||
2
|
||||
2.33
|
||||
2.75
|
||||
3
|
||||
3.33
|
||||
3.75
|
||||
4
|
||||
4.33
|
||||
4.75
|
||||
5
|
||||
5.33
|
||||
5.75
|
||||
6
|
||||
6.33
|
||||
6.75
|
||||
7
|
||||
7.33
|
||||
7.75
|
||||
8
|
||||
8.33
|
||||
8.75
|
||||
9
|
||||
9.33
|
||||
9.75
|
||||
drop table t3;
|
||||
create table t4 (a float not null, primary key(a)) engine='MYISAM'
|
||||
partition by list (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 (
|
||||
partition pa1 values in (1,2,3),
|
||||
partition pa3 values in (4,5,6),
|
||||
partition pa10 values in (7,8,9,10)
|
||||
);
|
||||
show create table t4;
|
||||
Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`a` float NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa1 VALUES IN (1,2,3) ENGINE = MyISAM, PARTITION pa3 VALUES IN (4,5,6) ENGINE = MyISAM, PARTITION pa10 VALUES IN (7,8,9,10) ENGINE = MyISAM) */
|
||||
9*3 inserts;
|
||||
insert into t4 values (9);
|
||||
insert into t4 values (9+0.33);
|
||||
insert into t4 values (9+0.75);
|
||||
insert into t4 values (8);
|
||||
insert into t4 values (8+0.33);
|
||||
insert into t4 values (8+0.75);
|
||||
insert into t4 values (7);
|
||||
insert into t4 values (7+0.33);
|
||||
insert into t4 values (7+0.75);
|
||||
insert into t4 values (6);
|
||||
insert into t4 values (6+0.33);
|
||||
insert into t4 values (6+0.75);
|
||||
insert into t4 values (5);
|
||||
insert into t4 values (5+0.33);
|
||||
insert into t4 values (5+0.75);
|
||||
insert into t4 values (4);
|
||||
insert into t4 values (4+0.33);
|
||||
insert into t4 values (4+0.75);
|
||||
insert into t4 values (3);
|
||||
insert into t4 values (3+0.33);
|
||||
insert into t4 values (3+0.75);
|
||||
insert into t4 values (2);
|
||||
insert into t4 values (2+0.33);
|
||||
insert into t4 values (2+0.75);
|
||||
insert into t4 values (1);
|
||||
insert into t4 values (1+0.33);
|
||||
insert into t4 values (1+0.75);
|
||||
select count(*) from t4;
|
||||
count(*)
|
||||
27
|
||||
select * from t4;
|
||||
a
|
||||
1
|
||||
1.33
|
||||
1.75
|
||||
2
|
||||
2.33
|
||||
2.75
|
||||
3
|
||||
3.33
|
||||
3.75
|
||||
4
|
||||
4.33
|
||||
4.75
|
||||
5
|
||||
5.33
|
||||
5.75
|
||||
6
|
||||
6.33
|
||||
6.75
|
||||
7
|
||||
7.33
|
||||
7.75
|
||||
8
|
||||
8.33
|
||||
8.75
|
||||
9
|
||||
9.33
|
||||
9.75
|
||||
drop table t4;
|
||||
create table t1 (a double not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
@ -318,149 +172,3 @@ select count(*) from t2;
|
||||
count(*)
|
||||
49152
|
||||
drop table t2;
|
||||
create table t3 (a double not null, primary key(a)) engine='MYISAM'
|
||||
partition by range (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 (
|
||||
partition pa1 values less than (3),
|
||||
partition pa3 values less than (6),
|
||||
partition pa10 values less than (10)
|
||||
);
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` double NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa1 VALUES LESS THAN (3) ENGINE = MyISAM, PARTITION pa3 VALUES LESS THAN (6) ENGINE = MyISAM, PARTITION pa10 VALUES LESS THAN (10) ENGINE = MyISAM) */
|
||||
9*3 inserts;
|
||||
insert into t3 values (9);
|
||||
insert into t3 values (9+0.33);
|
||||
insert into t3 values (9+0.75);
|
||||
insert into t3 values (8);
|
||||
insert into t3 values (8+0.33);
|
||||
insert into t3 values (8+0.75);
|
||||
insert into t3 values (7);
|
||||
insert into t3 values (7+0.33);
|
||||
insert into t3 values (7+0.75);
|
||||
insert into t3 values (6);
|
||||
insert into t3 values (6+0.33);
|
||||
insert into t3 values (6+0.75);
|
||||
insert into t3 values (5);
|
||||
insert into t3 values (5+0.33);
|
||||
insert into t3 values (5+0.75);
|
||||
insert into t3 values (4);
|
||||
insert into t3 values (4+0.33);
|
||||
insert into t3 values (4+0.75);
|
||||
insert into t3 values (3);
|
||||
insert into t3 values (3+0.33);
|
||||
insert into t3 values (3+0.75);
|
||||
insert into t3 values (2);
|
||||
insert into t3 values (2+0.33);
|
||||
insert into t3 values (2+0.75);
|
||||
insert into t3 values (1);
|
||||
insert into t3 values (1+0.33);
|
||||
insert into t3 values (1+0.75);
|
||||
select count(*) from t3;
|
||||
count(*)
|
||||
27
|
||||
select * from t3;
|
||||
a
|
||||
1
|
||||
1.33
|
||||
1.75
|
||||
2
|
||||
2.33
|
||||
2.75
|
||||
3
|
||||
3.33
|
||||
3.75
|
||||
4
|
||||
4.33
|
||||
4.75
|
||||
5
|
||||
5.33
|
||||
5.75
|
||||
6
|
||||
6.33
|
||||
6.75
|
||||
7
|
||||
7.33
|
||||
7.75
|
||||
8
|
||||
8.33
|
||||
8.75
|
||||
9
|
||||
9.33
|
||||
9.75
|
||||
drop table t3;
|
||||
create table t4 (a double not null, primary key(a)) engine='MYISAM'
|
||||
partition by list (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 (
|
||||
partition pa1 values in (1,2,3),
|
||||
partition pa3 values in (4,5,6),
|
||||
partition pa10 values in (7,8,9,10)
|
||||
);
|
||||
show create table t4;
|
||||
Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`a` double NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa1 VALUES IN (1,2,3) ENGINE = MyISAM, PARTITION pa3 VALUES IN (4,5,6) ENGINE = MyISAM, PARTITION pa10 VALUES IN (7,8,9,10) ENGINE = MyISAM) */
|
||||
9*3 inserts;
|
||||
insert into t4 values (9);
|
||||
insert into t4 values (9+0.33);
|
||||
insert into t4 values (9+0.75);
|
||||
insert into t4 values (8);
|
||||
insert into t4 values (8+0.33);
|
||||
insert into t4 values (8+0.75);
|
||||
insert into t4 values (7);
|
||||
insert into t4 values (7+0.33);
|
||||
insert into t4 values (7+0.75);
|
||||
insert into t4 values (6);
|
||||
insert into t4 values (6+0.33);
|
||||
insert into t4 values (6+0.75);
|
||||
insert into t4 values (5);
|
||||
insert into t4 values (5+0.33);
|
||||
insert into t4 values (5+0.75);
|
||||
insert into t4 values (4);
|
||||
insert into t4 values (4+0.33);
|
||||
insert into t4 values (4+0.75);
|
||||
insert into t4 values (3);
|
||||
insert into t4 values (3+0.33);
|
||||
insert into t4 values (3+0.75);
|
||||
insert into t4 values (2);
|
||||
insert into t4 values (2+0.33);
|
||||
insert into t4 values (2+0.75);
|
||||
insert into t4 values (1);
|
||||
insert into t4 values (1+0.33);
|
||||
insert into t4 values (1+0.75);
|
||||
select count(*) from t4;
|
||||
count(*)
|
||||
27
|
||||
select * from t4;
|
||||
a
|
||||
1
|
||||
1.33
|
||||
1.75
|
||||
2
|
||||
2.33
|
||||
2.75
|
||||
3
|
||||
3.33
|
||||
3.75
|
||||
4
|
||||
4.33
|
||||
4.75
|
||||
5
|
||||
5.33
|
||||
5.75
|
||||
6
|
||||
6.33
|
||||
6.75
|
||||
7
|
||||
7.33
|
||||
7.75
|
||||
8
|
||||
8.33
|
||||
8.75
|
||||
9
|
||||
9.33
|
||||
9.75
|
||||
drop table t4;
|
||||
|
@ -620,7 +620,7 @@ PARTITION BY RANGE(f_int1)
|
||||
PARTITION part2 VALUES LESS THAN (1000));
|
||||
ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '),
|
||||
PARTITION part2 VALUES LESS THAN (1000))' at line 9
|
||||
# 3.5.1.2 VALUE LESS THAN (CAST(NULL AS SIGNED INTEGER)) is not allowed
|
||||
# 3.5.1.2 VALUE LESS THAN (NULL) is not allowed
|
||||
CREATE TABLE t1 (
|
||||
f_int1 INTEGER,
|
||||
f_int2 INTEGER,
|
||||
@ -629,7 +629,7 @@ f_char2 CHAR(20),
|
||||
f_charbig VARCHAR(1000)
|
||||
)
|
||||
PARTITION BY RANGE(f_int1)
|
||||
( PARTITION part1 VALUES LESS THAN (CAST(NULL AS SIGNED INTEGER)),
|
||||
( PARTITION part1 VALUES LESS THAN (NULL),
|
||||
PARTITION part2 VALUES LESS THAN (1000));
|
||||
ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '),
|
||||
PARTITION part2 VALUES LESS THAN (1000))' at line 9
|
||||
@ -647,7 +647,7 @@ PARTITION BY LIST(MOD(f_int1,2))
|
||||
PARTITION part2 VALUES IN (0),
|
||||
PARTITION part3 VALUES IN (1));
|
||||
DROP TABLE t1;
|
||||
# 3.5.2.2 VALUE IN (CAST(NULL AS SIGNED INTEGER))
|
||||
# 3.5.2.2 VALUE IN (NULL)
|
||||
CREATE TABLE t1 (
|
||||
f_int1 INTEGER,
|
||||
f_int2 INTEGER,
|
||||
@ -656,7 +656,7 @@ f_char2 CHAR(20),
|
||||
f_charbig VARCHAR(1000)
|
||||
)
|
||||
PARTITION BY LIST(MOD(f_int1,2))
|
||||
( PARTITION part1 VALUES IN (CAST(NULL AS SIGNED INTEGER)),
|
||||
( PARTITION part1 VALUES IN (NULL),
|
||||
PARTITION part3 VALUES IN (1));
|
||||
create_command
|
||||
SHOW CREATE TABLE t1;
|
||||
@ -679,7 +679,7 @@ f_char2 CHAR(20),
|
||||
f_charbig VARCHAR(1000)
|
||||
)
|
||||
PARTITION BY LIST(MOD(f_int1,2))
|
||||
( PARTITION part1 VALUES IN (CAST(NULL AS SIGNED INTEGER)),
|
||||
( PARTITION part1 VALUES IN (NULL),
|
||||
PARTITION part2 VALUES IN (0),
|
||||
PARTITION part3 VALUES IN (1));
|
||||
create_command
|
||||
|
@ -620,7 +620,7 @@ PARTITION BY RANGE(f_int1)
|
||||
PARTITION part2 VALUES LESS THAN (1000));
|
||||
ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '),
|
||||
PARTITION part2 VALUES LESS THAN (1000))' at line 9
|
||||
# 3.5.1.2 VALUE LESS THAN (CAST(NULL AS SIGNED INTEGER)) is not allowed
|
||||
# 3.5.1.2 VALUE LESS THAN (NULL) is not allowed
|
||||
CREATE TABLE t1 (
|
||||
f_int1 INTEGER,
|
||||
f_int2 INTEGER,
|
||||
@ -629,7 +629,7 @@ f_char2 CHAR(20),
|
||||
f_charbig VARCHAR(1000)
|
||||
)
|
||||
PARTITION BY RANGE(f_int1)
|
||||
( PARTITION part1 VALUES LESS THAN (CAST(NULL AS SIGNED INTEGER)),
|
||||
( PARTITION part1 VALUES LESS THAN (NULL),
|
||||
PARTITION part2 VALUES LESS THAN (1000));
|
||||
ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '),
|
||||
PARTITION part2 VALUES LESS THAN (1000))' at line 9
|
||||
@ -647,7 +647,7 @@ PARTITION BY LIST(MOD(f_int1,2))
|
||||
PARTITION part2 VALUES IN (0),
|
||||
PARTITION part3 VALUES IN (1));
|
||||
DROP TABLE t1;
|
||||
# 3.5.2.2 VALUE IN (CAST(NULL AS SIGNED INTEGER))
|
||||
# 3.5.2.2 VALUE IN (NULL)
|
||||
CREATE TABLE t1 (
|
||||
f_int1 INTEGER,
|
||||
f_int2 INTEGER,
|
||||
@ -656,7 +656,7 @@ f_char2 CHAR(20),
|
||||
f_charbig VARCHAR(1000)
|
||||
)
|
||||
PARTITION BY LIST(MOD(f_int1,2))
|
||||
( PARTITION part1 VALUES IN (CAST(NULL AS SIGNED INTEGER)),
|
||||
( PARTITION part1 VALUES IN (NULL),
|
||||
PARTITION part3 VALUES IN (1));
|
||||
create_command
|
||||
SHOW CREATE TABLE t1;
|
||||
@ -687,7 +687,7 @@ f_char2 CHAR(20),
|
||||
f_charbig VARCHAR(1000)
|
||||
)
|
||||
PARTITION BY LIST(MOD(f_int1,2))
|
||||
( PARTITION part1 VALUES IN (CAST(NULL AS SIGNED INTEGER)),
|
||||
( PARTITION part1 VALUES IN (NULL),
|
||||
PARTITION part2 VALUES IN (0),
|
||||
PARTITION part3 VALUES IN (1));
|
||||
create_command
|
||||
|
@ -6,6 +6,8 @@ ndb_partition_range : cannot create t1
|
||||
partition_bit_ndb : cannot create t1
|
||||
partition_int_ndb : cannot create t1
|
||||
partition_syntax_ndb : cannot create t1
|
||||
partition_value_myisam : Bug#30581 partition_value tests use disallowed CAST() function
|
||||
partition_value_innodb : Bug#30581 partition_value tests use disallowed CAST() function
|
||||
partition_value_ndb : cannot create t1
|
||||
partition_basic_ndb : cannot create t1
|
||||
partition_alter1_ndb : timeout. Needs too much time.
|
||||
@ -13,3 +15,6 @@ partition_alter2_ndb : cannot create t1
|
||||
partition_char_innodb : crash. Bug? More investigations
|
||||
partition_sessions : needs system_3_init.inc
|
||||
partition_engine_ndb : cannot create t1
|
||||
part_supported_sql_func_ndb : cannot create t1
|
||||
rpl_ndb_dd_partitions : cannot create t1
|
||||
partition_float_innodb : Bug#30583 Partition on DOUBLE key + INNODB + count(*) == crash
|
||||
|
@ -36,6 +36,7 @@ let $debug= 0;
|
||||
|
||||
##### Storage engine to be tested
|
||||
let $engine= 'InnoDB';
|
||||
--source include/have_innodb.inc
|
||||
|
||||
##### max rows to be inserted
|
||||
let $maxrows=65535;
|
||||
|
@ -36,6 +36,7 @@ let $debug= 0;
|
||||
|
||||
##### Storage engine to be tested
|
||||
let $engine= 'InnoDB';
|
||||
--source include/have_innodb.inc
|
||||
|
||||
##### max rows to be inserted
|
||||
let $maxrows=1024;
|
||||
|
@ -36,6 +36,8 @@ let $debug= 0;
|
||||
|
||||
##### Storage engine to be tested
|
||||
let $engine= 'InnoDB';
|
||||
--source include/have_innodb.inc
|
||||
|
||||
##### number of rows to be inserted
|
||||
let $maxrows=1024;
|
||||
|
||||
|
@ -36,6 +36,8 @@ let $debug= 0;
|
||||
|
||||
##### Storage engine to be tested
|
||||
let $engine= 'InnoDB';
|
||||
--source include/have_innodb.inc
|
||||
|
||||
##### Number of row to be inserted.
|
||||
let $maxrows=1024;
|
||||
|
||||
|
@ -36,6 +36,7 @@ let $debug= 0;
|
||||
|
||||
##### Storage engine to be tested
|
||||
let $engine= 'InnoDB';
|
||||
--source include/have_innodb.inc
|
||||
|
||||
##### max rows to be inserted
|
||||
let $maxrows=1024;
|
||||
|
@ -36,6 +36,7 @@ let $debug= 0;
|
||||
|
||||
##### Storage engine to be tested
|
||||
let $engine= 'InnoDB';
|
||||
--source include/have_innodb.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
|
@ -1,3 +1,4 @@
|
||||
--source include/have_partition.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
|
@ -328,7 +328,7 @@ DROP VIEW v2;
|
||||
--echo
|
||||
--echo ******************** SHOW BINLOG EVENTS ********************
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /Server ver: .+/Server ver: #/ /table_id: [0-9]+/table_id: #/ /COMMIT.+xid=[0-9]+.+/#/
|
||||
--replace_regex /Server ver: .+/Server ver: #/ /table_id: [0-9]+/table_id: #/ /COMMIT.+xid=[0-9]+.+/#/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/
|
||||
show binlog events from 1;
|
||||
sync_slave_with_master;
|
||||
# as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID
|
||||
@ -344,4 +344,4 @@ sync_slave_with_master;
|
||||
# will be created. You will need to go to the mysql-test dir and diff
|
||||
# the files your self to see what is not matching
|
||||
|
||||
--exec diff $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql;
|
||||
--exec diff $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql
|
||||
|
@ -867,8 +867,8 @@ master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
|
||||
master-bin.000001 # Xid 1 # #
|
||||
master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2
|
||||
master-bin.000001 # Xid 1 # #
|
||||
master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=30
|
||||
master-bin.000001 # Execute_load_query 1 # use `test_rpl`; LOAD DATA INFILE '../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;file_id=1
|
||||
master-bin.000001 # Begin_load_query 1 # ;file_id=#;block_len=#
|
||||
master-bin.000001 # Execute_load_query 1 # use `test_rpl`; LOAD DATA INFILE '../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;file_id=#
|
||||
master-bin.000001 # Xid 1 # #
|
||||
master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
|
||||
master-bin.000001 # Xid 1 # #
|
||||
|
@ -11,8 +11,6 @@
|
||||
##############################################################################
|
||||
|
||||
rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after CREATE/DROP TEMPORARY TABLE + ROLLBACK on master
|
||||
#rpl_innodb_mixed_ddl : Bug #29363 rpl.rpl_innodb_mixed_* test failures
|
||||
rpl_innodb_mixed_dml : Bug #29363 rpl.rpl_innodb_mixed_* test failures
|
||||
rpl_invoked_features : BUG#29020 2007-06-21 Lars Non-deterministic test case
|
||||
rpl_auto_increment_11932 : Bug#29809 2007-07-16 ingo Slave SQL errors in warnings file
|
||||
rpl_stm_extraColmaster_ndb : WL#3915 : Statement-based replication not supported in ndb. Enable test when supported.
|
||||
|
@ -41,28 +41,43 @@ select * from t1;
|
||||
|
||||
# Do the same thing a number of times
|
||||
disable_query_log;
|
||||
disable_result_log;
|
||||
let $i= 100;
|
||||
while ($i)
|
||||
{
|
||||
start slave;
|
||||
connection master;
|
||||
insert into t1 values (NULL);
|
||||
select * from t1; # Some variance
|
||||
connection slave;
|
||||
select * from t1; # Some variance
|
||||
stop slave;
|
||||
dec $i;
|
||||
}
|
||||
start slave;
|
||||
enable_query_log;
|
||||
enable_result_log;
|
||||
connection master;
|
||||
# INSERT one more record to make sure
|
||||
# the sync has something to do
|
||||
insert into t1 values (NULL);
|
||||
let $master_count= `select count(*) from t1`;
|
||||
|
||||
sync_slave_with_master;
|
||||
--source include/wait_for_slave_to_start.inc
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
|
||||
--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
||||
query_vertical show slave status;
|
||||
|
||||
let $slave_count= `select count(*) from t1`;
|
||||
|
||||
if (`select $slave_count != $master_count`)
|
||||
{
|
||||
echo master and slave differed in number of rows;
|
||||
echo master: $master_count;
|
||||
echo slave: $slave_count;
|
||||
}
|
||||
|
||||
connection master;
|
||||
drop user replssl@localhost;
|
||||
drop table t1;
|
||||
|
1189
mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result
Normal file
1189
mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result
Normal file
File diff suppressed because it is too large
Load Diff
855
mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result
Normal file
855
mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result
Normal file
@ -0,0 +1,855 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
SET storage_engine=innodb;
|
||||
--- Doing pre test cleanup ---
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--- Start test 1 Basic testing ---
|
||||
--- Create Table Section ---
|
||||
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
|
||||
bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
|
||||
f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
|
||||
y YEAR, t DATE,PRIMARY KEY(id));
|
||||
--- Show table on master ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
--- Show table on slave ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- Check that simple Alter statements are replicated correctly --
|
||||
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total);
|
||||
ALTER TABLE t1 MODIFY vc TEXT;
|
||||
--- Show the new improved table on the master ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` text,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`,`total`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
--- Make sure that our tables on slave are still same engine ---
|
||||
--- and that the alter statements replicated correctly ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` text,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`,`total`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- End test 1 Basic testing ---
|
||||
--- Do Cleanup --
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--- Start test 2 partition RANGE testing --
|
||||
--- Do setup --
|
||||
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
|
||||
bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
|
||||
f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
|
||||
y YEAR, t DATE)
|
||||
PARTITION BY RANGE (YEAR(t))
|
||||
(PARTITION p0 VALUES LESS THAN (1901),
|
||||
PARTITION p1 VALUES LESS THAN (1946),
|
||||
PARTITION p2 VALUES LESS THAN (1966),
|
||||
PARTITION p3 VALUES LESS THAN (1986),
|
||||
PARTITION p4 VALUES LESS THAN (2005),
|
||||
PARTITION p5 VALUES LESS THAN MAXVALUE);
|
||||
--- Show table on master ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = InnoDB, PARTITION p1 VALUES LESS THAN (1946) ENGINE = InnoDB, PARTITION p2 VALUES LESS THAN (1966) ENGINE = InnoDB, PARTITION p3 VALUES LESS THAN (1986) ENGINE = InnoDB, PARTITION p4 VALUES LESS THAN (2005) ENGINE = InnoDB, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
|
||||
--- Show table on slave --
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- Check that simple Alter statements are replicated correctly ---
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(t,id);
|
||||
ALTER TABLE t1 MODIFY vc TEXT;
|
||||
--- Show the new improved table on the master ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` text,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date NOT NULL DEFAULT '0000-00-00',
|
||||
PRIMARY KEY (`t`,`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = InnoDB, PARTITION p1 VALUES LESS THAN (1946) ENGINE = InnoDB, PARTITION p2 VALUES LESS THAN (1966) ENGINE = InnoDB, PARTITION p3 VALUES LESS THAN (1986) ENGINE = InnoDB, PARTITION p4 VALUES LESS THAN (2005) ENGINE = InnoDB, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
|
||||
--- Make sure that our tables on slave are still same engine ---
|
||||
--- and that the alter statements replicated correctly ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` text,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date NOT NULL DEFAULT '0000-00-00',
|
||||
PRIMARY KEY (`t`,`id`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- End test 2 partition RANGE testing ---
|
||||
--- Do Cleanup ---
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--- Start test 3 partition LIST testing ---
|
||||
--- Do setup ---
|
||||
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
|
||||
bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
|
||||
f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
|
||||
y YEAR, t DATE)
|
||||
PARTITION BY LIST(id)
|
||||
(PARTITION p0 VALUES IN (2, 4),
|
||||
PARTITION p1 VALUES IN (42, 142));
|
||||
--- Test 3 Alter to add partition ---
|
||||
ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412));
|
||||
--- Show table on master ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = InnoDB, PARTITION p1 VALUES IN (42,142) ENGINE = InnoDB, PARTITION p2 VALUES IN (412) ENGINE = InnoDB) */
|
||||
--- Show table on slave ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- Check that simple Alter statements are replicated correctly ---
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(id);
|
||||
ALTER TABLE t1 MODIFY vc TEXT;
|
||||
--- Show the new improved table on the master ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` text,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = InnoDB, PARTITION p1 VALUES IN (42,142) ENGINE = InnoDB, PARTITION p2 VALUES IN (412) ENGINE = InnoDB) */
|
||||
--- Make sure that our tables on slave are still same engine ---
|
||||
--- and that the alter statements replicated correctly ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` text,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- End test 3 partition LIST testing ---
|
||||
--- Do Cleanup --
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--- Start test 4 partition HASH testing ---
|
||||
--- Do setup ---
|
||||
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
|
||||
bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
|
||||
f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
|
||||
y YEAR, t DATE)
|
||||
PARTITION BY HASH( YEAR(t) )
|
||||
PARTITIONS 4;
|
||||
--- show that tables have been created correctly ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- Check that simple Alter statements are replicated correctly ---
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(t,id);
|
||||
ALTER TABLE t1 MODIFY vc TEXT;
|
||||
--- Show the new improved table on the master ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` text,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date NOT NULL DEFAULT '0000-00-00',
|
||||
PRIMARY KEY (`t`,`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */
|
||||
--- Make sure that our tables on slave are still same engine ---
|
||||
--- and that the alter statements replicated correctly ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` text,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date NOT NULL DEFAULT '0000-00-00',
|
||||
PRIMARY KEY (`t`,`id`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- End test 4 partition HASH testing ---
|
||||
--- Do Cleanup --
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--- Start test 5 partition by key testing ---
|
||||
--- Create Table Section ---
|
||||
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
|
||||
bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
|
||||
f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
|
||||
y YEAR, t DATE,PRIMARY KEY(id))
|
||||
PARTITION BY KEY()
|
||||
PARTITIONS 4;
|
||||
--- Show that tables on master are ndbcluster tables ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */
|
||||
--- Show that tables on slave ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- Check that simple Alter statements are replicated correctly ---
|
||||
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total);
|
||||
--- Show the new improved table on the master ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`,`total`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */
|
||||
--- Make sure that our tables on slave are still right type ---
|
||||
--- and that the alter statements replicated correctly ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`,`total`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- Check that simple Alter statements are replicated correctly ---
|
||||
ALTER TABLE t1 MODIFY vc TEXT;
|
||||
--- Show the new improved table on the master ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` text,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`,`total`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */
|
||||
--- Make sure that our tables on slave are still same engine ---
|
||||
--- and that the alter statements replicated correctly ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` text,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`,`total`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- End test 5 key partition testing ---
|
||||
--- Do Cleanup ---
|
||||
DROP TABLE IF EXISTS t1;
|
855
mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result
Normal file
855
mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result
Normal file
@ -0,0 +1,855 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
SET storage_engine=myisam;
|
||||
--- Doing pre test cleanup ---
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--- Start test 1 Basic testing ---
|
||||
--- Create Table Section ---
|
||||
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
|
||||
bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
|
||||
f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
|
||||
y YEAR, t DATE,PRIMARY KEY(id));
|
||||
--- Show table on master ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
--- Show table on slave ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- Check that simple Alter statements are replicated correctly --
|
||||
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total);
|
||||
ALTER TABLE t1 MODIFY vc TEXT;
|
||||
--- Show the new improved table on the master ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` text,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`,`total`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
--- Make sure that our tables on slave are still same engine ---
|
||||
--- and that the alter statements replicated correctly ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` text,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`,`total`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- End test 1 Basic testing ---
|
||||
--- Do Cleanup --
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--- Start test 2 partition RANGE testing --
|
||||
--- Do setup --
|
||||
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
|
||||
bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
|
||||
f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
|
||||
y YEAR, t DATE)
|
||||
PARTITION BY RANGE (YEAR(t))
|
||||
(PARTITION p0 VALUES LESS THAN (1901),
|
||||
PARTITION p1 VALUES LESS THAN (1946),
|
||||
PARTITION p2 VALUES LESS THAN (1966),
|
||||
PARTITION p3 VALUES LESS THAN (1986),
|
||||
PARTITION p4 VALUES LESS THAN (2005),
|
||||
PARTITION p5 VALUES LESS THAN MAXVALUE);
|
||||
--- Show table on master ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
|
||||
--- Show table on slave --
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- Check that simple Alter statements are replicated correctly ---
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(t,id);
|
||||
ALTER TABLE t1 MODIFY vc TEXT;
|
||||
--- Show the new improved table on the master ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` text,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date NOT NULL DEFAULT '0000-00-00',
|
||||
PRIMARY KEY (`t`,`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
|
||||
--- Make sure that our tables on slave are still same engine ---
|
||||
--- and that the alter statements replicated correctly ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` text,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date NOT NULL DEFAULT '0000-00-00',
|
||||
PRIMARY KEY (`t`,`id`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- End test 2 partition RANGE testing ---
|
||||
--- Do Cleanup ---
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--- Start test 3 partition LIST testing ---
|
||||
--- Do setup ---
|
||||
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
|
||||
bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
|
||||
f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
|
||||
y YEAR, t DATE)
|
||||
PARTITION BY LIST(id)
|
||||
(PARTITION p0 VALUES IN (2, 4),
|
||||
PARTITION p1 VALUES IN (42, 142));
|
||||
--- Test 3 Alter to add partition ---
|
||||
ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412));
|
||||
--- Show table on master ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */
|
||||
--- Show table on slave ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- Check that simple Alter statements are replicated correctly ---
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(id);
|
||||
ALTER TABLE t1 MODIFY vc TEXT;
|
||||
--- Show the new improved table on the master ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` text,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */
|
||||
--- Make sure that our tables on slave are still same engine ---
|
||||
--- and that the alter statements replicated correctly ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` text,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- End test 3 partition LIST testing ---
|
||||
--- Do Cleanup --
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--- Start test 4 partition HASH testing ---
|
||||
--- Do setup ---
|
||||
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
|
||||
bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
|
||||
f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
|
||||
y YEAR, t DATE)
|
||||
PARTITION BY HASH( YEAR(t) )
|
||||
PARTITIONS 4;
|
||||
--- show that tables have been created correctly ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- Check that simple Alter statements are replicated correctly ---
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(t,id);
|
||||
ALTER TABLE t1 MODIFY vc TEXT;
|
||||
--- Show the new improved table on the master ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` text,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date NOT NULL DEFAULT '0000-00-00',
|
||||
PRIMARY KEY (`t`,`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */
|
||||
--- Make sure that our tables on slave are still same engine ---
|
||||
--- and that the alter statements replicated correctly ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` text,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date NOT NULL DEFAULT '0000-00-00',
|
||||
PRIMARY KEY (`t`,`id`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- End test 4 partition HASH testing ---
|
||||
--- Do Cleanup --
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--- Start test 5 partition by key testing ---
|
||||
--- Create Table Section ---
|
||||
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
|
||||
bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
|
||||
f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
|
||||
y YEAR, t DATE,PRIMARY KEY(id))
|
||||
PARTITION BY KEY()
|
||||
PARTITIONS 4;
|
||||
--- Show that tables on master are ndbcluster tables ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */
|
||||
--- Show that tables on slave ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned DEFAULT NULL,
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- Check that simple Alter statements are replicated correctly ---
|
||||
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total);
|
||||
--- Show the new improved table on the master ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`,`total`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */
|
||||
--- Make sure that our tables on slave are still right type ---
|
||||
--- and that the alter statements replicated correctly ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` varchar(255) DEFAULT NULL,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`,`total`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- Check that simple Alter statements are replicated correctly ---
|
||||
ALTER TABLE t1 MODIFY vc TEXT;
|
||||
--- Show the new improved table on the master ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` text,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`,`total`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */
|
||||
--- Make sure that our tables on slave are still same engine ---
|
||||
--- and that the alter statements replicated correctly ---
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` mediumint(9) NOT NULL,
|
||||
`b1` bit(8) DEFAULT NULL,
|
||||
`vc` text,
|
||||
`bc` char(255) DEFAULT NULL,
|
||||
`d` decimal(10,4) DEFAULT '0.0000',
|
||||
`f` float DEFAULT '0',
|
||||
`total` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
`y` year(4) DEFAULT NULL,
|
||||
`t` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`,`total`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */
|
||||
--- Perform basic operation on master ---
|
||||
--- and ensure replicated correctly ---
|
||||
"--- Insert into t1 --" as "";
|
||||
--- Select from t1 on master ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Select from t1 on slave ---
|
||||
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
|
||||
id hex(b1) vc bc d f total y t
|
||||
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
|
||||
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
|
||||
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
|
||||
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
|
||||
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
|
||||
--- Update t1 on master --
|
||||
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
|
||||
--- Check the update on master ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Check Update on slave ---
|
||||
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
|
||||
id hex(b1) vc bc d f total y t
|
||||
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
|
||||
--- Remove a record from t1 on master ---
|
||||
DELETE FROM t1 WHERE id = 42;
|
||||
--- Show current count on master for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
--- Show current count on slave for t1 ---
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
4
|
||||
DELETE FROM t1;
|
||||
--- End test 5 key partition testing ---
|
||||
--- Do Cleanup ---
|
||||
DROP TABLE IF EXISTS t1;
|
@ -13,6 +13,7 @@
|
||||
|
||||
rpl_ndb_2innodb : BUG#19227 2006-04-20 pekka pk delete apparently not replicated
|
||||
rpl_ndb_2myisam : BUG#19227 Seems to pass currently
|
||||
rpl_ndb_2other : BUG#21842 2007-08-30 tsmith test has never worked on bigendian (sol10-sparc-a, powermacg5
|
||||
rpl_ndb_dd_partitions : BUG#19259 2006-04-21 rpl_ndb_dd_partitions fails on s/AMD
|
||||
rpl_ndb_innodb2ndb : Bug#29549 rpl_ndb_myisam2ndb,rpl_ndb_innodb2ndb failed on Solaris for pack_length issue
|
||||
rpl_ndb_myisam2ndb : Bug#29549 rpl_ndb_myisam2ndb,rpl_ndb_innodb2ndb failed on Solaris for pack_length issue
|
||||
|
1
mysql-test/suite/rpl_ndb/t/rpl_ndb_2other-slave.opt
Normal file
1
mysql-test/suite/rpl_ndb/t/rpl_ndb_2other-slave.opt
Normal file
@ -0,0 +1 @@
|
||||
--innodb --log-slave-updates=0
|
35
mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test
Normal file
35
mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test
Normal file
@ -0,0 +1,35 @@
|
||||
#############################################################
|
||||
# Author: Rafal Somla
|
||||
# Date: 2006-08-20
|
||||
# Purpose: Trying to test ability to replicate from cluster
|
||||
# to other engines (innodb, myisam).
|
||||
##############################################################
|
||||
--source include/have_ndb.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_binlog_format_mixed_or_row.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
# On master use NDB as storage engine.
|
||||
connection master;
|
||||
SET storage_engine=ndb;
|
||||
|
||||
--echo
|
||||
--echo === NDB -> MYISAM ===
|
||||
--echo
|
||||
connection slave;
|
||||
SET storage_engine=myisam;
|
||||
--source extra/rpl_tests/rpl_ndb_2multi_basic.test
|
||||
|
||||
--echo
|
||||
--echo === NDB -> INNODB ===
|
||||
--echo
|
||||
connection slave;
|
||||
SET storage_engine=innodb;
|
||||
--source extra/rpl_tests/rpl_ndb_2multi_basic.test
|
||||
|
||||
--echo
|
||||
--echo === NDB -> NDB ===
|
||||
--echo
|
||||
connection slave;
|
||||
SET storage_engine=ndb;
|
||||
--source extra/rpl_tests/rpl_ndb_2multi_basic.test
|
@ -1 +1 @@
|
||||
--default-storage-engine=ndbcluster
|
||||
--new --default-storage-engine=ndbcluster
|
||||
|
@ -7,8 +7,9 @@
|
||||
# to be able to use the same code for all these different
|
||||
# test and to have control over the tests.
|
||||
##############################################################
|
||||
-- source include/have_ndb.inc
|
||||
-- source include/have_innodb.inc
|
||||
-- source include/have_ndb.inc
|
||||
-- source include/have_binlog_format_mixed_or_row.inc
|
||||
-- source include/ndb_master-slave.inc
|
||||
SET storage_engine=innodb;
|
||||
--source extra/rpl_tests/rpl_ndb_2multi_eng.test
|
||||
|
@ -1 +0,0 @@
|
||||
--binlog-format=row
|
@ -1 +1 @@
|
||||
--default-storage-engine=ndbcluster
|
||||
--new --default-storage-engine=ndbcluster
|
||||
|
@ -7,6 +7,8 @@
|
||||
# to be able to use the same code for all these different
|
||||
# test and to have control over the tests.
|
||||
##############################################################
|
||||
-- source include/have_ndb.inc
|
||||
-- source include/have_binlog_format_mixed_or_row.inc
|
||||
-- source include/ndb_master-slave.inc
|
||||
SET storage_engine=myisam;
|
||||
--source extra/rpl_tests/rpl_ndb_2multi_eng.test
|
||||
|
Reference in New Issue
Block a user