Commit c2a2267b authored by tomas@whalegate.ndb.mysql.com's avatar tomas@whalegate.ndb.mysql.com

Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-target-5.1.22

into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge
parents ddfd522c 88b8ad10
...@@ -2623,6 +2623,14 @@ AC_SUBST(CC) ...@@ -2623,6 +2623,14 @@ AC_SUBST(CC)
AC_SUBST(GXX) AC_SUBST(GXX)
# Set configuration options for make_binary_distribution # Set configuration options for make_binary_distribution
case $SYSTEM_TYPE in
*netware*)
MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --no-strip"
;;
*)
: # no change for other platforms yet
;;
esac
AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS) AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
# Output results # Output results
......
...@@ -564,6 +564,17 @@ void init_embedded_mysql(MYSQL *mysql, int client_flag) ...@@ -564,6 +564,17 @@ void init_embedded_mysql(MYSQL *mysql, int client_flag)
init_alloc_root(&mysql->field_alloc, 8192, 0); init_alloc_root(&mysql->field_alloc, 8192, 0);
} }
/**
@brief Initialize a new THD for a connection in the embedded server
@param client_flag Client capabilities which this thread supports
@return pointer to the created THD object
@todo
This function copies code from several places in the server, including
create_new_thread(), and prepare_new_connection_state(). This should
be refactored to avoid code duplication.
*/
void *create_embedded_thd(int client_flag) void *create_embedded_thd(int client_flag)
{ {
THD * thd= new THD; THD * thd= new THD;
......
#######################################
# Author: Rafal Somla #
# Date: 2006-08-20 #
# Purpose: Test replication of basic #
# table operations in various setups #
# #
# Based on rpl_ndb_2multi_eng.test by #
# JBM #
#######################################
--echo --- Doing pre test cleanup ---
connection master;
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_query_log
#################################################
--echo --- Create Table Section ---
CREATE TABLE t1 (id MEDIUMINT NOT NULL,
b1 INT,
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));
--echo --- Show table on master ---
SHOW CREATE TABLE t1;
--echo --- Show table on slave ---
sync_slave_with_master;
SHOW CREATE TABLE t1;
--source include/rpl_multi_engine2.inc
#################################################
# Okay lets see how it holds up to table changes
--echo --- Check that simple Alter statements are replicated correctly --
ALTER TABLE t1 DROP PRIMARY KEY;
# note: table with no PK can't contain blobs if it is to be replicated.
ALTER TABLE t1 MODIFY vc char(32);
--echo --- Show the new improved table on the master ---
SHOW CREATE TABLE t1;
--echo --- Make sure that our tables on slave are still same engine ---
--echo --- and that the alter statements replicated correctly ---
sync_slave_with_master;
SHOW CREATE TABLE t1;
--source include/rpl_multi_engine2.inc
#################################################
--echo --- Check that replication works when slave has more columns than master
connection master;
ALTER TABLE t1 ADD PRIMARY KEY(id,total);
ALTER TABLE t1 MODIFY vc TEXT;
INSERT INTO t1 VALUES(3,1,'Testing MySQL databases is a cool ',
'Must make it bug free for the customer',
654321.4321,15.21,0,1965,"1905-11-14");
INSERT INTO t1 VALUES(20,1,'Testing MySQL databases is a cool ',
'Must make it bug free for the customer',
654321.4321,15.21,0,1965,"1965-11-14");
INSERT INTO t1 VALUES(50,1,'Testing MySQL databases is a cool ',
'Must make it bug free for the customer',
654321.4321,15.21,0,1965,"1985-11-14");
--echo --- Add columns on slave ---
--sync_slave_with_master
ALTER TABLE t1 ADD (u int, v char(16) default 'default');
UPDATE t1 SET u=7 WHERE id < 50;
UPDATE t1 SET v='explicit' WHERE id >10;
--echo --- Show changed table on slave ---
SHOW CREATE TABLE t1;
SELECT *
FROM t1
ORDER BY id;
--source include/rpl_multi_engine2.inc
TRUNCATE TABLE t1;
#################################################
--echo --- Check that replication works when master has more columns than slave
connection master;
--echo --- Remove columns on slave ---
--sync_slave_with_master
ALTER TABLE t1 DROP COLUMN v;
ALTER TABLE t1 DROP COLUMN u;
ALTER TABLE t1 DROP COLUMN t;
ALTER TABLE t1 DROP COLUMN y;
--echo --- Show changed table on slave ---
SHOW CREATE TABLE t1;
--source include/rpl_multi_engine2.inc
TRUNCATE TABLE t1;
#################################################
--echo --- Do Cleanup --
connection master;
DROP TABLE IF EXISTS t1;
sync_slave_with_master;
connection master;
...@@ -9,5 +9,6 @@ eval SHOW CREATE TABLE t1; ...@@ -9,5 +9,6 @@ eval SHOW CREATE TABLE t1;
# listing of files belonging to the table t1 # listing of files belonging to the table t1
if ($ls) if ($ls)
{ {
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1* --exec ls $MYSQLTEST_VARDIR/master-data/test/t1*
} }
#############################################################
# Author: Rafal
# Date: 2007-08-20
# based on rpl_multi_engine3.inc
#############################################################
connection slave;
STOP SLAVE;
RESET SLAVE;
connection master;
RESET MASTER;
connection slave;
START SLAVE;
--echo --- Populate t1 with data ---
connection master;
--disable_query_log
INSERT INTO t1 VALUES(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");
INSERT INTO t1 VALUES(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");
INSERT INTO t1 VALUES(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");
INSERT INTO t1 VALUES(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");
INSERT INTO t1 VALUES(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");
--enable_query_log
--echo --- Select from t1 on master ---
select *
from t1
order by id;
sync_slave_with_master;
--echo --- Select from t1 on slave ---
select *
from t1
order by id;
--echo --- Perform basic operation on master ---
--echo --- and ensure replicated correctly ---
connection master;
--echo --- Update t1 on master --
UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22"
WHERE id < 100
ORDER BY id;
--echo --- Check the update on master ---
SELECT *
FROM t1
WHERE id < 100
ORDER BY id;
# Must give injector thread a little time to get update
# into the binlog other wise we will miss the update.
sync_slave_with_master;
--echo --- Check Update on slave ---
SELECT *
FROM t1
WHERE id < 100
ORDER BY id;
connection master;
--echo --- Remove a record from t1 on master ---
# Note: there is an error in replication of Delete_row
# from NDB to MyISAM (BUG#28538). However, if there is
# only one row in Delete_row event then it works fine,
# as this test demonstrates.
DELETE FROM t1 WHERE id = 412;
--echo --- Show current count on master for t1 ---
SELECT COUNT(*) FROM t1;
sync_slave_with_master;
--echo --- Show current count on slave for t1 ---
SELECT COUNT(*) FROM t1;
connection master;
TRUNCATE TABLE t1;
sync_slave_with_master;
connection master;
...@@ -191,3 +191,7 @@ drop table table_26093; ...@@ -191,3 +191,7 @@ drop table table_26093;
drop function func_26093_a; drop function func_26093_a;
drop function func_26093_b; drop function func_26093_b;
End of 5.0 tests End of 5.0 tests
select connection_id() > 0;
connection_id() > 0
1
End of tests
...@@ -501,7 +501,7 @@ ERROR 23000: Duplicate entry 'test2' for key 'ggid' ...@@ -501,7 +501,7 @@ ERROR 23000: Duplicate entry 'test2' for key 'ggid'
select * from t1; select * from t1;
id ggid email passwd id ggid email passwd
1 this will work 1 this will work
3 test2 this will work 4 test2 this will work
select * from t1 where id=1; select * from t1 where id=1;
id ggid email passwd id ggid email passwd
1 this will work 1 this will work
......
...@@ -631,7 +631,7 @@ flush status; ...@@ -631,7 +631,7 @@ flush status;
delete from t2 where b > 5; delete from t2 where b > 5;
show status like 'Handler_read_rnd_next'; show status like 'Handler_read_rnd_next';
Variable_name Value Variable_name Value
Handler_read_rnd_next 1215 Handler_read_rnd_next 1115
show status like 'Handler_read_key'; show status like 'Handler_read_key';
Variable_name Value Variable_name Value
Handler_read_key 0 Handler_read_key 0
...@@ -645,7 +645,7 @@ flush status; ...@@ -645,7 +645,7 @@ flush status;
delete from t2 where b < 5 or b > 3; delete from t2 where b < 5 or b > 3;
show status like 'Handler_read_rnd_next'; show status like 'Handler_read_rnd_next';
Variable_name Value Variable_name Value
Handler_read_rnd_next 1215 Handler_read_rnd_next 1115
show status like 'Handler_read_key'; show status like 'Handler_read_key';
Variable_name Value Variable_name Value
Handler_read_key 0 Handler_read_key 0
......
...@@ -3980,4 +3980,61 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -3980,4 +3980,61 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE f1 index inx inx 10 NULL 7 Using where; Using index 1 SIMPLE f1 index inx inx 10 NULL 7 Using where; Using index
1 SIMPLE f2 ref inx inx 5 test.f1.b 1 Using where; Using index 1 SIMPLE f2 ref inx inx 5 test.f1.b 1 Using where; Using index
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (
c1 int(11) NOT NULL AUTO_INCREMENT,
c2 varchar(1000) DEFAULT NULL,
c3 bigint(20) DEFAULT NULL,
c4 bigint(20) DEFAULT NULL,
PRIMARY KEY (c1)
);
EXPLAIN EXTENDED
SELECT join_2.c1
FROM
t1 AS join_0,
t1 AS join_1,
t1 AS join_2,
t1 AS join_3,
t1 AS join_4,
t1 AS join_5,
t1 AS join_6,
t1 AS join_7
WHERE
join_0.c1=join_1.c1 AND
join_1.c1=join_2.c1 AND
join_2.c1=join_3.c1 AND
join_3.c1=join_4.c1 AND
join_4.c1=join_5.c1 AND
join_5.c1=join_6.c1 AND
join_6.c1=join_7.c1
OR
join_0.c2 < '?' AND
join_1.c2 < '?' AND
join_2.c2 > '?' AND
join_2.c2 < '!' AND
join_3.c2 > '?' AND
join_4.c2 = '?' AND
join_5.c2 <> '?' AND
join_6.c2 <> '?' AND
join_7.c2 >= '?' AND
join_0.c1=join_1.c1 AND
join_1.c1=join_2.c1 AND
join_2.c1=join_3.c1 AND
join_3.c1=join_4.c1 AND
join_4.c1=join_5.c1 AND
join_5.c1=join_6.c1 AND
join_6.c1=join_7.c1
GROUP BY
join_3.c1,
join_2.c1,
join_7.c1,
join_1.c1,
join_0.c1;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
Note 1003 select '0' AS `c1` from `test`.`t1` `join_0` join `test`.`t1` `join_1` join `test`.`t1` `join_2` join `test`.`t1` `join_3` join `test`.`t1` `join_4` join `test`.`t1` `join_5` join `test`.`t1` `join_6` join `test`.`t1` `join_7` where 0 group by '0','0','0','0','0'
SHOW WARNINGS;
Level Code Message
Note 1003 select '0' AS `c1` from `test`.`t1` `join_0` join `test`.`t1` `join_1` join `test`.`t1` `join_2` join `test`.`t1` `join_3` join `test`.`t1` `join_4` join `test`.`t1` `join_5` join `test`.`t1` `join_6` join `test`.`t1` `join_7` where 0 group by '0','0','0','0','0'
DROP TABLE t1;
End of 5.0 tests End of 5.0 tests
...@@ -222,19 +222,17 @@ ENGINE NDB; ...@@ -222,19 +222,17 @@ ENGINE NDB;
DROP LOGFILE GROUP lg1 DROP LOGFILE GROUP lg1
ENGINE NDB; ENGINE NDB;
**** End = And No = **** **** End = And No = ****
create table t1 (a int primary key) engine = myisam; create logfile group lg1 add undofile 'MYSQLTEST_VARDIR/tmp/t1.frm' initial_size 1M undo_buffer_size = 1M engine=ndb;;
create logfile group lg1 add undofile 'MYSQLTEST_VARDIR/master-data/test/t1.frm' initial_size 1M undo_buffer_size = 1M engine=ndb;;
ERROR HY000: Failed to create UNDOFILE ERROR HY000: Failed to create UNDOFILE
create logfile group lg1 create logfile group lg1
add undofile 'undofile.dat' add undofile 'undofile.dat'
initial_size 1M initial_size 1M
undo_buffer_size = 1M undo_buffer_size = 1M
engine=ndb; engine=ndb;
create tablespace ts1 add datafile 'MYSQLTEST_VARDIR/master-data/test/t1.frm' use logfile group lg1 initial_size 1M engine ndb;; create tablespace ts1 add datafile 'MYSQLTEST_VARDIR/tmp/t1.frm' use logfile group lg1 initial_size 1M engine ndb;;
ERROR HY000: Failed to create DATAFILE ERROR HY000: Failed to create DATAFILE
drop tablespace ts1 drop tablespace ts1
engine ndb; engine ndb;
ERROR HY000: Failed to drop TABLESPACE ERROR HY000: Failed to drop TABLESPACE
drop logfile group lg1 drop logfile group lg1
engine ndb; engine ndb;
drop table t1;
...@@ -22,4 +22,4 @@ ndb_partition_error2 : HF is not sure if the test can work as internded on all ...@@ -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_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_binlog_discover : bug#21806 2006-08-24
#ndb_autodiscover3 : bug#21806 #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
...@@ -333,11 +333,18 @@ ENGINE NDB; ...@@ -333,11 +333,18 @@ ENGINE NDB;
### ###
# #
# bug#16341 # bug#16341
create table t1 (a int primary key) engine = myisam; #create table t1 (a int primary key) engine = myisam;
# 2007-08-22 Jeb
# Removed the use of create table and manually
# created the file to cause failure due to
# inconsistant results on other OS
# see #bug30559
--exec touch $MYSQLTEST_VARDIR/tmp/t1.frm
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error ER_CREATE_FILEGROUP_FAILED --error ER_CREATE_FILEGROUP_FAILED
--eval create logfile group lg1 add undofile '$MYSQLTEST_VARDIR/master-data/test/t1.frm' initial_size 1M undo_buffer_size = 1M engine=ndb; --eval create logfile group lg1 add undofile '$MYSQLTEST_VARDIR/tmp/t1.frm' initial_size 1M undo_buffer_size = 1M engine=ndb;
create logfile group lg1 create logfile group lg1
add undofile 'undofile.dat' add undofile 'undofile.dat'
...@@ -347,7 +354,7 @@ engine=ndb; ...@@ -347,7 +354,7 @@ engine=ndb;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error ER_CREATE_FILEGROUP_FAILED --error ER_CREATE_FILEGROUP_FAILED
--eval create tablespace ts1 add datafile '$MYSQLTEST_VARDIR/master-data/test/t1.frm' use logfile group lg1 initial_size 1M engine ndb; --eval create tablespace ts1 add datafile '$MYSQLTEST_VARDIR/tmp/t1.frm' use logfile group lg1 initial_size 1M engine ndb;
--error ER_DROP_FILEGROUP_FAILED --error ER_DROP_FILEGROUP_FAILED
drop tablespace ts1 drop tablespace ts1
...@@ -356,8 +363,8 @@ engine ndb; ...@@ -356,8 +363,8 @@ engine ndb;
drop logfile group lg1 drop logfile group lg1
engine ndb; engine ndb;
drop table t1; #drop table t1;
--exec rm $MYSQLTEST_VARDIR/tmp/t1.frm
# End 5.1 test # End 5.1 test
...@@ -17,6 +17,18 @@ ...@@ -17,6 +17,18 @@
--echo --- All SQL functions should be rejected, otherwise BUG (see 18198) --echo --- All SQL functions should be rejected, otherwise BUG (see 18198)
--echo ------------------------------------------------------------------------- --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 $sqlfunc = greatest(col1,15);
let $valsqlfunc = greatest(1,15); let $valsqlfunc = greatest(1,15);
let $coltype = int; let $coltype = int;
...@@ -151,12 +163,6 @@ let $coltype = int; ...@@ -151,12 +163,6 @@ let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc --source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/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 $sqlfunc = period_add(col1,5);
let $valsqlfunc = period_add(9804,5); let $valsqlfunc = period_add(9804,5);
let $coltype = datetime; let $coltype = datetime;
...@@ -190,6 +196,12 @@ let $coltype = datetime; ...@@ -190,6 +196,12 @@ let $coltype = datetime;
--source suite/parts/inc/partition_blocked_sql_funcs.inc --source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/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 $sqlfunc = cast(col1 as signed);
let $valsqlfunc = cast(123 as signed); let $valsqlfunc = cast(123 as signed);
let $coltype = varchar(30); let $coltype = varchar(30);
......
...@@ -40,61 +40,42 @@ let $val4 = 15 ; ...@@ -40,61 +40,42 @@ let $val4 = 15 ;
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/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 $sqlfunc = ceiling(col1);
let $valsqlfunc = cast(ceiling(15) as signed integer); let $valsqlfunc = ceiling(15);
let $coltype = float(7,4); let $coltype = float(7,4);
let $infile = part_supported_sql_funcs_int_float.inc; let $infile = part_supported_sql_funcs_int_float.inc;
let $val1 = 5.1230; let $val1 = 5.1230;
let $val2 = 13.345; let $val2 = 13.345;
let $val3 = 17.987; let $val3 = 17.987;
let $val4 = 15.654 ; 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 # --source include/partition_supported_sql_funcs.inc
let $sqlfunc = cast(floor(col1) as signed); let $sqlfunc = floor(col1);
let $valsqlfunc = cast(floor(15.123) as signed); let $valsqlfunc = floor(15.123);
let $coltype = float(7,4); let $coltype = float(7,4);
let $infile = part_supported_sql_funcs_int_float.inc; let $infile = part_supported_sql_funcs_int_float.inc;
let $val1 = 5.1230; let $val1 = 5.1230;
let $val2 = 13.345; let $val2 = 13.345;
let $val3 = 17.987; let $val3 = 17.987;
let $val4 = 15.654 ; 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 # --source include/partition_supported_sql_funcs.inc
let $sqlfunc = cast(mod(col1,10) as signed); let $sqlfunc = mod(col1,10);
let $valsqlfunc = cast(mod(15,10) as signed); let $valsqlfunc = mod(15,10);
let $coltype = float(7,4); let $coltype = int;
let $infile = part_supported_sql_funcs_int_float.inc; let $infile = part_supported_sql_funcs_int_int.inc;
let $val1 = 5.0000; let $val1 = 5;
let $val2 = 19; let $val2 = 19;
let $val3 = 17; let $val3 = 17;
let $val4 = 15 ; let $val4 = 15 ;
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/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 $sqlfunc = day(col1);
let $valsqlfunc = day('2006-12-21'); let $valsqlfunc = day('2006-12-21');
let $coltype = date; let $coltype = date;
...@@ -243,25 +224,26 @@ let $val4 = '2006-02-06'; ...@@ -243,25 +224,26 @@ let $val4 = '2006-02-06';
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc # --source include/partition_supported_sql_funcs.inc
let $sqlfunc = weekday(col1); # DATEDIFF() is implemented as (TO_DAYS(d1) - TO_DAYS(d2))
let $valsqlfunc = weekday('2006-10-14'); let $sqlfunc = datediff(col1, '2006-01-01');
let $valsqlfunc = datediff('2006-02-02', '2006-01-01');
let $coltype = date; let $coltype = date;
let $infile = part_supported_sql_funcs_int_date.inc; let $infile = part_supported_sql_funcs_int_date.inc;
let $val1 = '2006-12-03'; let $val1 = '2006-02-03';
let $val2 = '2006-11-17'; let $val2 = '2006-01-17';
let $val3 = '2006-05-25'; let $val3 = '2006-01-25';
let $val4 = '2006-02-06'; let $val4 = '2006-02-06';
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc # --source include/partition_supported_sql_funcs.inc
let $sqlfunc = weekofyear(col1); let $sqlfunc = weekday(col1);
let $valsqlfunc = weekofyear('2006-02-14'); let $valsqlfunc = weekday('2006-10-14');
let $coltype = date; let $coltype = date;
let $infile = part_supported_sql_funcs_int_date.inc; let $infile = part_supported_sql_funcs_int_date.inc;
let $val1 = '2006-01-03'; let $val1 = '2006-12-03';
let $val2 = '2006-03-17'; let $val2 = '2006-11-17';
let $val3 = '2006-05-25'; let $val3 = '2006-05-25';
let $val4 = '2006-09-06'; let $val4 = '2006-02-06';
--source suite/parts/inc/partition_supported_sql_funcs.inc --source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc # --source include/partition_supported_sql_funcs.inc
......
...@@ -43,16 +43,16 @@ SELECT IF(9999 - 1000 + 1 > @max_row, @max_row , 9999 - 1000 + 1) ...@@ -43,16 +43,16 @@ SELECT IF(9999 - 1000 + 1 > @max_row, @max_row , 9999 - 1000 + 1)
ALTER TABLE t1 ADD PARTITION (PARTITION part2); ALTER TABLE t1 ADD PARTITION (PARTITION part2);
# #
--echo # 1.1.2 Assign HASH partitioning --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 include/partition_layout.inc
--source suite/parts/inc/partition_check_read1.inc --source suite/parts/inc/partition_check_read1.inc
# #
--echo # 1.1.3 Assign other HASH partitioning to already partitioned table --echo # 1.1.3 Assign other HASH partitioning to already partitioned table
--echo # + test and switch back + test --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 include/partition_layout.inc
--source suite/parts/inc/partition_check_read1.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 include/partition_layout.inc
--source suite/parts/inc/partition_check_read1.inc --source suite/parts/inc/partition_check_read1.inc
# #
......
...@@ -36,8 +36,9 @@ ...@@ -36,8 +36,9 @@
eval $insert_first_half; eval $insert_first_half;
# Possible/Expected return codes for ALTER TABLE ... # Possible/Expected return codes for ALTER TABLE ...
# 0 # 0
# 1491: A PRIMARY KEY need to include all fields in the partition function # 1030: ER_GET_ERRNO
# A UNIQUE INDEX need to include all fields in the partition function # 1500: ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF
# 1504: ER_DROP_PARTITION_NON_EXISTENT
--disable_abort_on_error --disable_abort_on_error
eval $alter; eval $alter;
--enable_abort_on_error --enable_abort_on_error
...@@ -47,11 +48,11 @@ if ($no_debug) ...@@ -47,11 +48,11 @@ if ($no_debug)
} }
eval SET @my_errno = $mysql_errno; eval SET @my_errno = $mysql_errno;
let $run_test= `SELECT @my_errno = 0`; 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) if ($unexpected_error)
{ {
--echo # The last command got an unexepected error response. --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 ""; SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort. --echo # Sorry, have to abort.
exit; exit;
......
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
--echo ------------------------------------------------------------------------- --echo -------------------------------------------------------------------------
--echo --- $sqlfunc in partition with coltype $coltype --echo --- $sqlfunc in partition with coltype $coltype
--echo ------------------------------------------------------------------------- --echo -------------------------------------------------------------------------
--echo must all fail! (delete 0 and comment char, if bug fixed) --echo must all fail!
--disable_abort_on_error
--disable_warnings --disable_warnings
drop table if exists t1 ; drop table if exists t1 ;
drop table if exists t2 ; drop table if exists t2 ;
...@@ -26,32 +25,31 @@ drop table if exists t5 ; ...@@ -26,32 +25,31 @@ drop table if exists t5 ;
drop table if exists t6 ; drop table if exists t6 ;
--enable_warnings --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 eval create table t1 (col1 $coltype) engine=$engine
partition by range($sqlfunc) partition by range($sqlfunc)
(partition p0 values less than (15), (partition p0 values less than (15),
partition p1 values less than (31)); 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 eval create table t2 (col1 $coltype) engine=$engine
partition by list($sqlfunc) partition by list($sqlfunc)
(partition p0 values in (1,2,3,4,5,6,7,8,9,10), (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 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)); 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 eval create table t3 (col1 $coltype) engine=$engine
partition by hash($sqlfunc); 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 eval create table t4 (colint int, col1 $coltype) engine=$engine
partition by range(colint) partition by range(colint)
subpartition by hash($sqlfunc) subpartitions 2 subpartition by hash($sqlfunc) subpartitions 2
(partition p0 values less than (15), (partition p0 values less than (15),
partition p1 values less than (31)); 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 eval create table t5 (colint int, col1 $coltype) engine=$engine
partition by list(colint) partition by list(colint)
subpartition by hash($sqlfunc) subpartitions 2 subpartition by hash($sqlfunc) subpartitions 2
...@@ -59,7 +57,7 @@ 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 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)); 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 eval create table t6 (colint int, col1 $coltype) engine=$engine
partition by range(colint) partition by range(colint)
(partition p0 values less than ($valsqlfunc), (partition p0 values less than ($valsqlfunc),
...@@ -75,50 +73,44 @@ drop table if exists t55 ; ...@@ -75,50 +73,44 @@ drop table if exists t55 ;
drop table if exists t66 ; drop table if exists t66 ;
--enable_warnings --enable_warnings
#--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR
eval create table t11 (col1 $coltype) engine=$engine ; 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 ; 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 ; 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 ; 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 ; 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 ; 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 eval alter table t11
partition by range($sqlfunc) partition by range($sqlfunc)
(partition p0 values less than (15), (partition p0 values less than (15),
partition p1 values less than (31)); 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 eval alter table t22
partition by list($sqlfunc) partition by list($sqlfunc)
(partition p0 values in (1,2,3,4,5,6,7,8,9,10), (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 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)); 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 eval alter table t33
partition by hash($sqlfunc); partition by hash($sqlfunc);
--enable_abort_on_error --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 eval alter table t44
partition by range(colint) partition by range(colint)
subpartition by hash($sqlfunc) subpartitions 2 subpartition by hash($sqlfunc) subpartitions 2
(partition p0 values less than (15), (partition p0 values less than (15),
partition p1 values less than (31)); 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 eval alter table t55
partition by list(colint) partition by list(colint)
subpartition by hash($sqlfunc) subpartitions 2 subpartition by hash($sqlfunc) subpartitions 2
...@@ -126,7 +118,7 @@ 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 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)); 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 eval alter table t66
partition by range(colint) partition by range(colint)
(partition p0 values less than ($valsqlfunc), (partition p0 values less than ($valsqlfunc),
......
...@@ -156,8 +156,8 @@ if ($run) ...@@ -156,8 +156,8 @@ if ($run)
# partitioning mechanism. # partitioning mechanism.
# Sideeffect: Attempt to INSERT one record # Sideeffect: Attempt to INSERT one record
# DUPLICATE KEY will appear if we have UNIQUE columns # DUPLICATE KEY will appear if we have UNIQUE columns
# 1022: Can't write; duplicate key in table 't1' UIDX/PK(f_int1) # 1022: ER_DUP_KEY
# 1062: Duplicate entry '2' for key 1 UIDX/PK(f_int2) # 1062: ER_DUP_ENTRY
--disable_abort_on_error --disable_abort_on_error
INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), SELECT f_int1, f_int1, CAST(f_int1 AS CHAR),
...@@ -200,7 +200,8 @@ if ($any_unique) ...@@ -200,7 +200,8 @@ if ($any_unique)
## 1.3.1 Check, if f_int1 is UNIQUE ## 1.3.1 Check, if f_int1 is UNIQUE
# Sideeffect: Attempt to INSERT one record # Sideeffect: Attempt to INSERT one record
# DUPLICATE KEY will appear if we have UNIQUE columns # 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 --disable_abort_on_error
INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) 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), 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); ...@@ -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 # 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 # - f_int1 is used within the partitioning algorithm
# - we use range partitioning # - 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 ...." # "Table has no partition for value ...."
# or ER_SAME_NAME_PARTITION (1514)
--disable_abort_on_error --disable_abort_on_error
eval INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#$max_int_4##'; eval INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#$max_int_4##';
--enable_abort_on_error --enable_abort_on_error
...@@ -504,11 +506,11 @@ if ($no_debug) ...@@ -504,11 +506,11 @@ if ($no_debug)
--disable_query_log --disable_query_log
} }
eval SET @my_errno = $mysql_errno; 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) if ($unexpected_error)
{ {
--echo # The last command got an unexepected error response. --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 ""; SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort. --echo # Sorry, have to abort.
exit; exit;
...@@ -555,8 +557,8 @@ INSERT t1 SET f_int1 = 0 , f_int2 = 0, ...@@ -555,8 +557,8 @@ INSERT t1 SET f_int1 = 0 , f_int2 = 0,
# f1 "=" NULL is a delicate value which might stress the partitioning # f1 "=" NULL is a delicate value which might stress the partitioning
# mechanism if the result of the expression in the partitioning algorithm # mechanism if the result of the expression in the partitioning algorithm
# becomes NULL. # becomes NULL.
# Not: This INSERT will fail, if f_int1 is PRIMARY KEY or UNIQUE INDEX # This INSERT will fail, if f_int1 is PRIMARY KEY or UNIQUE INDEX
# 1048: Column 'f_int1' cannot be null # 1048: ER_BAD_NULL_ERROR
--disable_abort_on_error --disable_abort_on_error
INSERT INTO t1 INSERT INTO t1
......
...@@ -49,7 +49,7 @@ select * from t2; ...@@ -49,7 +49,7 @@ select * from t2;
drop table t2; drop table t2;
eval create table t3 (a date not null, primary key(a)) engine=$engine 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 ( subpartitions 3 (
partition quarter1 values less than (4), partition quarter1 values less than (4),
partition quarter2 values less than (7), partition quarter2 values less than (7),
...@@ -69,7 +69,7 @@ select * from t3; ...@@ -69,7 +69,7 @@ select * from t3;
drop table t3; drop table t3;
eval create table t4 (a date not null, primary key(a)) engine=$engine 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 ( subpartitions 3 (
partition quarter1 values in (1,2,3), partition quarter1 values in (1,2,3),
partition quarter2 values in (4,5,6), partition quarter2 values in (4,5,6),
......
...@@ -46,7 +46,7 @@ select * from t2; ...@@ -46,7 +46,7 @@ select * from t2;
drop table t2; drop table t2;
eval create table t3 (a datetime not null, primary key(a)) engine=$engine 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 ( subpartitions 3 (
partition quarter1 values less than (4), partition quarter1 values less than (4),
partition quarter2 values less than (7), partition quarter2 values less than (7),
...@@ -66,7 +66,7 @@ select * from t3; ...@@ -66,7 +66,7 @@ select * from t3;
drop table t3; drop table t3;
eval create table t4 (a datetime not null, primary key(a)) engine=$engine 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 ( subpartitions 3 (
partition quarter1 values in (1,2,3), partition quarter1 values in (1,2,3),
partition quarter2 values in (4,5,6), partition quarter2 values in (4,5,6),
......
...@@ -47,8 +47,15 @@ dec $count; ...@@ -47,8 +47,15 @@ dec $count;
select count(*) from t2; select count(*) from t2;
drop table 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 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 pa2 values less than (2),
partition pa4 values less than (4), partition pa4 values less than (4),
partition pa6 values less than (6), partition pa6 values less than (6),
...@@ -70,7 +77,7 @@ select count(*) from t3; ...@@ -70,7 +77,7 @@ select count(*) from t3;
drop table t3; drop table t3;
eval create table t4 (a decimal(18,9) not null, primary key(a)) engine=$engine 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 pa2 values in (1,2),
partition pa4 values in (3,4), partition pa4 values in (3,4),
partition pa6 values in (5,6), partition pa6 values in (5,6),
...@@ -90,3 +97,6 @@ dec $count; ...@@ -90,3 +97,6 @@ dec $count;
--enable_query_log --enable_query_log
select count(*) from t4; select count(*) from t4;
drop table t4; drop table t4;
# Disabled due to Bug 30577
--enable_parsing
...@@ -29,9 +29,9 @@ let $partitioning= ; ...@@ -29,9 +29,9 @@ let $partitioning= ;
if ($with_partitioning) if ($with_partitioning)
{ {
let $partitioning= PARTITION BY HASH(f_int1) PARTITIONS 2; let $partitioning= PARTITION BY HASH(f_int1) PARTITIONS 2;
--disable_query_log
if ($with_directories) if ($with_directories)
{ {
--disable_query_log
eval SET @aux = eval SET @aux =
'PARTITION BY HASH(f_int1) PARTITIONS 2 'PARTITION BY HASH(f_int1) PARTITIONS 2
(PARTITION p1 (PARTITION p1
...@@ -39,7 +39,6 @@ $index_directory, ...@@ -39,7 +39,6 @@ $index_directory,
PARTITION p2 PARTITION p2
$index_directory)'; $index_directory)';
let $partitioning= `SELECT @aux`; let $partitioning= `SELECT @aux`;
--enable_query_log
} }
} }
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
...@@ -47,6 +46,7 @@ $column_list ...@@ -47,6 +46,7 @@ $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc # --source include/partition_check.inc
...@@ -54,9 +54,9 @@ DROP TABLE t1; ...@@ -54,9 +54,9 @@ DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY KEY #----------- PARTITION BY KEY
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
--disable_query_log
eval SET @aux = eval SET @aux =
'PARTITION BY KEY(f_int1) PARTITIONS 5'; 'PARTITION BY KEY(f_int1) PARTITIONS 5';
let $partitioning= `SELECT @aux`; let $partitioning= `SELECT @aux`;
...@@ -76,7 +76,6 @@ PARTITION p4, ...@@ -76,7 +76,6 @@ PARTITION p4,
PARTITION p5 PARTITION p5
$index_directory)'; $index_directory)';
let $partitioning= `SELECT @aux`; let $partitioning= `SELECT @aux`;
--enable_query_log
} }
} }
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
...@@ -84,6 +83,7 @@ $column_list ...@@ -84,6 +83,7 @@ $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc # --source include/partition_check.inc
...@@ -91,9 +91,9 @@ DROP TABLE t1; ...@@ -91,9 +91,9 @@ DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY LIST #----------- PARTITION BY LIST
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
--disable_query_log
eval SET @aux = eval SET @aux =
'PARTITION BY LIST(MOD(f_int1,4)) 'PARTITION BY LIST(MOD(f_int1,4))
(PARTITION part_3 VALUES IN (-3) (PARTITION part_3 VALUES IN (-3)
...@@ -119,6 +119,7 @@ $column_list ...@@ -119,6 +119,7 @@ $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc # --source include/partition_check.inc
...@@ -126,9 +127,9 @@ DROP TABLE t1; ...@@ -126,9 +127,9 @@ DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY RANGE #----------- PARTITION BY RANGE
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
#--disable_query_log
eval SET @aux = 'PARTITION BY RANGE(f_int1) eval SET @aux = 'PARTITION BY RANGE(f_int1)
(PARTITION parta VALUES LESS THAN (0) (PARTITION parta VALUES LESS THAN (0)
$index_directory, $index_directory,
...@@ -143,13 +144,13 @@ $data_directory, ...@@ -143,13 +144,13 @@ $data_directory,
PARTITION partf VALUES LESS THAN $MAX_VALUE PARTITION partf VALUES LESS THAN $MAX_VALUE
$index_directory)'; $index_directory)';
let $partitioning= `SELECT @aux`; let $partitioning= `SELECT @aux`;
#--enable_query_log
} }
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc # --source include/partition_check.inc
...@@ -157,9 +158,9 @@ DROP TABLE t1; ...@@ -157,9 +158,9 @@ DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH #----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
--disable_query_log
eval SET @aux = eval SET @aux =
'PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 'PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
(PARTITION parta VALUES LESS THAN (0) (PARTITION parta VALUES LESS THAN (0)
...@@ -171,13 +172,13 @@ PARTITION partd VALUES LESS THAN $MAX_VALUE ...@@ -171,13 +172,13 @@ PARTITION partd VALUES LESS THAN $MAX_VALUE
$data_directory $data_directory
$index_directory)'; $index_directory)';
let $partitioning= `SELECT @aux`; let $partitioning= `SELECT @aux`;
--enable_query_log
} }
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc # --source include/partition_check.inc
...@@ -185,9 +186,9 @@ DROP TABLE t1; ...@@ -185,9 +186,9 @@ DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY #----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
--disable_query_log
eval SET @aux = 'PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) eval SET @aux = 'PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1)
(PARTITION part1 VALUES LESS THAN (0) (PARTITION part1 VALUES LESS THAN (0)
$data_directory $data_directory
...@@ -202,13 +203,13 @@ $index_directory ...@@ -202,13 +203,13 @@ $index_directory
PARTITION part4 VALUES LESS THAN $MAX_VALUE PARTITION part4 VALUES LESS THAN $MAX_VALUE
(SUBPARTITION subpart41, SUBPARTITION subpart42))'; (SUBPARTITION subpart41, SUBPARTITION subpart42))';
let $partitioning= `SELECT @aux`; let $partitioning= `SELECT @aux`;
--enable_query_log
} }
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc # --source include/partition_check.inc
...@@ -216,9 +217,9 @@ DROP TABLE t1; ...@@ -216,9 +217,9 @@ DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH #----------- PARTITION BY LIST -- SUBPARTITION BY HASH
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
--disable_query_log
eval SET @aux = eval SET @aux =
'PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) 'PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1)
(PARTITION part1 VALUES IN (0) (PARTITION part1 VALUES IN (0)
...@@ -246,13 +247,13 @@ eval SET @aux = ...@@ -246,13 +247,13 @@ eval SET @aux =
$data_directory $data_directory
$index_directory))'; $index_directory))';
let $partitioning= `SELECT @aux`; let $partitioning= `SELECT @aux`;
--enable_query_log
} }
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc # --source include/partition_check.inc
......
...@@ -48,8 +48,15 @@ select count(*) from t2; ...@@ -48,8 +48,15 @@ select count(*) from t2;
drop table 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 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 pa1 values less than (3),
partition pa3 values less than (6), partition pa3 values less than (6),
partition pa10 values less than (10) partition pa10 values less than (10)
...@@ -69,7 +76,7 @@ select * from t3; ...@@ -69,7 +76,7 @@ select * from t3;
drop table t3; drop table t3;
eval create table t4 (a double not null, primary key(a)) engine=$engine 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 pa1 values in (1,2,3),
partition pa3 values in (4,5,6), partition pa3 values in (4,5,6),
partition pa10 values in (7,8,9,10) partition pa10 values in (7,8,9,10)
...@@ -87,3 +94,6 @@ dec $count; ...@@ -87,3 +94,6 @@ dec $count;
select count(*) from t4; select count(*) from t4;
select * from t4; select * from t4;
drop table t4; drop table t4;
# Disabled due to Bug 30577
--enable_parsing
...@@ -53,7 +53,7 @@ eval create table t3 (a enum ( ...@@ -53,7 +53,7 @@ eval create table t3 (a enum (
'M','N','O','P','Q','R','S','T','U','V','W','X', 'M','N','O','P','Q','R','S','T','U','V','W','X',
'Y','Z' 'Y','Z'
) not null, primary key(a)) engine=$engine ) 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 pa9 values less than (10),
partition pa18 values less than (19), partition pa18 values less than (19),
partition pa27 values less than (28), partition pa27 values less than (28),
...@@ -72,28 +72,3 @@ select count(*) from t3; ...@@ -72,28 +72,3 @@ select count(*) from t3;
select * from t3; select * from t3;
drop table 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; ...@@ -51,8 +51,15 @@ dec $count;
select count(*) from t2; select count(*) from t2;
drop table 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 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 pa1 values less than (3),
partition pa3 values less than (6), partition pa3 values less than (6),
partition pa10 values less than (10) partition pa10 values less than (10)
...@@ -72,7 +79,7 @@ select * from t3; ...@@ -72,7 +79,7 @@ select * from t3;
drop table t3; drop table t3;
eval create table t4 (a float not null, primary key(a)) engine=$engine 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 pa1 values in (1,2,3),
partition pa3 values in (4,5,6), partition pa3 values in (4,5,6),
partition pa10 values in (7,8,9,10) partition pa10 values in (7,8,9,10)
...@@ -90,3 +97,6 @@ dec $count; ...@@ -90,3 +97,6 @@ dec $count;
select count(*) from t4; select count(*) from t4;
select * from t4; select * from t4;
drop table t4; drop table t4;
# Disabled due to Bug 30577
--enable_parsing
...@@ -56,6 +56,7 @@ eval INSERT INTO t0_definition SET state = 'old', ...@@ -56,6 +56,7 @@ eval INSERT INTO t0_definition SET state = 'old',
file_list = $file_list; file_list = $file_list;
# Print the create table statement into the protocol # Print the create table statement into the protocol
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
SELECT create_command FROM t0_definition WHERE state = 'old'; SELECT create_command FROM t0_definition WHERE state = 'old';
if ($do_file_tests) if ($do_file_tests)
{ {
......
...@@ -55,6 +55,7 @@ let $run= `SELECT @aux`; ...@@ -55,6 +55,7 @@ let $run= `SELECT @aux`;
if ($run) if ($run)
{ {
--vertical_results --vertical_results
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
SELECT state, SELECT state,
REPLACE(create_command,'\n',' ') AS "Table definition", REPLACE(create_command,'\n',' ') AS "Table definition",
REPLACE(file_list ,'\n',' ') AS "File list" REPLACE(file_list ,'\n',' ') AS "File list"
......
...@@ -44,9 +44,9 @@ let $partitioning= ; ...@@ -44,9 +44,9 @@ let $partitioning= ;
if ($with_partitioning) if ($with_partitioning)
{ {
let $partitioning= PARTITION BY HASH(f_int1) PARTITIONS 2; let $partitioning= PARTITION BY HASH(f_int1) PARTITIONS 2;
--disable_query_log
if ($with_directories) if ($with_directories)
{ {
--disable_query_log
eval SET @aux = eval SET @aux =
'PARTITION BY HASH(f_int1) PARTITIONS 2 'PARTITION BY HASH(f_int1) PARTITIONS 2
(PARTITION p1 (PARTITION p1
...@@ -56,7 +56,6 @@ PARTITION p2 ...@@ -56,7 +56,6 @@ PARTITION p2
$data_directory $data_directory
$index_directory)'; $index_directory)';
let $partitioning= `SELECT @aux`; let $partitioning= `SELECT @aux`;
--enable_query_log
} }
} }
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
...@@ -64,6 +63,7 @@ $column_list ...@@ -64,6 +63,7 @@ $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc # --source include/partition_check.inc
...@@ -71,15 +71,14 @@ DROP TABLE t1; ...@@ -71,15 +71,14 @@ DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY KEY #----------- PARTITION BY KEY
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
--disable_query_log
eval SET @aux = eval SET @aux =
'PARTITION BY KEY(f_int1) PARTITIONS 5'; 'PARTITION BY KEY(f_int1) PARTITIONS 5';
let $partitioning= `SELECT @aux`; let $partitioning= `SELECT @aux`;
if ($with_directories) if ($with_directories)
{ {
--disable_query_log
eval SET @aux = eval SET @aux =
'PARTITION BY HASH(f_int1) PARTITIONS 5 'PARTITION BY HASH(f_int1) PARTITIONS 5
(PARTITION p1 (PARTITION p1
...@@ -98,7 +97,6 @@ PARTITION p5 ...@@ -98,7 +97,6 @@ PARTITION p5
$data_directory $data_directory
$index_directory)'; $index_directory)';
let $partitioning= `SELECT @aux`; let $partitioning= `SELECT @aux`;
--enable_query_log
} }
} }
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
...@@ -106,6 +104,7 @@ $column_list ...@@ -106,6 +104,7 @@ $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc # --source include/partition_check.inc
...@@ -113,9 +112,9 @@ DROP TABLE t1; ...@@ -113,9 +112,9 @@ DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY LIST #----------- PARTITION BY LIST
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
--disable_query_log
eval SET @aux = eval SET @aux =
'PARTITION BY LIST(MOD(f_int1,4)) 'PARTITION BY LIST(MOD(f_int1,4))
(PARTITION part_3 VALUES IN (-3) (PARTITION part_3 VALUES IN (-3)
...@@ -141,6 +140,7 @@ $column_list ...@@ -141,6 +140,7 @@ $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc # --source include/partition_check.inc
...@@ -148,9 +148,9 @@ DROP TABLE t1; ...@@ -148,9 +148,9 @@ DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY RANGE #----------- PARTITION BY RANGE
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
#--disable_query_log
eval SET @aux = 'PARTITION BY RANGE(f_int1) eval SET @aux = 'PARTITION BY RANGE(f_int1)
(PARTITION parta VALUES LESS THAN (0) (PARTITION parta VALUES LESS THAN (0)
$data_directory $data_directory
...@@ -171,13 +171,13 @@ PARTITION partf VALUES LESS THAN $MAX_VALUE ...@@ -171,13 +171,13 @@ PARTITION partf VALUES LESS THAN $MAX_VALUE
$data_directory $data_directory
$index_directory)'; $index_directory)';
let $partitioning= `SELECT @aux`; let $partitioning= `SELECT @aux`;
#--enable_query_log
} }
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc # --source include/partition_check.inc
...@@ -185,9 +185,9 @@ DROP TABLE t1; ...@@ -185,9 +185,9 @@ DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH #----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
--disable_query_log
eval SET @aux = eval SET @aux =
'PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 'PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
(PARTITION parta VALUES LESS THAN (0) (PARTITION parta VALUES LESS THAN (0)
...@@ -203,13 +203,13 @@ PARTITION partd VALUES LESS THAN $MAX_VALUE ...@@ -203,13 +203,13 @@ PARTITION partd VALUES LESS THAN $MAX_VALUE
$data_directory $data_directory
$index_directory)'; $index_directory)';
let $partitioning= `SELECT @aux`; let $partitioning= `SELECT @aux`;
--enable_query_log
} }
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc # --source include/partition_check.inc
...@@ -217,9 +217,9 @@ DROP TABLE t1; ...@@ -217,9 +217,9 @@ DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY #----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
--disable_query_log
eval SET @aux = 'PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) eval SET @aux = 'PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1)
(PARTITION part1 VALUES LESS THAN (0) (PARTITION part1 VALUES LESS THAN (0)
$data_directory $data_directory
...@@ -238,13 +238,13 @@ $data_directory ...@@ -238,13 +238,13 @@ $data_directory
$index_directory $index_directory
(SUBPARTITION subpart41, SUBPARTITION subpart42))'; (SUBPARTITION subpart41, SUBPARTITION subpart42))';
let $partitioning= `SELECT @aux`; let $partitioning= `SELECT @aux`;
--enable_query_log
} }
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc # --source include/partition_check.inc
...@@ -252,9 +252,9 @@ DROP TABLE t1; ...@@ -252,9 +252,9 @@ DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH #----------- PARTITION BY LIST -- SUBPARTITION BY HASH
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
--disable_query_log
eval SET @aux = eval SET @aux =
'PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) 'PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1)
(PARTITION part1 VALUES IN (0) (PARTITION part1 VALUES IN (0)
...@@ -290,13 +290,13 @@ eval SET @aux = ...@@ -290,13 +290,13 @@ eval SET @aux =
$data_directory $data_directory
$index_directory))'; $index_directory))';
let $partitioning= `SELECT @aux`; let $partitioning= `SELECT @aux`;
--enable_query_log
} }
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc # --source include/partition_check.inc
...@@ -304,9 +304,9 @@ DROP TABLE t1; ...@@ -304,9 +304,9 @@ DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY #----------- PARTITION BY LIST -- SUBPARTITION BY KEY
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
--disable_query_log
eval SET @aux = eval SET @aux =
'PARTITION BY LIST(ABS(MOD(f_int1,2))) 'PARTITION BY LIST(ABS(MOD(f_int1,2)))
SUBPARTITION BY KEY(f_int1) SUBPARTITIONS $sub_part_no SUBPARTITION BY KEY(f_int1) SUBPARTITIONS $sub_part_no
...@@ -320,13 +320,13 @@ SUBPARTITION BY KEY(f_int1) SUBPARTITIONS $sub_part_no ...@@ -320,13 +320,13 @@ SUBPARTITION BY KEY(f_int1) SUBPARTITIONS $sub_part_no
$data_directory $data_directory
$index_directory)'; $index_directory)';
let $partitioning= `SELECT @aux`; let $partitioning= `SELECT @aux`;
--enable_query_log
} }
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
# --source include/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' ...@@ -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 count(*) from t2;
select * from t2 order by a; select * from t2 order by a;
drop table t2; 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); ...@@ -83,14 +83,9 @@ eval insert into t3 values ($val1);
eval insert into t3 values ($val2); eval insert into t3 values ($val2);
eval insert into t3 values ($val3); eval insert into t3 values ($val3);
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR eval load data infile '../std_data_ln/parts/$infile' into table t4;
eval load data infile '$MYSQL_TEST_DIR/suite/parts/inc/$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;
--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 select $sqlfunc from t1 order by col1; eval select $sqlfunc from t1 order by col1;
......
...@@ -331,13 +331,13 @@ $column_list ...@@ -331,13 +331,13 @@ $column_list
PARTITION BY RANGE(f_int1) PARTITION BY RANGE(f_int1)
( PARTITION part1 VALUES LESS THAN (NULL), ( PARTITION part1 VALUES LESS THAN (NULL),
PARTITION part2 VALUES LESS THAN (1000)); 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 --error 1064
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
) )
PARTITION BY RANGE(f_int1) 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)); PARTITION part2 VALUES LESS THAN (1000));
--echo # 3.5.2 NULL in LIST partitioning clause --echo # 3.5.2 NULL in LIST partitioning clause
--echo # 3.5.2.1 VALUE IN (NULL) --echo # 3.5.2.1 VALUE IN (NULL)
...@@ -349,14 +349,14 @@ PARTITION BY LIST(MOD(f_int1,2)) ...@@ -349,14 +349,14 @@ PARTITION BY LIST(MOD(f_int1,2))
PARTITION part2 VALUES IN (0), PARTITION part2 VALUES IN (0),
PARTITION part3 VALUES IN (1)); PARTITION part3 VALUES IN (1));
DROP TABLE t1; 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 # Attention: It is intended that there is no partition with
# VALUES IN (0), because there was a time where NULL was treated as zero # VALUES IN (0), because there was a time where NULL was treated as zero
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
) )
PARTITION BY LIST(MOD(f_int1,2)) 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)); PARTITION part3 VALUES IN (1));
--source suite/parts/inc/partition_layout_check1.inc --source suite/parts/inc/partition_layout_check1.inc
# --source include/partition_layout_check1.inc # --source include/partition_layout_check1.inc
...@@ -368,7 +368,7 @@ eval CREATE TABLE t1 ( ...@@ -368,7 +368,7 @@ eval CREATE TABLE t1 (
$column_list $column_list
) )
PARTITION BY LIST(MOD(f_int1,2)) 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 part2 VALUES IN (0),
PARTITION part3 VALUES IN (1)); PARTITION part3 VALUES IN (1));
--source suite/parts/inc/partition_layout_check1.inc --source suite/parts/inc/partition_layout_check1.inc
......
...@@ -28,15 +28,15 @@ eval SET @my_errno= $mysql_errno ; ...@@ -28,15 +28,15 @@ eval SET @my_errno= $mysql_errno ;
let $run= `SELECT @my_errno = 0`; let $run= `SELECT @my_errno = 0`;
# Expected error codes are # Expected error codes are
# 0 # 0
# 1064 ERROR 42000: You have an error in your SQL syntax # 1064 ER_PARSE_ERROR
# Reason: assign -1 partitions # Reason: assign -1 partitions
# 1486 ERROR HY000: Too many partitions (including subpartitions) were defined # 1496 ER_TOO_MANY_PARTITIONS_ERROR
# 1491 ERROR HY000: Number of partitions = 0 is not an allowed value # 1501 ER_NO_PARTS_ERROR
let $unexpected_error= `SELECT @my_errno NOT IN (0,1064,1487,1492)`; let $unexpected_error= `SELECT @my_errno NOT IN (0,1064,1496,1501)`;
if ($unexpected_error) if ($unexpected_error)
{ {
--echo # The last command got an unexepected error response. --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 ""; SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort. --echo # Sorry, have to abort.
exit; exit;
...@@ -66,15 +66,15 @@ eval SET @my_errno= $mysql_errno ; ...@@ -66,15 +66,15 @@ eval SET @my_errno= $mysql_errno ;
let $run= `SELECT @my_errno = 0`; let $run= `SELECT @my_errno = 0`;
# Expected error codes are # Expected error codes are
# 0 # 0
# 1064 ERROR 42000: You have an error in your SQL syntax # 1064 ER_PARSE_ERROR
# Reason: assign -1 subpartitions # Reason: assign -1 partitions
# 1487 ERROR HY000: Too many partitions (including subpartitions) were defined # 1496 ER_TOO_MANY_PARTITIONS_ERROR
# 1492 ERROR HY000: Number of partitions = 0 is not an allowed value # 1501 ER_NO_PARTS_ERROR
let $unexpected_error= `SELECT @my_errno NOT IN (0,1064,1487,1492)`; let $unexpected_error= `SELECT @my_errno NOT IN (0,1064,1496,1501)`;
if ($unexpected_error) if ($unexpected_error)
{ {
--echo # The last command got an unexepected error response. --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 ""; SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort. --echo # Sorry, have to abort.
exit; exit;
......
...@@ -46,7 +46,7 @@ select * from t2; ...@@ -46,7 +46,7 @@ select * from t2;
drop table t2; drop table t2;
eval create table t3 (a time not null, primary key(a)) engine=$engine 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 ( subpartitions 3 (
partition quarter1 values less than (16), partition quarter1 values less than (16),
partition quarter2 values less than (31), partition quarter2 values less than (31),
...@@ -66,7 +66,7 @@ select * from t3; ...@@ -66,7 +66,7 @@ select * from t3;
drop table t3; drop table t3;
eval create table t4 (a time not null, primary key(a)) engine=$engine 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 ( subpartitions 3 (
partition quarter1 values in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), 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), 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; ...@@ -46,7 +46,7 @@ select * from t2;
drop table t2; drop table t2;
eval create table t3 (a timestamp not null, primary key(a)) engine=$engine 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 ( subpartitions 3 (
partition quarter1 values less than (4), partition quarter1 values less than (4),
partition quarter2 values less than (7), partition quarter2 values less than (7),
...@@ -66,7 +66,7 @@ select * from t3; ...@@ -66,7 +66,7 @@ select * from t3;
drop table t3; drop table t3;
eval create table t4 (a timestamp not null, primary key(a)) engine=$engine 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 ( subpartitions 3 (
partition quarter1 values in (0,1,2,3), partition quarter1 values in (0,1,2,3),
partition quarter2 values in (4,5,6), partition quarter2 values in (4,5,6),
......
...@@ -12,6 +12,16 @@ ...@@ -12,6 +12,16 @@
# Change: # # 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 #======================================================================== --echo #========================================================================
--echo # Calculation of "exotic" results within the partition function --echo # Calculation of "exotic" results within the partition function
...@@ -155,3 +165,5 @@ VALUES(NULL,NULL,NULL,NULL,NULL); ...@@ -155,3 +165,5 @@ VALUES(NULL,NULL,NULL,NULL,NULL);
eval SELECT COUNT(*) = 1 FROM t1 WHERE f_char2 IS NULL; eval SELECT COUNT(*) = 1 FROM t1 WHERE f_char2 IS NULL;
DROP TABLE t1; DROP TABLE t1;
# #
--enable_parsing
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -87,95 +87,3 @@ select count(*) from t2; ...@@ -87,95 +87,3 @@ select count(*) from t2;
count(*) count(*)
3072 3072
drop table t2; 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; ...@@ -87,95 +87,3 @@ select count(*) from t2;
count(*) count(*)
196605 196605
drop table t2; 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; ...@@ -89,152 +89,6 @@ select count(*) from t2;
count(*) count(*)
49152 49152
drop table t2; 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' create table t1 (a double not null, primary key(a)) engine='MYISAM'
partition by key (a) ( partition by key (a) (
partition pa1 DATA DIRECTORY = partition pa1 DATA DIRECTORY =
...@@ -318,149 +172,3 @@ select count(*) from t2; ...@@ -318,149 +172,3 @@ select count(*) from t2;
count(*) count(*)
49152 49152
drop table t2; 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) ...@@ -620,7 +620,7 @@ PARTITION BY RANGE(f_int1)
PARTITION part2 VALUES LESS THAN (1000)); PARTITION part2 VALUES LESS THAN (1000));
ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '), ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '),
PARTITION part2 VALUES LESS THAN (1000))' at line 9 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 ( CREATE TABLE t1 (
f_int1 INTEGER, f_int1 INTEGER,
f_int2 INTEGER, f_int2 INTEGER,
...@@ -629,7 +629,7 @@ f_char2 CHAR(20), ...@@ -629,7 +629,7 @@ f_char2 CHAR(20),
f_charbig VARCHAR(1000) f_charbig VARCHAR(1000)
) )
PARTITION BY RANGE(f_int1) 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)); PARTITION part2 VALUES LESS THAN (1000));
ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '), ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '),
PARTITION part2 VALUES LESS THAN (1000))' at line 9 PARTITION part2 VALUES LESS THAN (1000))' at line 9
...@@ -647,7 +647,7 @@ PARTITION BY LIST(MOD(f_int1,2)) ...@@ -647,7 +647,7 @@ PARTITION BY LIST(MOD(f_int1,2))
PARTITION part2 VALUES IN (0), PARTITION part2 VALUES IN (0),
PARTITION part3 VALUES IN (1)); PARTITION part3 VALUES IN (1));
DROP TABLE t1; DROP TABLE t1;
# 3.5.2.2 VALUE IN (CAST(NULL AS SIGNED INTEGER)) # 3.5.2.2 VALUE IN (NULL)
CREATE TABLE t1 ( CREATE TABLE t1 (
f_int1 INTEGER, f_int1 INTEGER,
f_int2 INTEGER, f_int2 INTEGER,
...@@ -656,7 +656,7 @@ f_char2 CHAR(20), ...@@ -656,7 +656,7 @@ f_char2 CHAR(20),
f_charbig VARCHAR(1000) f_charbig VARCHAR(1000)
) )
PARTITION BY LIST(MOD(f_int1,2)) 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)); PARTITION part3 VALUES IN (1));
create_command create_command
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
...@@ -679,7 +679,7 @@ f_char2 CHAR(20), ...@@ -679,7 +679,7 @@ f_char2 CHAR(20),
f_charbig VARCHAR(1000) f_charbig VARCHAR(1000)
) )
PARTITION BY LIST(MOD(f_int1,2)) 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 part2 VALUES IN (0),
PARTITION part3 VALUES IN (1)); PARTITION part3 VALUES IN (1));
create_command create_command
......
...@@ -620,7 +620,7 @@ PARTITION BY RANGE(f_int1) ...@@ -620,7 +620,7 @@ PARTITION BY RANGE(f_int1)
PARTITION part2 VALUES LESS THAN (1000)); PARTITION part2 VALUES LESS THAN (1000));
ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '), ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '),
PARTITION part2 VALUES LESS THAN (1000))' at line 9 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 ( CREATE TABLE t1 (
f_int1 INTEGER, f_int1 INTEGER,
f_int2 INTEGER, f_int2 INTEGER,
...@@ -629,7 +629,7 @@ f_char2 CHAR(20), ...@@ -629,7 +629,7 @@ f_char2 CHAR(20),
f_charbig VARCHAR(1000) f_charbig VARCHAR(1000)
) )
PARTITION BY RANGE(f_int1) 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)); PARTITION part2 VALUES LESS THAN (1000));
ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '), ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '),
PARTITION part2 VALUES LESS THAN (1000))' at line 9 PARTITION part2 VALUES LESS THAN (1000))' at line 9
...@@ -647,7 +647,7 @@ PARTITION BY LIST(MOD(f_int1,2)) ...@@ -647,7 +647,7 @@ PARTITION BY LIST(MOD(f_int1,2))
PARTITION part2 VALUES IN (0), PARTITION part2 VALUES IN (0),
PARTITION part3 VALUES IN (1)); PARTITION part3 VALUES IN (1));
DROP TABLE t1; DROP TABLE t1;
# 3.5.2.2 VALUE IN (CAST(NULL AS SIGNED INTEGER)) # 3.5.2.2 VALUE IN (NULL)
CREATE TABLE t1 ( CREATE TABLE t1 (
f_int1 INTEGER, f_int1 INTEGER,
f_int2 INTEGER, f_int2 INTEGER,
...@@ -656,7 +656,7 @@ f_char2 CHAR(20), ...@@ -656,7 +656,7 @@ f_char2 CHAR(20),
f_charbig VARCHAR(1000) f_charbig VARCHAR(1000)
) )
PARTITION BY LIST(MOD(f_int1,2)) 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)); PARTITION part3 VALUES IN (1));
create_command create_command
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
...@@ -687,7 +687,7 @@ f_char2 CHAR(20), ...@@ -687,7 +687,7 @@ f_char2 CHAR(20),
f_charbig VARCHAR(1000) f_charbig VARCHAR(1000)
) )
PARTITION BY LIST(MOD(f_int1,2)) 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 part2 VALUES IN (0),
PARTITION part3 VALUES IN (1)); PARTITION part3 VALUES IN (1));
create_command create_command
......
...@@ -6,6 +6,8 @@ ndb_partition_range : cannot create t1 ...@@ -6,6 +6,8 @@ ndb_partition_range : cannot create t1
partition_bit_ndb : cannot create t1 partition_bit_ndb : cannot create t1
partition_int_ndb : cannot create t1 partition_int_ndb : cannot create t1
partition_syntax_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_value_ndb : cannot create t1
partition_basic_ndb : cannot create t1 partition_basic_ndb : cannot create t1
partition_alter1_ndb : timeout. Needs too much time. partition_alter1_ndb : timeout. Needs too much time.
...@@ -13,3 +15,6 @@ partition_alter2_ndb : cannot create t1 ...@@ -13,3 +15,6 @@ partition_alter2_ndb : cannot create t1
partition_char_innodb : crash. Bug? More investigations partition_char_innodb : crash. Bug? More investigations
partition_sessions : needs system_3_init.inc partition_sessions : needs system_3_init.inc
partition_engine_ndb : cannot create t1 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; ...@@ -36,6 +36,7 @@ let $debug= 0;
##### Storage engine to be tested ##### Storage engine to be tested
let $engine= 'InnoDB'; let $engine= 'InnoDB';
--source include/have_innodb.inc
##### max rows to be inserted ##### max rows to be inserted
let $maxrows=65535; let $maxrows=65535;
......
...@@ -36,6 +36,7 @@ let $debug= 0; ...@@ -36,6 +36,7 @@ let $debug= 0;
##### Storage engine to be tested ##### Storage engine to be tested
let $engine= 'InnoDB'; let $engine= 'InnoDB';
--source include/have_innodb.inc
##### max rows to be inserted ##### max rows to be inserted
let $maxrows=1024; let $maxrows=1024;
......
...@@ -36,6 +36,8 @@ let $debug= 0; ...@@ -36,6 +36,8 @@ let $debug= 0;
##### Storage engine to be tested ##### Storage engine to be tested
let $engine= 'InnoDB'; let $engine= 'InnoDB';
--source include/have_innodb.inc
##### number of rows to be inserted ##### number of rows to be inserted
let $maxrows=1024; let $maxrows=1024;
......
...@@ -36,6 +36,8 @@ let $debug= 0; ...@@ -36,6 +36,8 @@ let $debug= 0;
##### Storage engine to be tested ##### Storage engine to be tested
let $engine= 'InnoDB'; let $engine= 'InnoDB';
--source include/have_innodb.inc
##### Number of row to be inserted. ##### Number of row to be inserted.
let $maxrows=1024; let $maxrows=1024;
......
...@@ -36,6 +36,7 @@ let $debug= 0; ...@@ -36,6 +36,7 @@ let $debug= 0;
##### Storage engine to be tested ##### Storage engine to be tested
let $engine= 'InnoDB'; let $engine= 'InnoDB';
--source include/have_innodb.inc
##### max rows to be inserted ##### max rows to be inserted
let $maxrows=1024; let $maxrows=1024;
......
...@@ -36,6 +36,7 @@ let $debug= 0; ...@@ -36,6 +36,7 @@ let $debug= 0;
##### Storage engine to be tested ##### Storage engine to be tested
let $engine= 'InnoDB'; let $engine= 'InnoDB';
--source include/have_innodb.inc
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines # Execute the tests to be applied to all storage engines
......
--source include/have_partition.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc --source include/master-slave.inc
......
...@@ -83,4 +83,4 @@ sync_slave_with_master; ...@@ -83,4 +83,4 @@ sync_slave_with_master;
# will be created. You will need to go to the mysql-test dir and diff # 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 # 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
...@@ -51,7 +51,9 @@ DELETE FROM t2 WHERE a = 2; ...@@ -51,7 +51,9 @@ DELETE FROM t2 WHERE a = 2;
--echo --echo
--echo ******************** LOAD DATA INFILE ******************** --echo ******************** LOAD DATA INFILE ********************
LOAD DATA INFILE '../../suite/rpl/data/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ; --exec cp ./suite/rpl/data/rpl_mixed.dat $MYSQLTEST_VARDIR/tmp/
LOAD DATA INFILE '../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;
--exec rm $MYSQLTEST_VARDIR/tmp/rpl_mixed.dat
SELECT * FROM t1; SELECT * FROM t1;
--source suite/rpl/include/rpl_mixed_check_select.inc --source suite/rpl/include/rpl_mixed_check_select.inc
--source suite/rpl/include/rpl_mixed_clear_tables.inc --source suite/rpl/include/rpl_mixed_clear_tables.inc
...@@ -326,7 +328,7 @@ DROP VIEW v2; ...@@ -326,7 +328,7 @@ DROP VIEW v2;
--echo --echo
--echo ******************** SHOW BINLOG EVENTS ******************** --echo ******************** SHOW BINLOG EVENTS ********************
--replace_column 2 # 5 # --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; show binlog events from 1;
sync_slave_with_master; sync_slave_with_master;
# as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID # as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID
...@@ -342,4 +344,4 @@ sync_slave_with_master; ...@@ -342,4 +344,4 @@ sync_slave_with_master;
# will be created. You will need to go to the mysql-test dir and diff # 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 # 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
...@@ -103,7 +103,7 @@ DELETE FROM t1; ...@@ -103,7 +103,7 @@ DELETE FROM t1;
DELETE FROM t2; DELETE FROM t2;
******************** LOAD DATA INFILE ******************** ******************** LOAD DATA INFILE ********************
LOAD DATA INFILE '../../suite/rpl/data/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ; LOAD DATA INFILE '../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;
SELECT * FROM t1; SELECT * FROM t1;
a b a b
10 line A 10 line A
...@@ -683,13 +683,13 @@ INSERT INTO t1 VALUES(1, 'test1'); ...@@ -683,13 +683,13 @@ INSERT INTO t1 VALUES(1, 'test1');
CREATE EVENT e1 ON SCHEDULE EVERY '1' SECOND COMMENT 'e_second_comment' DO DELETE FROM t1; CREATE EVENT e1 ON SCHEDULE EVERY '1' SECOND COMMENT 'e_second_comment' DO DELETE FROM t1;
==========MASTER========== ==========MASTER==========
SHOW EVENTS; SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
test_rpl e1 root@localhost SYSTEM RECURRING NULL 1 # # NULL ENABLED 1 test_rpl e1 root@localhost SYSTEM RECURRING NULL 1 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
==========SLAVE=========== ==========SLAVE===========
USE test_rpl; USE test_rpl;
SHOW EVENTS; SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
test_rpl e1 @ SYSTEM RECURRING NULL 1 # # NULL SLAVESIDE_DISABLED 1 test_rpl e1 @ SYSTEM RECURRING NULL 1 # # NULL SLAVESIDE_DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
==========MASTER========== ==========MASTER==========
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
...@@ -743,13 +743,13 @@ a b ...@@ -743,13 +743,13 @@ a b
ALTER EVENT e1 RENAME TO e2; ALTER EVENT e1 RENAME TO e2;
==========MASTER========== ==========MASTER==========
SHOW EVENTS; SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
test_rpl e2 root@localhost SYSTEM RECURRING NULL 1 # # NULL ENABLED 1 test_rpl e2 root@localhost SYSTEM RECURRING NULL 1 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
==========SLAVE=========== ==========SLAVE===========
USE test_rpl; USE test_rpl;
SHOW EVENTS; SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
test_rpl e2 @ SYSTEM RECURRING NULL 1 # # NULL SLAVESIDE_DISABLED 1 test_rpl e2 @ SYSTEM RECURRING NULL 1 # # NULL SLAVESIDE_DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
==========MASTER========== ==========MASTER==========
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
...@@ -778,11 +778,11 @@ a b ...@@ -778,11 +778,11 @@ a b
DROP EVENT e2; DROP EVENT e2;
==========MASTER========== ==========MASTER==========
SHOW EVENTS; SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
==========SLAVE=========== ==========SLAVE===========
USE test_rpl; USE test_rpl;
SHOW EVENTS; SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
DELETE FROM t1; DELETE FROM t1;
DELETE FROM t2; DELETE FROM t2;
...@@ -793,32 +793,32 @@ CREATE VIEW v1 AS SELECT * FROM t1 WHERE a = 1; ...@@ -793,32 +793,32 @@ CREATE VIEW v1 AS SELECT * FROM t1 WHERE a = 1;
CREATE VIEW v2 AS SELECT * FROM t1 WHERE b <> UUID(); CREATE VIEW v2 AS SELECT * FROM t1 WHERE b <> UUID();
==========MASTER========== ==========MASTER==========
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where (`t1`.`a` = 1) v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where (`t1`.`a` = 1) latin1 latin1_swedish_ci
SELECT * FROM v1; SELECT * FROM v1;
a b a b
1 test1 1 test1
==========SLAVE=========== ==========SLAVE===========
USE test_rpl; USE test_rpl;
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where (`t1`.`a` = 1) v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where (`t1`.`a` = 1) latin1 latin1_swedish_ci
SELECT * FROM v1; SELECT * FROM v1;
a b a b
1 test1 1 test1
ALTER VIEW v1 AS SELECT * FROM t1 WHERE a = 2; ALTER VIEW v1 AS SELECT * FROM t1 WHERE a = 2;
==========MASTER========== ==========MASTER==========
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where (`t1`.`a` = 2) v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where (`t1`.`a` = 2) latin1 latin1_swedish_ci
SELECT * FROM v1; SELECT * FROM v1;
a b a b
2 test2 2 test2
==========SLAVE=========== ==========SLAVE===========
USE test_rpl; USE test_rpl;
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where (`t1`.`a` = 2) v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where (`t1`.`a` = 2) latin1 latin1_swedish_ci
SELECT * FROM v1; SELECT * FROM v1;
a b a b
2 test2 2 test2
...@@ -867,8 +867,8 @@ master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 ...@@ -867,8 +867,8 @@ master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
master-bin.000001 # Xid 1 # # master-bin.000001 # Xid 1 # #
master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2
master-bin.000001 # Xid 1 # # master-bin.000001 # Xid 1 # #
master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=30 master-bin.000001 # Begin_load_query 1 # ;file_id=#;block_len=#
master-bin.000001 # Execute_load_query 1 # use `test_rpl`; LOAD DATA INFILE '../../suite/rpl/data/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;file_id=1 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 # Xid 1 # #
master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
master-bin.000001 # Xid 1 # # master-bin.000001 # Xid 1 # #
...@@ -1004,9 +1004,7 @@ master-bin.000001 # Table_map 1 # table_id: # (test_rpl.t2) ...@@ -1004,9 +1004,7 @@ master-bin.000001 # Table_map 1 # table_id: # (test_rpl.t2)
master-bin.000001 # Write_rows 1 # table_id: # master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Xid 1 # # master-bin.000001 # Xid 1 # #
master-bin.000001 # Table_map 1 # table_id: # (test_rpl.t1) master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
master-bin.000001 # Table_map 1 # table_id: # (test_rpl.t2)
master-bin.000001 # Delete_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Xid 1 # # master-bin.000001 # Xid 1 # #
master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2
master-bin.000001 # Xid 1 # # master-bin.000001 # Xid 1 # #
......
...@@ -105,3 +105,21 @@ t n ...@@ -105,3 +105,21 @@ t n
2005-01-01 08:00:00 17 2005-01-01 08:00:00 17
drop table t1, t2; drop table t1, t2;
set global time_zone= @my_time_zone; set global time_zone= @my_time_zone;
End of 4.1 tests
CREATE TABLE t1 (a INT, b TIMESTAMP);
INSERT INTO t1 VALUES (1, NOW());
SET @@session.time_zone='Japan';
UPDATE t1 SET b= '1970-01-01 08:59:59' WHERE a= 1;
Warnings:
Warning 1264 Out of range value for column 'b' at row 1
SELECT * FROM t1 ORDER BY a;
a b
1 0000-00-00 00:00:00
SET @@session.time_zone='Japan';
SELECT * FROM t1 ORDER BY a;
a b
1 0000-00-00 00:00:00
SET @@session.time_zone = default;
DROP TABLE t1;
SET @@session.time_zone = default;
End of 5.0 tests
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
############################################################################## ##############################################################################
rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after CREATE/DROP TEMPORARY TABLE + ROLLBACK on master 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_ddl : Bug #29363 rpl.rpl_innodb_mixed_* test failures
rpl_innodb_mixed_dml : 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_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_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. rpl_stm_extraColmaster_ndb : WL#3915 : Statement-based replication not supported in ndb. Enable test when supported.
......
...@@ -14,6 +14,22 @@ connection slave; ...@@ -14,6 +14,22 @@ connection slave;
reset slave; reset slave;
start slave io_thread; start slave io_thread;
# Give the I/O thread time to block. # Give the I/O thread time to block.
let $run= 1;
let $counter= 300;
while ($run)
{
let $io_state= query_get_value("SHOW SLAVE STATUS", Slave_IO_State, 1);
if (`SELECT '$io_state' = 'Waiting for the slave SQL thread to free enough relay log space'`){
let $run= 0;
}
sleep 0.1;
if (!$counter){
--echo "Failed while waiting for slave IO thread block"
SHOW SLAVE STATUS;
exit;
}
dec $counter;
}
sleep 2; sleep 2;
# A bug caused the I/O thread to refuse stopping. # A bug caused the I/O thread to refuse stopping.
stop slave io_thread; stop slave io_thread;
......
...@@ -140,3 +140,30 @@ sync_slave_with_master; ...@@ -140,3 +140,30 @@ sync_slave_with_master;
# Restore original timezone # Restore original timezone
connection master; connection master;
set global time_zone= @my_time_zone; set global time_zone= @my_time_zone;
--echo End of 4.1 tests
#
# Bug #29536: timestamp inconsistent in replication around 1970
#
connection master;
CREATE TABLE t1 (a INT, b TIMESTAMP);
INSERT INTO t1 VALUES (1, NOW());
SET @@session.time_zone='Japan';
UPDATE t1 SET b= '1970-01-01 08:59:59' WHERE a= 1;
SELECT * FROM t1 ORDER BY a;
sync_slave_with_master;
SET @@session.time_zone='Japan';
# must procdure the same result as the SELECT on the master
SELECT * FROM t1 ORDER BY a;
SET @@session.time_zone = default;
connection master;
DROP TABLE t1;
SET @@session.time_zone = default;
--echo End of 5.0 tests
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
rpl_ndb_2innodb : BUG#19227 2006-04-20 pekka pk delete apparently not replicated 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_2myisam : BUG#19227 Seems to pass currently
rpl_ndb_dd_partitions : BUG#19259 2006-04-21 rpl_ndb_dd_partitions fails on s/AMD 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_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 #rpl_ndb_myisam2ndb : Bug#29549 rpl_ndb_myisam2ndb,rpl_ndb_innodb2ndb failed on Solaris for pack_length issue
rpl_ndb_ddl : BUG#28798 2007-05-31 lars Valgrind failure in NDB rpl_ndb_ddl : BUG#28798 2007-05-31 lars Valgrind failure in NDB
rpl_ndb_mix_innodb : BUG#28123 rpl_ndb_mix_innodb.test casue slave to core on sol10-sparc-a #rpl_ndb_mix_innodb : BUG#28123 rpl_ndb_mix_innodb.test casue slave to core on sol10-sparc-a
rpl_ndb_ctype_ucs2_def : BUG#27404 util thd mysql_parse sig11 when mysqld default multibyte charset rpl_ndb_ctype_ucs2_def : BUG#27404 util thd mysql_parse sig11 when mysqld default multibyte charset
......
#############################################################
# 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
--default-storage-engine=ndbcluster --new --default-storage-engine=ndbcluster
...@@ -7,8 +7,9 @@ ...@@ -7,8 +7,9 @@
# to be able to use the same code for all these different # to be able to use the same code for all these different
# test and to have control over the tests. # test and to have control over the tests.
############################################################## ##############################################################
-- source include/have_ndb.inc
-- source include/have_innodb.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 -- source include/ndb_master-slave.inc
SET storage_engine=innodb; SET storage_engine=innodb;
--source extra/rpl_tests/rpl_ndb_2multi_eng.test --source extra/rpl_tests/rpl_ndb_2multi_eng.test
--default-storage-engine=ndbcluster --new --default-storage-engine=ndbcluster
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
# to be able to use the same code for all these different # to be able to use the same code for all these different
# test and to have control over the tests. # 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 -- source include/ndb_master-slave.inc
SET storage_engine=myisam; SET storage_engine=myisam;
--source extra/rpl_tests/rpl_ndb_2multi_eng.test --source extra/rpl_tests/rpl_ndb_2multi_eng.test
...@@ -199,3 +199,11 @@ drop function func_26093_a; ...@@ -199,3 +199,11 @@ drop function func_26093_a;
drop function func_26093_b; drop function func_26093_b;
--echo End of 5.0 tests --echo End of 5.0 tests
#
# Bug #30389: connection_id() always return 0 in embedded server
#
select connection_id() > 0;
--echo End of tests
...@@ -3359,4 +3359,64 @@ EXPLAIN SELECT COUNT(*) FROM t1 f1 INNER JOIN t1 f2 ...@@ -3359,4 +3359,64 @@ EXPLAIN SELECT COUNT(*) FROM t1 f1 INNER JOIN t1 f2
WHERE 1 AND f1.b NOT IN (100,2232,3343,51111); WHERE 1 AND f1.b NOT IN (100,2232,3343,51111);
DROP TABLE t1; DROP TABLE t1;
#
# Bug #30396: crash for a join with equalities and sargable predicates
# in disjunctive parts of the WHERE condition
#
CREATE TABLE t1 (
c1 int(11) NOT NULL AUTO_INCREMENT,
c2 varchar(1000) DEFAULT NULL,
c3 bigint(20) DEFAULT NULL,
c4 bigint(20) DEFAULT NULL,
PRIMARY KEY (c1)
);
EXPLAIN EXTENDED
SELECT join_2.c1
FROM
t1 AS join_0,
t1 AS join_1,
t1 AS join_2,
t1 AS join_3,
t1 AS join_4,
t1 AS join_5,
t1 AS join_6,
t1 AS join_7
WHERE
join_0.c1=join_1.c1 AND
join_1.c1=join_2.c1 AND
join_2.c1=join_3.c1 AND
join_3.c1=join_4.c1 AND
join_4.c1=join_5.c1 AND
join_5.c1=join_6.c1 AND
join_6.c1=join_7.c1
OR
join_0.c2 < '?' AND
join_1.c2 < '?' AND
join_2.c2 > '?' AND
join_2.c2 < '!' AND
join_3.c2 > '?' AND
join_4.c2 = '?' AND
join_5.c2 <> '?' AND
join_6.c2 <> '?' AND
join_7.c2 >= '?' AND
join_0.c1=join_1.c1 AND
join_1.c1=join_2.c1 AND
join_2.c1=join_3.c1 AND
join_3.c1=join_4.c1 AND
join_4.c1=join_5.c1 AND
join_5.c1=join_6.c1 AND
join_6.c1=join_7.c1
GROUP BY
join_3.c1,
join_2.c1,
join_7.c1,
join_1.c1,
join_0.c1;
SHOW WARNINGS;
DROP TABLE t1;
--echo End of 5.0 tests --echo End of 5.0 tests
This diff is collapsed.
...@@ -212,7 +212,7 @@ BIN_FILES="extra/comp_err$BS extra/replace$BS extra/perror$BS \ ...@@ -212,7 +212,7 @@ BIN_FILES="extra/comp_err$BS extra/replace$BS extra/perror$BS \
if [ $BASE_SYSTEM = "netware" ] ; then if [ $BASE_SYSTEM = "netware" ] ; then
BIN_FILES="$BIN_FILES \ BIN_FILES="$BIN_FILES \
netware/mysqld_safe$BS netware/mysql_install_db$BS \ netware/mysqld_safe$BS netware/mysql_install_db$BS \
netware/init_db.sql netware/test_db.sql$BS \ netware/init_db.sql netware/test_db.sql \
netware/mysqlhotcopy$BS netware/libmysql$BS netware/init_secure_db.sql \ netware/mysqlhotcopy$BS netware/libmysql$BS netware/init_secure_db.sql \
"; ";
# For all other platforms: # For all other platforms:
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment