summaryrefslogtreecommitdiff
path: root/mysql-test/suite/ndb/t
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/ndb/t')
-rw-r--r--mysql-test/suite/ndb/t/disabled.def18
-rw-r--r--mysql-test/suite/ndb/t/loaddata_autocom_ndb.test4
-rw-r--r--mysql-test/suite/ndb/t/ndb_alter_table.test458
-rw-r--r--mysql-test/suite/ndb/t/ndb_alter_table2.test84
-rw-r--r--mysql-test/suite/ndb/t/ndb_alter_table3.test48
-rw-r--r--mysql-test/suite/ndb/t/ndb_auto_increment.test293
-rw-r--r--mysql-test/suite/ndb/t/ndb_autoinc.test45
-rw-r--r--mysql-test/suite/ndb/t/ndb_basic.test861
-rw-r--r--mysql-test/suite/ndb/t/ndb_binlog_basic.test80
-rw-r--r--mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test190
-rw-r--r--mysql-test/suite/ndb/t/ndb_binlog_discover.test36
-rw-r--r--mysql-test/suite/ndb/t/ndb_binlog_format.test35
-rw-r--r--mysql-test/suite/ndb/t/ndb_binlog_ignore_db-master.opt1
-rw-r--r--mysql-test/suite/ndb/t/ndb_binlog_ignore_db.test16
-rw-r--r--mysql-test/suite/ndb/t/ndb_binlog_log_bin.test49
-rw-r--r--mysql-test/suite/ndb/t/ndb_binlog_multi.test82
-rw-r--r--mysql-test/suite/ndb/t/ndb_bitfield.test124
-rw-r--r--mysql-test/suite/ndb/t/ndb_blob.test519
-rw-r--r--mysql-test/suite/ndb/t/ndb_blob_partition.test97
-rw-r--r--mysql-test/suite/ndb/t/ndb_bug26793.test35
-rw-r--r--mysql-test/suite/ndb/t/ndb_bug31477.test109
-rw-r--r--mysql-test/suite/ndb/t/ndb_cache.test122
-rw-r--r--mysql-test/suite/ndb/t/ndb_cache2.test361
-rw-r--r--mysql-test/suite/ndb/t/ndb_cache_multi.test71
-rw-r--r--mysql-test/suite/ndb/t/ndb_cache_multi2.test125
-rw-r--r--mysql-test/suite/ndb/t/ndb_charset.test257
-rw-r--r--mysql-test/suite/ndb/t/ndb_condition_pushdown.test2054
-rw-r--r--mysql-test/suite/ndb/t/ndb_config.test23
-rw-r--r--mysql-test/suite/ndb/t/ndb_config2.test7
-rw-r--r--mysql-test/suite/ndb/t/ndb_cursor.test47
-rw-r--r--mysql-test/suite/ndb/t/ndb_database.test24
-rw-r--r--mysql-test/suite/ndb/t/ndb_dd_alter.test274
-rw-r--r--mysql-test/suite/ndb/t/ndb_dd_basic.test485
-rw-r--r--mysql-test/suite/ndb/t/ndb_dd_ddl.test470
-rw-r--r--mysql-test/suite/ndb/t/ndb_dd_disk2memory.test292
-rw-r--r--mysql-test/suite/ndb/t/ndb_dd_dump.test289
-rw-r--r--mysql-test/suite/ndb/t/ndb_dd_sql_features.test551
-rw-r--r--mysql-test/suite/ndb/t/ndb_gis.test5
-rw-r--r--mysql-test/suite/ndb/t/ndb_grant.later385
-rw-r--r--mysql-test/suite/ndb/t/ndb_index.test131
-rw-r--r--mysql-test/suite/ndb/t/ndb_index_ordered.test488
-rw-r--r--mysql-test/suite/ndb/t/ndb_index_unique.test361
-rw-r--r--mysql-test/suite/ndb/t/ndb_insert.test641
-rw-r--r--mysql-test/suite/ndb/t/ndb_limit.test85
-rw-r--r--mysql-test/suite/ndb/t/ndb_load.test24
-rw-r--r--mysql-test/suite/ndb/t/ndb_loaddatalocal.test71
-rw-r--r--mysql-test/suite/ndb/t/ndb_lock.test269
-rw-r--r--mysql-test/suite/ndb/t/ndb_lock_table.test15
-rw-r--r--mysql-test/suite/ndb/t/ndb_minmax.test65
-rw-r--r--mysql-test/suite/ndb/t/ndb_multi.test154
-rw-r--r--mysql-test/suite/ndb/t/ndb_multi_row.test76
-rw-r--r--mysql-test/suite/ndb/t/ndb_partition_error.test74
-rw-r--r--mysql-test/suite/ndb/t/ndb_partition_error2-master.opt1
-rw-r--r--mysql-test/suite/ndb/t/ndb_partition_error2.test14
-rw-r--r--mysql-test/suite/ndb/t/ndb_partition_key.test244
-rw-r--r--mysql-test/suite/ndb/t/ndb_partition_list.test68
-rw-r--r--mysql-test/suite/ndb/t/ndb_partition_range.test269
-rw-r--r--mysql-test/suite/ndb/t/ndb_read_multi_range.test340
-rw-r--r--mysql-test/suite/ndb/t/ndb_rename.test36
-rw-r--r--mysql-test/suite/ndb/t/ndb_replace.test104
-rw-r--r--mysql-test/suite/ndb/t/ndb_restore.test413
-rw-r--r--mysql-test/suite/ndb/t/ndb_restore_compat.test67
-rw-r--r--mysql-test/suite/ndb/t/ndb_restore_different_endian_data.test185
-rw-r--r--mysql-test/suite/ndb/t/ndb_restore_partition-master.opt1
-rw-r--r--mysql-test/suite/ndb/t/ndb_restore_partition.test375
-rw-r--r--mysql-test/suite/ndb/t/ndb_restore_print.test193
-rw-r--r--mysql-test/suite/ndb/t/ndb_row_format.test86
-rw-r--r--mysql-test/suite/ndb/t/ndb_single_user.test174
-rw-r--r--mysql-test/suite/ndb/t/ndb_sp.test42
-rw-r--r--mysql-test/suite/ndb/t/ndb_subquery.test79
-rw-r--r--mysql-test/suite/ndb/t/ndb_temporary.test38
-rw-r--r--mysql-test/suite/ndb/t/ndb_tmp_table_and_DDL.test11
-rw-r--r--mysql-test/suite/ndb/t/ndb_transaction.test298
-rw-r--r--mysql-test/suite/ndb/t/ndb_trigger.test221
-rw-r--r--mysql-test/suite/ndb/t/ndb_truncate.test41
-rw-r--r--mysql-test/suite/ndb/t/ndb_types.test85
-rw-r--r--mysql-test/suite/ndb/t/ndb_update.test94
-rw-r--r--mysql-test/suite/ndb/t/ndb_update_no_read.test79
-rw-r--r--mysql-test/suite/ndb/t/ndb_view.test29
-rw-r--r--mysql-test/suite/ndb/t/ndbapi.test44
-rw-r--r--mysql-test/suite/ndb/t/ps_7ndb.test25
-rw-r--r--mysql-test/suite/ndb/t/strict_autoinc_5ndb.test10
82 files changed, 0 insertions, 15146 deletions
diff --git a/mysql-test/suite/ndb/t/disabled.def b/mysql-test/suite/ndb/t/disabled.def
deleted file mode 100644
index c3c046e7ece..00000000000
--- a/mysql-test/suite/ndb/t/disabled.def
+++ /dev/null
@@ -1,18 +0,0 @@
-##############################################################################
-#
-# List the test cases that are to be disabled temporarily.
-#
-# Separate the test case name and the comment with ':'.
-#
-# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
-#
-# Do not use any TAB characters for whitespace.
-#
-##############################################################################
-
-ndb_binlog_discover : Bug#54851 2010-07-02 alik ndb.ndb_binlog_discover crashes the server
-ndb_partition_error2 : Bug#40989 ndb_partition_error2 needs maintenance
-
-
-# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open
-ndb_alter_table3 : Bug#45621 2009-06-10 alik A few test files are disabled due to WL#4284
diff --git a/mysql-test/suite/ndb/t/loaddata_autocom_ndb.test b/mysql-test/suite/ndb/t/loaddata_autocom_ndb.test
deleted file mode 100644
index f4a6743aabe..00000000000
--- a/mysql-test/suite/ndb/t/loaddata_autocom_ndb.test
+++ /dev/null
@@ -1,4 +0,0 @@
---source include/have_ndb.inc
-let $engine_type=ndbcluster;
-
---source include/loaddata_autocom.inc
diff --git a/mysql-test/suite/ndb/t/ndb_alter_table.test b/mysql-test/suite/ndb/t/ndb_alter_table.test
deleted file mode 100644
index bf0f8a540bb..00000000000
--- a/mysql-test/suite/ndb/t/ndb_alter_table.test
+++ /dev/null
@@ -1,458 +0,0 @@
--- source include/have_multi_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1, t2;
-drop database if exists mysqltest;
---enable_warnings
-
-connect (con1,localhost,root,,test);
-connect (con2,localhost,root,,test);
-
-connection con2;
--- sleep 2
-connection con1;
-
-#
-# Basic test to show that the ALTER TABLE
-# is working
-#
-CREATE TABLE t1 (
- a INT NOT NULL,
- b INT NOT NULL
-) ENGINE=ndbcluster;
-
-INSERT INTO t1 VALUES (9410,9412);
-
-ALTER TABLE t1 ADD COLUMN c int not null;
-SELECT * FROM t1;
-
-DROP TABLE t1;
-
-#
-# Verfify changing table names between databases
-#
-CREATE DATABASE mysqltest;
-USE mysqltest;
-CREATE TABLE t1 (
- a INT NOT NULL,
- b INT NOT NULL
-) ENGINE=ndbcluster;
-RENAME TABLE t1 TO test.t1;
-SHOW TABLES;
-DROP DATABASE mysqltest;
-USE test;
-SHOW TABLES;
-DROP TABLE t1;
-
-#
-# More advanced test
-#
-create table t1 (
-col1 int not null auto_increment primary key,
-col2 varchar(30) not null,
-col3 varchar (20) not null,
-col4 varchar(4) not null,
-col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null,
-col6 int not null, to_be_deleted int) ENGINE=ndbcluster;
---replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 #
-show table status;
-SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO;
-insert into t1 values
-(0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7);
---replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 #
-show table status;
-select * from t1 order by col1;
-alter table t1
-add column col4_5 varchar(20) not null after col4,
-add column col7 varchar(30) not null after col5,
-add column col8 datetime not null, drop column to_be_deleted,
-change column col2 fourth varchar(30) not null after col3,
-modify column col6 int not null first;
---replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 #
-show table status;
-select * from t1 order by col1;
-insert into t1 values (2, NULL,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00');
---replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 #
-show table status;
-select * from t1 order by col1;
-delete from t1;
-insert into t1 values (0,0,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00');
-SET SQL_MODE='';
-insert into t1 values (1,0,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00');
-select * from t1 order by col1;
-alter table t1 drop column col4_5;
-insert into t1 values (2,0,4,3,5,"PENDING","EXTRA",'2004-01-01 00:00:00');
-select * from t1 order by col1;
-drop table t1;
-
-
-#
-# Check that invalidating dictionary cache works
-#
-
-CREATE TABLE t1 (
- a INT NOT NULL,
- b INT NOT NULL
-) ENGINE=ndbcluster;
-
-INSERT INTO t1 VALUES (9410,9412);
-
-ALTER TABLE t1 ADD COLUMN c int not null;
-select * from t1 order by a;
-
-connection con2;
-select * from t1 order by a;
-alter table t1 drop c;
-
-connection con1;
-select * from t1 order by a;
-drop table t1;
-
-connection con2;
---error 1146
-select * from t1 order by a;
-
-CREATE TABLE t1 (
- a INT NOT NULL PRIMARY KEY,
- b INT NOT NULL
-) ENGINE=ndbcluster;
-
-INSERT INTO t1 VALUES (0,1),(17,18);
-select * from t1 order by a;
-SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO;
-alter table t1 modify column a int not null auto_increment;
-SET SQL_MODE='';
-select * from t1 order by a;
-INSERT INTO t1 VALUES (0,19),(20,21);
-select * from t1 order by a;
-drop table t1;
-
-CREATE TABLE t1 (
- a INT NOT NULL PRIMARY KEY,
- b INT NOT NULL
-) ENGINE=ndbcluster;
-
-INSERT INTO t1 VALUES (0,1),(17,18);
-select * from t1 order by a;
-alter table t1 add c int not null unique auto_increment;
-select c from t1 order by c;
-INSERT INTO t1 VALUES (1,2,0),(18,19,4),(20,21,0);
-select c from t1 order by c;
-drop table t1;
-
-## Test moved to ndb_alter_table_row|stmt respectively as behaviour differs
-#create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) )
-#engine=ndb;
-#insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three');
-#create index c on t1(c);
-#connection server2;
-#select * from t1 where c = 'two';
-#connection server1;
-#alter table t1 drop index c;
-#connection server2;
-#select * from t1 where c = 'two';
-#connection server1;
-#drop table t1;
-
-#--disable_warnings
-#DROP TABLE IF EXISTS t2;
-#--enable_warnings
-
-#create table t2 (a int NOT NULL PRIMARY KEY) engine=myisam;
-#let $1=12001;
-#disable_query_log;
-#while ($1)
-#{
-# eval insert into t2 values($1);
-# dec $1;
-#}
-#enable_query_log;
-#alter table t2 engine=ndbcluster;
-#alter table t2 add c int;
-#--error 1297
-#delete from t2;
-#to make sure we do a full table scan
-#select count(*) from t2 where a+0 > 0;
-#truncate table t2;
-#select count(*) from t2;
-#drop table t2;
-
-## Test moved to ndb_alter_table_row|stmt respectively as behaviour differs
-#connection server1;
-#create table t3 (a int primary key) engine=ndbcluster;
-
-#connection server2;
-#begin;
-#insert into t3 values (1);
-
-#connection server1;
-#alter table t3 rename t4;
-
-#connection server2;
-## with rbr the below will not work as the "alter" event
-## explicitly invalidates the dictionary cache.
-### This should work as transaction is ongoing...
-##delete from t3;
-##insert into t3 values (1);
-#commit;
-
-## This should fail as its a new transaction
-#--error 1146
-#select * from t3;
-#select * from t4;
-#drop table t4;
-#show tables;
-#connection server1;
-
-create table t1 (
-ai bigint auto_increment,
-c001 int(11) not null,
-c002 int(11) not null,
-c003 int(11) not null,
-c004 int(11) not null,
-c005 int(11) not null,
-c006 int(11) not null,
-c007 int(11) not null,
-c008 int(11) not null,
-c009 int(11) not null,
-c010 int(11) not null,
-c011 int(11) not null,
-c012 int(11) not null,
-c013 int(11) not null,
-c014 int(11) not null,
-c015 int(11) not null,
-c016 int(11) not null,
-c017 int(11) not null,
-c018 int(11) not null,
-c019 int(11) not null,
-c020 int(11) not null,
-c021 int(11) not null,
-c022 int(11) not null,
-c023 int(11) not null,
-c024 int(11) not null,
-c025 int(11) not null,
-c026 int(11) not null,
-c027 int(11) not null,
-c028 int(11) not null,
-c029 int(11) not null,
-c030 int(11) not null,
-c031 int(11) not null,
-c032 int(11) not null,
-c033 int(11) not null,
-c034 int(11) not null,
-c035 int(11) not null,
-c036 int(11) not null,
-c037 int(11) not null,
-c038 int(11) not null,
-c039 int(11) not null,
-c040 int(11) not null,
-c041 int(11) not null,
-c042 int(11) not null,
-c043 int(11) not null,
-c044 int(11) not null,
-c045 int(11) not null,
-c046 int(11) not null,
-c047 int(11) not null,
-c048 int(11) not null,
-c049 int(11) not null,
-c050 int(11) not null,
-c051 int(11) not null,
-c052 int(11) not null,
-c053 int(11) not null,
-c054 int(11) not null,
-c055 int(11) not null,
-c056 int(11) not null,
-c057 int(11) not null,
-c058 int(11) not null,
-c059 int(11) not null,
-c060 int(11) not null,
-c061 int(11) not null,
-c062 int(11) not null,
-c063 int(11) not null,
-c064 int(11) not null,
-c065 int(11) not null,
-c066 int(11) not null,
-c067 int(11) not null,
-c068 int(11) not null,
-c069 int(11) not null,
-c070 int(11) not null,
-c071 int(11) not null,
-c072 int(11) not null,
-c073 int(11) not null,
-c074 int(11) not null,
-c075 int(11) not null,
-c076 int(11) not null,
-c077 int(11) not null,
-c078 int(11) not null,
-c079 int(11) not null,
-c080 int(11) not null,
-c081 int(11) not null,
-c082 int(11) not null,
-c083 int(11) not null,
-c084 int(11) not null,
-c085 int(11) not null,
-c086 int(11) not null,
-c087 int(11) not null,
-c088 int(11) not null,
-c089 int(11) not null,
-c090 int(11) not null,
-c091 int(11) not null,
-c092 int(11) not null,
-c093 int(11) not null,
-c094 int(11) not null,
-c095 int(11) not null,
-c096 int(11) not null,
-c097 int(11) not null,
-c098 int(11) not null,
-c099 int(11) not null,
-c100 int(11) not null,
-c101 int(11) not null,
-c102 int(11) not null,
-c103 int(11) not null,
-c104 int(11) not null,
-c105 int(11) not null,
-c106 int(11) not null,
-c107 int(11) not null,
-c108 int(11) not null,
-c109 int(11) not null,
-primary key (ai),
-unique key tx1 (c002, c003, c004, c005)) engine=ndb;
-
-create index tx2
-on t1 (c010, c011, c012, c013);
-
-drop table t1;
-
-# End of 4.1 tests
-
-# On-line alter table
-
-
-CREATE TABLE t1 (
- auto int(5) unsigned NOT NULL auto_increment,
- string char(10),
- vstring varchar(10),
- bin binary(2),
- vbin varbinary(7),
- tiny tinyint(4) DEFAULT '0' NOT NULL ,
- short smallint(6) DEFAULT '1' NOT NULL ,
- medium mediumint(8) DEFAULT '0' NOT NULL,
- long_int int(11) DEFAULT '0' NOT NULL,
- longlong bigint(13) DEFAULT '0' NOT NULL,
- real_float float(13,1) DEFAULT 0.0 NOT NULL,
- real_double double(16,4),
- real_decimal decimal(16,4),
- utiny tinyint(3) unsigned DEFAULT '0' NOT NULL,
- ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL,
- umedium mediumint(8) unsigned DEFAULT '0' NOT NULL,
- ulong int(11) unsigned DEFAULT '0' NOT NULL,
- ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL,
- bits bit(3),
- options enum('zero','one','two','three','four') not null,
- flags set('zero','one','two','three','four') not null,
- date_field date,
- year_field year,
- time_field time,
- date_time datetime,
- time_stamp timestamp,
- PRIMARY KEY (auto)
-) engine=ndb;
-
-CREATE TEMPORARY TABLE ndb_show_tables (id INT, type VARCHAR(20), state VARCHAR(20), logging VARCHAR(20), _database VARCHAR(255), _schema VARCHAR(20), name VARCHAR(255));
-
---disable_warnings
-let $MYSQLD_DATADIR= `select @@datadir`;
---exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLD_DATADIR/test/tmp.dat
-LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables;
---enable_warnings
-
-# Ndb doesn't support renaming attributes on-line
-set @t1_id = (select id from ndb_show_tables where name like '%t1%');
-truncate ndb_show_tables;
-
-alter table t1 change tiny new_tiny tinyint(4) DEFAULT '0' NOT NULL;
---disable_warnings
---exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLD_DATADIR/test/tmp.dat
-LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables;
---enable_warnings
-
-select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%';
-
-set @t1_id = (select id from ndb_show_tables where name like '%t1%');
-truncate ndb_show_tables;
-
-create index i1 on t1(medium);
-alter table t1 add index i2(new_tiny);
-drop index i1 on t1;
-
---disable_warnings
---exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLD_DATADIR/test/tmp.dat
-LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables;
---exec rm $MYSQLD_DATADIR/test/tmp.dat || true
---enable_warnings
-
-select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%';
-
-DROP TABLE t1, ndb_show_tables;
-
-# simple test that auto incr is not lost at rename or alter
-create table t1 (a int primary key auto_increment, b int) engine=ndb;
-insert into t1 (b) values (101),(102),(103);
-select * from t1 where a = 3;
-alter table t1 rename t2;
-insert into t2 (b) values (201),(202),(203);
-select * from t2 where a = 6;
-alter table t2 add c int;
-insert into t2 (b) values (301),(302),(303);
-select * from t2 where a = 9;
-alter table t2 rename t1;
-insert into t1 (b) values (401),(402),(403);
-select * from t1 where a = 12;
-drop table t1;
-
-# some other ALTER combinations
-# Check add/drop primary key (not supported on-line)
-create table t1(a int not null) engine=ndb;
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY
-insert into t1 values (1),(2),(3);
-alter table t1 add primary key (a);
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY
-update t1 set a = 17 where a = 1;
-select * from t1 order by a;
-alter table t1 drop primary key;
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY
-update t1 set a = 1 where a = 17;
-select * from t1 order by a;
-drop table t1;
-
-# bug#31233 mysql_alter_table() fails to drop UNIQUE KEY
-create table t1(a int not null) engine=ndb;
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY
-insert into t1 values (1),(2),(3);
-create unique index pk on t1(a);
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY
-update t1 set a = 17 where a = 1;
-select * from t1 order by a;
-alter table t1 drop index pk;
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY
-update t1 set a = 1 where a = 17;
-select * from t1 order by a;
-drop table t1;
-
-# alter .. alter
-create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb;
-show create table t1;
-alter table t1 alter b set default 1;
-show create table t1;
-drop table t1;
-
-# alter .. order by
-create table t1 (a int not null, b int not null) engine=ndb;
-insert into t1 values (1, 300), (2, 200), (3, 100);
-select * from t1 order by a;
-alter table t1 order by b;
-select * from t1 order by b;
-drop table t1;
-
---echo End of 5.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_alter_table2.test b/mysql-test/suite/ndb/t/ndb_alter_table2.test
deleted file mode 100644
index f078ed6b479..00000000000
--- a/mysql-test/suite/ndb/t/ndb_alter_table2.test
+++ /dev/null
@@ -1,84 +0,0 @@
--- source include/have_multi_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-connect (con1,localhost,root,,test);
-connect (con2,localhost,root,,test);
-connect (con3,localhost,root,,test);
-connect (con4,localhost,root,,test);
-connect (con5,localhost,root,,test);
-connect (con6,localhost,root,,test);
-
-CREATE TABLE t1 (
- a INT NOT NULL PRIMARY KEY,
- b INT NOT NULL
-) ENGINE=ndbcluster;
-
-connection con1;
-BEGIN;
-INSERT INTO t1 VALUES (9410,9412);
-connection con2;
-BEGIN;
---send
-INSERT INTO t1 VALUES (9411,9412);
-connection con3;
-BEGIN;
---send
-INSERT INTO t1 VALUES (9412,9412);
-connection con4;
-BEGIN;
---send
-INSERT INTO t1 VALUES (9413,9412);
-connection con5;
-BEGIN;
---send
-INSERT INTO t1 VALUES (9414,9412);
-connection con6;
-BEGIN;
---send
-INSERT INTO t1 VALUES (9415,9412);
-connection con1;
-sleep 1;
-
-ROLLBACK;
-connection con2;
-reap;
-ROLLBACK;
-connection con3;
-reap;
-ROLLBACK;
-connection con4;
-reap;
-ROLLBACK;
-connection con5;
-reap;
-ROLLBACK;
-connection con6;
-reap;
-ROLLBACK;
-
-connection server2;
-
-drop table t1;
-CREATE TABLE t1 (
- a INT NOT NULL PRIMARY KEY,
- b INT NOT NULL,
- c INT NOT NULL
-) ENGINE=ndbcluster;
-
-connection server1;
-
---disable_result_log
---error 0,1412
-select * from t1;
---enable_result_log
-select * from t1;
-select * from t1;
-select * from t1;
-select * from t1;
-select * from t1;
-
-drop table t1;
diff --git a/mysql-test/suite/ndb/t/ndb_alter_table3.test b/mysql-test/suite/ndb/t/ndb_alter_table3.test
deleted file mode 100644
index 86e664b23b0..00000000000
--- a/mysql-test/suite/ndb/t/ndb_alter_table3.test
+++ /dev/null
@@ -1,48 +0,0 @@
--- source include/have_multi_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-connection server1;
-create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) )
-engine=ndb;
-insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three');
-create index c on t1(c);
-connection server2;
-show indexes from t1;
-select * from t1 where c = 'two';
-connection server1;
-alter table t1 drop index c;
-connection server2;
-show indexes from t1;
-select * from t1 where c = 'two';
-connection server1;
-drop table t1;
-
-connection server1;
-create table t3 (a int primary key) engine=ndbcluster;
-
-connection server2;
-begin;
-insert into t3 values (1);
-
-connection server1;
-alter table t3 rename t4;
-
-connection server2;
-# with rbr the below will not work as the "alter" event
-# explicitly invalidates the dictionary cache.
-## This should work as transaction is ongoing...
-#delete from t3;
-#insert into t3 values (1);
-commit;
-
-# This should fail as its a new transaction
---error 1146
-select * from t3;
-select * from t4;
-drop table t4;
-show tables;
-connection server1;
diff --git a/mysql-test/suite/ndb/t/ndb_auto_increment.test b/mysql-test/suite/ndb/t/ndb_auto_increment.test
deleted file mode 100644
index 33021331e44..00000000000
--- a/mysql-test/suite/ndb/t/ndb_auto_increment.test
+++ /dev/null
@@ -1,293 +0,0 @@
--- source include/have_multi_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-connection server1;
-DROP TABLE IF EXISTS t1,t2;
-connection server2;
-DROP TABLE IF EXISTS t1;
-connection server1;
---enable_warnings
-
-set @old_auto_increment_offset = @@session.auto_increment_offset;
-set @old_auto_increment_increment = @@session.auto_increment_increment;
-set @old_ndb_autoincrement_prefetch_sz = @@session.ndb_autoincrement_prefetch_sz;
-
-flush status;
-
-create table t1 (a int not null auto_increment primary key) engine ndb;
-
-# Step 1: Verify simple insert
-insert into t1 values (NULL);
-select * from t1 order by a;
-
-# Step 2: Verify simple update with higher than highest value causes
-# next insert to use updated_value + 1
-update t1 set a = 5 where a = 1;
-insert into t1 values (NULL);
-select * from t1 order by a;
-
-# Step 3: Verify insert that inserts higher than highest value causes
-# next insert to use inserted_value + 1
-insert into t1 values (7);
-insert into t1 values (NULL);
-select * from t1 order by a;
-
-# Step 4: Verify that insert into hole, lower than highest value doesn't
-# affect next insert
-insert into t1 values (2);
-insert into t1 values (NULL);
-select * from t1 order by a;
-
-# Step 5: Verify that update into hole, lower than highest value doesn't
-# affect next insert
-update t1 set a = 4 where a = 2;
-insert into t1 values (NULL);
-select * from t1 order by a;
-
-# Step 6: Verify that delete of highest value doesn't cause the next
-# insert to reuse this value
-delete from t1 where a = 10;
-insert into t1 values (NULL);
-select * from t1 order by a;
-
-# Step 7: Verify that REPLACE has the same effect as INSERT
-replace t1 values (NULL);
-select * from t1 order by a;
-replace t1 values (15);
-select * from t1 order by a;
-replace into t1 values (NULL);
-select * from t1 order by a;
-
-# Step 8: Verify that REPLACE has the same effect as UPDATE
-replace t1 values (15);
-select * from t1 order by a;
-
-# Step 9: Verify that IGNORE doesn't affect auto_increment
-insert ignore into t1 values (NULL);
-select * from t1 order by a;
-insert ignore into t1 values (15), (NULL);
-select * from t1 order by a;
-
-# Step 10: Verify that on duplicate key as UPDATE behaves as an
-# UPDATE
-insert into t1 values (15)
-on duplicate key update a = 20;
-insert into t1 values (NULL);
-select * from t1 order by a;
-
-# Step 11: Verify that on duplicate key as INSERT behaves as INSERT
-insert into t1 values (NULL) on duplicate key update a = 30;
-select * from t1 order by a;
-insert into t1 values (30) on duplicate key update a = 40;
-select * from t1 order by a;
-
-#Step 12: Vefify INSERT IGNORE (bug#32055)
-insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL);
-select * from t1 order by a;
-drop table t1;
-
-#Step 13: Verify auto_increment of unique key
-create table t1 (a int not null primary key,
- b int not null unique auto_increment) engine ndb;
-insert into t1 values (1, NULL);
-insert into t1 values (3, NULL);
-update t1 set b = 3 where a = 3;
-insert into t1 values (4, NULL);
-select * from t1 order by a;
-drop table t1;
-
-#Step 14: Verify that auto_increment_increment and auto_increment_offset
-# work as expected
-
-CREATE TABLE t1 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=NDBCLUSTER;
-
-CREATE TABLE t2 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=MYISAM;
-
-SET @@session.auto_increment_increment=10;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-SELECT * FROM t1 ORDER BY pk;
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-TRUNCATE t1;
-TRUNCATE t2;
-SET @@session.auto_increment_offset=5;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t1 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6);
-SELECT * FROM t1 ORDER BY pk;
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-TRUNCATE t1;
-TRUNCATE t2;
-SET @@session.auto_increment_increment=2;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-SELECT * FROM t1 ORDER BY pk;
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-DROP TABLE t1, t2;
-
-CREATE TABLE t1 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7;
-
-CREATE TABLE t2 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=MYISAM AUTO_INCREMENT = 7;
-
-SET @@session.auto_increment_offset=1;
-SET @@session.auto_increment_increment=1;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-SELECT * FROM t1 ORDER BY pk;
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-DROP TABLE t1, t2;
-
-CREATE TABLE t1 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=NDBCLUSTER AUTO_INCREMENT = 3;
-
-CREATE TABLE t2 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=MYISAM AUTO_INCREMENT = 3;
-
-SET @@session.auto_increment_offset=5;
-SET @@session.auto_increment_increment=10;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-SELECT * FROM t1 ORDER BY pk;
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-DROP TABLE t1, t2;
-
-CREATE TABLE t1 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7;
-
-CREATE TABLE t2 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=MYISAM AUTO_INCREMENT = 7;
-
-SET @@session.auto_increment_offset=5;
-SET @@session.auto_increment_increment=10;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-SELECT * FROM t1 ORDER BY pk;
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-DROP TABLE t1, t2;
-
-CREATE TABLE t1 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=NDBCLUSTER AUTO_INCREMENT = 5;
-
-CREATE TABLE t2 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=MYISAM AUTO_INCREMENT = 5;
-
-SET @@session.auto_increment_offset=5;
-SET @@session.auto_increment_increment=10;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-SELECT * FROM t1 ORDER BY pk;
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-DROP TABLE t1, t2;
-
-CREATE TABLE t1 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=NDBCLUSTER AUTO_INCREMENT = 100;
-
-CREATE TABLE t2 (
- pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=MYISAM AUTO_INCREMENT = 100;
-
-SET @@session.auto_increment_offset=5;
-SET @@session.auto_increment_increment=10;
-INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2);
-INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2);
-SELECT * FROM t1 ORDER BY pk;
-SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c;
-DROP TABLE t1, t2;
-
-#Step 15: Now verify that behaviour on multiple MySQL Servers behave
-# properly. Start by dropping table and recreating it to start
-# counters and id caches from zero again.
---disable_warnings
-connection server2;
-SET @@session.auto_increment_offset=1;
-SET @@session.auto_increment_increment=1;
-set ndb_autoincrement_prefetch_sz = 32;
-drop table if exists t1;
-connection server1;
-SET @@session.auto_increment_offset=1;
-SET @@session.auto_increment_increment=1;
-set ndb_autoincrement_prefetch_sz = 32;
---enable_warnings
-
-
-create table t1 (a int not null auto_increment primary key) engine ndb;
-# Basic test, ensure that the second server gets a new range.
-#Generate record with key = 1
-insert into t1 values (NULL);
-connection server2;
-#Generate record with key = 33
-insert into t1 values (NULL);
-connection server1;
-select * from t1 order by a;
-
-#This insert should not affect the range of the second server
-insert into t1 values (20);
-connection server2;
-insert into t1 values (NULL);
-select * from t1 order by a;
-
-connection server1;
-#This insert should remove cached values but also skip values already
-#taken by server2, given that there is no method of communicating with
-#the other server it should also cause a conflict
-connection server1;
-
-insert into t1 values (35);
-insert into t1 values (NULL);
-connection server2;
---error ER_DUP_ENTRY, ER_DUP_KEY
-insert into t1 values (NULL);
-select * from t1 order by a;
-
-insert into t1 values (100);
-insert into t1 values (NULL);
-connection server1;
-insert into t1 values (NULL);
-select * from t1 order by a;
-
-set auto_increment_offset = @old_auto_increment_offset;
-set auto_increment_increment = @old_auto_increment_increment;
-set ndb_autoincrement_prefetch_sz = @old_ndb_autoincrement_prefetch_sz;
-
-drop table t1;
diff --git a/mysql-test/suite/ndb/t/ndb_autoinc.test b/mysql-test/suite/ndb/t/ndb_autoinc.test
deleted file mode 100644
index a5ae52c88d7..00000000000
--- a/mysql-test/suite/ndb/t/ndb_autoinc.test
+++ /dev/null
@@ -1,45 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1,t2,t3;
---enable_warnings
-
-USE test;
-
-CREATE TABLE t1 (
- id INT AUTO_INCREMENT,
- PRIMARY KEY(id)
-) ENGINE=NDBCLUSTER;
-
-# Test For bug#30417
---error 1005
-
-CREATE TABLE t2 (
- id INT AUTO_INCREMENT,
- KEY(id)
-) ENGINE=NDBCLUSTER;
-
-SHOW TABLES;
-
-CREATE TABLE t3 (
- id INT AUTO_INCREMENT,
- KEY(id)
-) ENGINE=MYISAM;
-
---disable_result_log
---error 1005
-ALTER TABLE t3
-ENGINE NDBCLUSTER;
---enable_result_log
-
-SHOW CREATE TABLE t3;
-
-ALTER TABLE t3
-ADD PRIMARY KEY (id);
-
-SHOW CREATE TABLE t3;
-
-DROP TABLE t1, t3;
-
---echo End of 5.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_basic.test b/mysql-test/suite/ndb/t/ndb_basic.test
deleted file mode 100644
index 2fc140288ca..00000000000
--- a/mysql-test/suite/ndb/t/ndb_basic.test
+++ /dev/null
@@ -1,861 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
-drop database if exists mysqltest;
---enable_warnings
-
-# workaround for bug#16445
-# remove to reproduce bug and run tests from ndb start
-# and with ndb_autodiscover disabled. Fails on Linux 50 % of the times
-CREATE TABLE t1 (
- pk1 INT NOT NULL PRIMARY KEY,
- attr1 INT NOT NULL,
- attr2 INT,
- attr3 VARCHAR(10)
-) ENGINE=ndbcluster;
-drop table t1;
-
-#
-# Basic test to show that the NDB
-# table handler is working
-#
-
-#
-# Show status and variables
-#
---replace_column 2 #
-SHOW GLOBAL STATUS LIKE 'ndb%';
---replace_column 2 #
-SHOW GLOBAL VARIABLES LIKE 'ndb%';
-
-#
-# Create a normal table with primary key
-#
-CREATE TABLE t1 (
- pk1 INT NOT NULL PRIMARY KEY,
- attr1 INT NOT NULL,
- attr2 INT,
- attr3 VARCHAR(10)
-) ENGINE=ndbcluster;
-
-SHOW INDEX FROM t1;
-INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413');
-SHOW INDEX FROM t1;
-SELECT pk1 FROM t1 ORDER BY pk1;
-SELECT * FROM t1 ORDER BY pk1;
-SELECT t1.* FROM t1 ORDER BY pk1;
-
-# Update on record by primary key
-UPDATE t1 SET attr1=1 WHERE pk1=9410;
-SELECT * FROM t1 ORDER BY pk1;
-
-# Update primary key
-UPDATE t1 SET pk1=2 WHERE attr1=1;
-SELECT * FROM t1 ORDER BY pk1;
-UPDATE t1 SET pk1=pk1 + 1;
-SELECT * FROM t1 ORDER BY pk1;
-UPDATE t1 SET pk1=4 WHERE pk1 = 3;
-SELECT * FROM t1 ORDER BY pk1;
-
-# Delete the record
-DELETE FROM t1;
-SELECT * FROM t1;
-
-# Insert more records and update them all at once
-INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9408, 8765, NULL, '8765'),
-(7,8, NULL, NULL), (8,9, NULL, NULL), (9,10, NULL, NULL), (10,11, NULL, NULL), (11,12, NULL, NULL), (12,13, NULL, NULL), (13,14, NULL, NULL);
-UPDATE t1 SET attr1 = 9999;
-SELECT * FROM t1 ORDER BY pk1;
-
-UPDATE t1 SET attr1 = 9998 WHERE pk1 < 1000;
-SELECT * FROM t1 ORDER BY pk1;
-
-UPDATE t1 SET attr1 = 9997 WHERE attr1 = 9999;
-SELECT * FROM t1 ORDER BY pk1;
-
-# Delete one record by specifying pk
-DELETE FROM t1 WHERE pk1 = 9410;
-SELECT * FROM t1 ORDER BY pk1;
-
-# Delete all from table
-DELETE FROM t1;
-SELECT * FROM t1;
-
-# Insert three records with attr1=4 and two with attr1=5
-# Delete all with attr1=4
-INSERT INTO t1 values (1, 4, NULL, NULL), (2, 4, NULL, NULL), (3, 5, NULL, NULL), (4, 4, NULL, NULL), (5, 5, NULL, NULL);
-DELETE FROM t1 WHERE attr1=4;
-SELECT * FROM t1 order by pk1;
-DELETE FROM t1;
-
-# Insert two records and delete one
-INSERT INTO t1 VALUES (9410,9412, NULL, NULL), (9411, 9413, NULL, NULL);
-DELETE FROM t1 WHERE pk1 = 9410;
-SELECT * FROM t1;
-DROP TABLE t1;
-
-#
-# Create table without primary key
-# a hidden primary key column is created by handler
-#
-CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster;
-INSERT INTO t1 values(3456, 7890);
-SELECT * FROM t1;
-UPDATE t1 SET id=2 WHERE id2=12;
-SELECT * FROM t1;
-UPDATE t1 SET id=1234 WHERE id2=7890;
-SELECT * FROM t1;
-DELETE FROM t1;
-
-INSERT INTO t1 values(3456, 7890), (3456, 7890), (3456, 7890), (3454, 7890);
-SELECT * FROM t1 ORDER BY id;
-DELETE FROM t1 WHERE id = 3456;
-SELECT * FROM t1 ORDER BY id;
-
-DROP TABLE t1;
-
-# test create with the keyword "engine=NDBCLUSTER"
-CREATE TABLE t1 (
- pk1 INT NOT NULL PRIMARY KEY,
- attr1 INT NOT NULL
-) ENGINE=NDBCLUSTER;
-
-INSERT INTO t1 values(1, 9999);
-
-DROP TABLE t1;
-
-# test create with the keyword "engine=NDB"
-CREATE TABLE t1 (
- pk1 INT NOT NULL PRIMARY KEY,
- attr1 INT NOT NULL
-) ENGINE=NDB;
-
-INSERT INTO t1 values(1, 9999);
-
-DROP TABLE t1;
-
-
-#
-# A more extensive test with a lot more records
-#
-
-CREATE TABLE t2 (
- a bigint unsigned NOT NULL PRIMARY KEY,
- b int unsigned not null,
- c int unsigned
-) engine=ndbcluster;
-
-CREATE TABLE t3 (
- a bigint unsigned NOT NULL,
- b bigint unsigned not null,
- c bigint unsigned,
- PRIMARY KEY(a)
-) engine=ndbcluster;
-
-CREATE TABLE t4 (
- a bigint unsigned NOT NULL,
- b bigint unsigned not null,
- c bigint unsigned NOT NULL,
- d int unsigned,
- PRIMARY KEY(a, b, c)
-) engine=ndbcluster;
-
-
-#
-# insert more records into tables
-#
-let $1=1000;
-disable_query_log;
-while ($1)
-{
- eval insert into t2 values($1, $1+9, 5);
- eval insert into t3 values($1, $1+9, 5);
- eval insert into t4 values($1, $1+9, 5, $1+26000);
- dec $1;
-}
-enable_query_log;
-
-
-#
-# delete every other record in the tables
-#
-let $1=1000;
-disable_query_log;
-while ($1)
-{
- eval delete from t2 where a=$1;
- eval delete from t3 where a=$1;
- eval delete from t4 where a=$1 and b=$1+9 and c=5;
- dec $1;
- dec $1;
-}
-enable_query_log;
-
-
-select * from t2 where a = 7 order by b;
-select * from t2 where a = 7 order by a;
-select * from t2 where a = 7 order by 2;
-select * from t2 where a = 7 order by c;
-
-select * from t2 where a = 7 and b = 16 order by b;
-select * from t2 where a = 7 and b = 16 order by a;
-select * from t2 where a = 7 and b = 17 order by a;
-select * from t2 where a = 7 and b != 16 order by b;
-
-select * from t2 where a = 7 and b = 16 and c = 5 order by b;
-select * from t2 where a = 7 and b = 16 and c = 5 order by a;
-select * from t2 where a = 7 and b = 16 and c = 6 order by a;
-select * from t2 where a = 7 and b != 16 and c = 5 order by b;
-
-select * from t3 where a = 7 order by b;
-select * from t3 where a = 7 order by a;
-select * from t3 where a = 7 order by 2;
-select * from t3 where a = 7 order by c;
-
-select * from t3 where a = 7 and b = 16 order by b;
-select * from t3 where a = 7 and b = 16 order by a;
-select * from t3 where a = 7 and b = 17 order by a;
-select * from t3 where a = 7 and b != 16 order by b;
-
-select * from t4 where a = 7 order by b;
-select * from t4 where a = 7 order by a;
-select * from t4 where a = 7 order by 2;
-select * from t4 where a = 7 order by c;
-
-select * from t4 where a = 7 and b = 16 order by b;
-select * from t4 where a = 7 and b = 16 order by a;
-select * from t4 where a = 7 and b = 17 order by a;
-select * from t4 where a = 7 and b != 16 order by b;
-
-#
-# update records
-#
-let $1=1000;
-disable_query_log;
-while ($1)
-{
- eval update t2 set c=$1 where a=$1;
- eval update t3 set c=7 where a=$1 and b=$1+9 and c=5;
- eval update t4 set d=$1+21987 where a=$1 and b=$1+9 and c=5;
- dec $1;
- dec $1;
-}
-enable_query_log;
-
-delete from t2 where a > 5;
-select x1.a, x1.b from t2 x1, t2 x2 where x1.b = x2.b order by x1.a;
-select a, b FROM t2 outer_table where
-a = (select a from t2 where b = outer_table.b ) order by a;
-
-
-delete from t2;
-delete from t3;
-delete from t4;
-
-drop table t2;
-drop table t3;
-drop table t4;
-
-#
-# Test delete and update from table with 3 keys
-#
-
-CREATE TABLE t5 (
- a bigint unsigned NOT NULL,
- b bigint unsigned not null,
- c bigint unsigned NOT NULL,
- d int unsigned,
- PRIMARY KEY(a, b, c)
-) engine=ndbcluster;
-
-insert into t5 values(10, 19, 5, 26010);
-
-delete from t5 where a=10 and b=19 and c=5;
-
-select * from t5;
-
-insert into t5 values(10, 19, 5, 26010);
-
-update t5 set d=21997 where a=10 and b=19 and c=5;
-
-select * from t5;
-
-delete from t5;
-
-drop table t5;
-
-#
-# Test using table with a char(255) column first in table
-#
-
-CREATE TABLE t6 (
- adress char(255),
- a int NOT NULL PRIMARY KEY,
- b int
-) engine = NDB;
-
-insert into t6 values
- ("Nice road 3456", 1, 23),
- ("Street Road 78", 3, 92),
- ("Road street 89C", 5, 71),
- (NULL, 7, NULL);
-select * from t6 order by a;
-select a, b from t6 order by a;
-
-update t6 set adress="End of road 09" where a=3;
-update t6 set b=181, adress="Street 76" where a=7;
-select * from t6 order by a;
-select * from t6 where a=1;
-delete from t6 where a=1;
-select * from t6 order by a;
-delete from t6 where b=71;
-select * from t6 order by a;
-
-drop table t6;
-
-#
-# Test using table with a char(255) column first in table and a
-# primary key consisting of two columns
-#
-
-CREATE TABLE t7 (
- adress char(255),
- a int NOT NULL,
- b int,
- c int NOT NULL,
- PRIMARY KEY(a, c)
-) engine = NDB;
-
-insert into t7 values
- ("Highway 3456", 1, 23, 2),
- ("Street Road 78", 3, 92, 3),
- ("Main street 89C", 5, 71, 4),
- (NULL, 8, NULL, 12);
-select * from t7 order by a;
-select a, b from t7 order by a;
-
-update t7 set adress="End of road 09" where a=3;
-update t7 set adress="Gatuvägen 90C" where a=5 and c=4;
-update t7 set adress="No adress" where adress is NULL;
-select * from t7 order by a;
-select * from t7 where a=1 and c=2;
-delete from t7 where a=1;
-delete from t7 where a=3 and c=3;
-delete from t7 where a=5 and c=4;
-select * from t7;
-delete from t7 where b=23;
-select * from t7;
-
-drop table t7;
-
-#
-# Test multiple databases in one statement
-#
-
-CREATE TABLE t1 (
- pk1 INT NOT NULL PRIMARY KEY,
- attr1 INT NOT NULL,
- attr2 INT,
- attr3 VARCHAR(10)
-) ENGINE=ndbcluster;
-
-INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413');
-
-create database mysqltest;
-use mysqltest;
-
-CREATE TABLE t2 (
- a bigint unsigned NOT NULL PRIMARY KEY,
- b int unsigned not null,
- c int unsigned
-) engine=ndbcluster;
-
-insert into t2 select pk1,attr1,attr2 from test.t1;
-select * from t2 order by a;
-select b from test.t1, t2 where c = test.t1.attr2;
-select b,test.t1.attr1 from test.t1, t2 where test.t1.pk1 < a;
-
-drop table test.t1, t2;
-drop database mysqltest;
-
-#
-# BUG#6031 - DROP DATABASE doesn't drop database on first try
-#
-
---disable_warnings
-drop database if exists ndbtest1;
---enable_warnings
-
-create database ndbtest1;
-use ndbtest1;
-create table t1(id int) engine=ndbcluster;
-drop database ndbtest1;
---error 1008
-drop database ndbtest1;
-
-#
-# test support of char(0)
-#
-
-use test;
-create table t1 (a int primary key, b char(0));
-insert into t1 values (1,"");
-insert into t1 values (2,NULL);
-select * from t1 order by a;
-select * from t1 order by b;
-select * from t1 where b IS NULL;
-select * from t1 where b IS NOT NULL;
-drop table t1;
-
-#
-# test the limit of no of attributes in one table
-#
-# also tests bug#17179, more than 31 attributes in
-# a partitioned table
-#
-create table t1 (
-c1 int,
-c2 int,
-c3 int,
-c4 int,
-c5 int,
-c6 int,
-c7 int,
-c8 int,
-c9 int,
-c10 int,
-c11 int,
-c12 int,
-c13 int,
-c14 int,
-c15 int,
-c16 int,
-c17 int,
-c18 int,
-c19 int,
-c20 int,
-c21 int,
-c22 int,
-c23 int,
-c24 int,
-c25 int,
-c26 int,
-c27 int,
-c28 int,
-c29 int,
-c30 int,
-c31 int,
-c32 int,
-c33 int,
-c34 int,
-c35 int,
-c36 int,
-c37 int,
-c38 int,
-c39 int,
-c40 int,
-c41 int,
-c42 int,
-c43 int,
-c44 int,
-c45 int,
-c46 int,
-c47 int,
-c48 int,
-c49 int,
-c50 int,
-c51 int,
-c52 int,
-c53 int,
-c54 int,
-c55 int,
-c56 int,
-c57 int,
-c58 int,
-c59 int,
-c60 int,
-c61 int,
-c62 int,
-c63 int,
-c64 int,
-c65 int,
-c66 int,
-c67 int,
-c68 int,
-c69 int,
-c70 int,
-c71 int,
-c72 int,
-c73 int,
-c74 int,
-c75 int,
-c76 int,
-c77 int,
-c78 int,
-c79 int,
-c80 int,
-c81 int,
-c82 int,
-c83 int,
-c84 int,
-c85 int,
-c86 int,
-c87 int,
-c88 int,
-c89 int,
-c90 int,
-c91 int,
-c92 int,
-c93 int,
-c94 int,
-c95 int,
-c96 int,
-c97 int,
-c98 int,
-c99 int,
-c100 int,
-c101 int,
-c102 int,
-c103 int,
-c104 int,
-c105 int,
-c106 int,
-c107 int,
-c108 int,
-c109 int,
-c110 int,
-c111 int,
-c112 int,
-c113 int,
-c114 int,
-c115 int,
-c116 int,
-c117 int,
-c118 int,
-c119 int,
-c120 int,
-c121 int,
-c122 int,
-c123 int,
-c124 int,
-c125 int,
-c126 int,
-c127 int,
-c128 int,
-primary key using hash(c1)) engine=ndb partition by key(c1);
-drop table t1;
-
-#
-# test max size of attribute name and truncation
-#
-
-create table t1 (
-a1234567890123456789012345678901234567890 int primary key,
-a12345678901234567890123456789a1234567890 int,
-index(a12345678901234567890123456789a1234567890)
-) engine=ndb;
-show tables;
-insert into t1 values (1,1),(2,1),(3,1),(4,1),(5,2),(6,1),(7,1);
---replace_column 9 #
-explain select * from t1 where a12345678901234567890123456789a1234567890=2;
-select * from t1 where a12345678901234567890123456789a1234567890=2;
-drop table t1;
-
-#
-# test fragment creation
-#
-# first a table with _many_ fragments per node group
-# then a table with just one fragment per node group
-#
-create table t1
- (a bigint, b bigint, c bigint, d bigint,
- primary key (a,b,c,d))
- engine=ndb
- max_rows=800000000;
-insert into t1 values
- (1,2,3,4),(2,3,4,5),(3,4,5,6),
- (3,2,3,4),(1,3,4,5),(2,4,5,6),
- (1,2,3,5),(2,3,4,8),(3,4,5,9),
- (3,2,3,5),(1,3,4,8),(2,4,5,9),
- (1,2,3,6),(2,3,4,6),(3,4,5,7),
- (3,2,3,6),(1,3,4,6),(2,4,5,7),
- (1,2,3,7),(2,3,4,7),(3,4,5,8),
- (3,2,3,7),(1,3,4,7),(2,4,5,8),
- (1,3,3,4),(2,4,4,5),(3,5,5,6),
- (3,3,3,4),(1,4,4,5),(2,5,5,6),
- (1,3,3,5),(2,4,4,8),(3,5,5,9),
- (3,3,3,5),(1,4,4,8),(2,5,5,9),
- (1,3,3,6),(2,4,4,6),(3,5,5,7),
- (3,3,3,6),(1,4,4,6),(2,5,5,7),
- (1,3,3,7),(2,4,4,7),(3,5,5,8),
- (3,3,3,7),(1,4,4,7),(2,5,5,8);
-select count(*) from t1;
-drop table t1;
-
-create table t1
- (a bigint, b bigint, c bigint, d bigint,
- primary key (a))
- engine=ndb
- max_rows=1;
-drop table t1;
-
-#
-# Test auto_increment
-#
-
-connect (con1,localhost,root,,test);
-connect (con2,localhost,root,,test);
-
-create table t1
- (counter int(64) NOT NULL auto_increment,
- datavalue char(40) default 'XXXX',
- primary key (counter)
- ) ENGINE=ndbcluster;
-
-connection con1;
-insert into t1 (datavalue) values ('newval');
-insert into t1 (datavalue) values ('newval');
-select * from t1 order by counter;
-insert into t1 (datavalue) select datavalue from t1 where counter < 100;
-insert into t1 (datavalue) select datavalue from t1 where counter < 100;
-select * from t1 order by counter;
-connection con2;
-insert into t1 (datavalue) select datavalue from t1 where counter < 100;
-insert into t1 (datavalue) select datavalue from t1 where counter < 100;
-select * from t1 order by counter;
-
-drop table t1;
-
-#
-# bug#27437
-connection con1;
-create table t1 (a int primary key auto_increment) engine = ndb;
-insert into t1() values (),(),(),(),(),(),(),(),(),(),(),();
-connection con2;
-insert into t1(a) values (20),(28);
-connection con1;
-insert into t1() values (),(),(),(),(),(),(),(),(),(),(),();
-connection con2;
-insert into t1() values (21), (22);
-connection con1;
-
-drop table t1;
-
-#
-# BUG#14514 Creating table with packed key fails silently
-#
-
-CREATE TABLE t1 ( b INT ) PACK_KEYS = 0 ENGINE = ndb;
-select * from t1;
-drop table t1;
-
-#
-# Bug #17249 delete statement with join where clause fails
-# when table do not have pk
- #
-
-create table t1 (a int) engine=ndb;
-create table t2 (a int) engine=ndb;
-insert into t1 values (1);
-insert into t2 values (1);
-delete t1.* from t1, t2 where t1.a = t2.a;
-select * from t1;
-select * from t2;
-drop table t1;
-drop table t2;
-
-#
-# Bug #17257 update fails for inner joins if tables
-# do not have Primary Key
-#
-
-CREATE TABLE t1 (
- i INT,
- j INT,
- x INT,
- y INT,
- z INT
-) engine=ndb;
-
-CREATE TABLE t2 (
- i INT,
- k INT,
- x INT,
- y INT,
- z INT
-) engine=ndb;
-
-CREATE TABLE t3 (
- j INT,
- k INT,
- x INT,
- y INT,
- z INT
-) engine=ndb;
-
-INSERT INTO t1 VALUES ( 1, 2,13,14,15);
-INSERT INTO t2 VALUES ( 1, 3,23,24,25);
-INSERT INTO t3 VALUES ( 2, 3, 1,34,35), ( 2, 3, 1,34,36);
-
-UPDATE t1 AS a
-INNER JOIN t2 AS b
- ON a.i = b.i
-INNER JOIN t3 AS c
- ON a.j = c.j AND b.k = c.k
-SET a.x = b.x,
- a.y = b.y,
- a.z = (
- SELECT sum(z)
- FROM t3
- WHERE y = 34
- )
-WHERE b.x = 23;
-select * from t1;
-drop table t1;
-drop table t2;
-drop table t3;
-
-# End of 4.1 tests
-
-#
-# Test long table name
-#
-create table atablewithareallylongandirritatingname (a int);
-insert into atablewithareallylongandirritatingname values (2);
-select * from atablewithareallylongandirritatingname;
-drop table atablewithareallylongandirritatingname;
-
-#
-# Bug#15682
-#
-create table t1 (f1 varchar(50), f2 text,f3 int, primary key(f1)) engine=NDB;
-insert into t1 (f1,f2,f3)VALUES("111111","aaaaaa",1);
-insert into t1 (f1,f2,f3)VALUES("222222","bbbbbb",2);
-select * from t1 order by f1;
-select * from t1 order by f2;
-select * from t1 order by f3;
-drop table t1;
-# Bug#16561 Unknown ERROR msg "ERROR 1186 (HY000): Binlog closed" by perror
-#
-
-# As long there is no error code 1186 defined by NDB
-# we should get a message "Illegal ndb error code: 1186"
---error 1
---exec $MY_PERROR --ndb 1186 2>&1
-
-#
-# Bug #25746 - VARCHAR UTF8 PK issue
-# - prior to bugfix 4209, illegal length parameter would be
-# returned in SELECT *
-
-CREATE TABLE t1 (
-a VARBINARY(40) NOT NULL,
-b VARCHAR (256) CHARACTER SET UTF8 NOT NULL,
-c VARCHAR(256) CHARACTER SET UTF8 NOT NULL,
-PRIMARY KEY (b,c)) ENGINE=ndbcluster;
-INSERT INTO t1 VALUES
-("a","ab","abc"),("b","abc","abcd"),("c","abc","ab"),("d","ab","ab"),("e","abc","abc");
-SELECT * FROM t1 ORDER BY a;
-DROP TABLE t1;
-
-# delete
-create table t1 (a int not null primary key, b int not null) engine=ndb;
-create table t2 (a int not null primary key, b int not null) engine=ndb;
-insert into t1 values (1,10), (2,20), (3,30);
-insert into t2 values (1,10), (2,20), (3,30);
-select * from t1 order by a;
-delete from t1 where a > 0 order by a desc limit 1;
-select * from t1 order by a;
-delete from t1,t2 using t1,t2 where t1.a = t2.a;
-select * from t2 order by a;
-drop table t1,t2;
-
-# insert ignore
-create table t1 (a int not null primary key, b int not null) engine=ndb;
-insert into t1 values (1,10), (2,20), (3,30);
---error ER_DUP_ENTRY
-insert into t1 set a=1, b=100;
-insert ignore into t1 set a=1, b=100;
-select * from t1 order by a;
-insert into t1 set a=1, b=1000 on duplicate key update b=b+1;
-select * from t1 order by a;
-drop table t1;
-
-# update
-create table t1 (a int not null primary key, b int not null) engine=ndb;
-create table t2 (c int not null primary key, d int not null) engine=ndb;
-insert into t1 values (1,10), (2,10), (3,30), (4, 30);
-insert into t2 values (1,10), (2,10), (3,30), (4, 30);
---error ER_DUP_ENTRY
-update t1 set a = 1 where a = 3;
-select * from t1 order by a;
-update t1 set b = 1 where a > 1 order by a desc limit 1;
-select * from t1 order by a;
---error ER_DUP_ENTRY
-update t1,t2 set a = 1, c = 1 where a = 3 and c = 3;
-select * from t1 order by a;
-update ignore t1,t2 set a = 1, c = 1 where a = 3 and c = 3;
-select * from t1 order by a;
-drop table t1,t2;
-
-#
-# Bug#31635
-#
-create table t1 (a varchar(100) primary key, b varchar(100)) engine = NDB;
-insert into t1 values
- ('a', 'a'),('b','b'),('c', 'c'),('aa', 'aa'),('bb', 'bb'),('cc', 'cc');
-replace into t1 values ('a', '-a');
-replace into t1 values ('b', '-b');
-replace into t1 values ('c', '-c');
-
-replace into t1 values ('aa', '-aa');
-replace into t1 values ('bb', '-bb');
-replace into t1 values ('cc', '-cc');
-
-replace into t1 values ('aaa', '-aaa');
-replace into t1 values ('bbb', '-bbb');
-replace into t1 values ('ccc', '-ccc');
-select * from t1 order by 1,2;
-drop table t1;
-
---echo End of 5.0 tests
-
-#
-# Bug #18483 Cannot create table with FK constraint
-# ndb does not support foreign key constraint, it is silently ignored
-# in line with other storage engines
-#
-CREATE TABLE t1 (a VARCHAR(255) NOT NULL,
- CONSTRAINT pk_a PRIMARY KEY (a))engine=ndb;
-CREATE TABLE t2(a VARCHAR(255) NOT NULL,
- b VARCHAR(255) NOT NULL,
- c VARCHAR(255) NOT NULL,
- CONSTRAINT pk_b_c_id PRIMARY KEY (b,c),
- CONSTRAINT fk_a FOREIGN KEY(a) REFERENCES t1(a))engine=ndb;
-drop table t1, t2;
-
-# bug#24301
-create table t1 (a int not null primary key, b int) engine=ndb;
-insert into t1 values(1,1),(2,2),(3,3);
-create table t2 like t1;
-insert into t2 select * from t1;
-select * from t1 order by a;
-select * from t2 order by a;
-drop table t1, t2;
-
-# create table if not exists
---disable_warnings
-create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb;
-create table if not exists t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb;
---enable_warnings
-
-# create like
-create table t2 like t1;
-
-# multi rename
-rename table t1 to t10, t2 to t20;
-drop table t10,t20;
-
---echo End of 5.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_binlog_basic.test b/mysql-test/suite/ndb/t/ndb_binlog_basic.test
deleted file mode 100644
index 4d8b7a8b127..00000000000
--- a/mysql-test/suite/ndb/t/ndb_binlog_basic.test
+++ /dev/null
@@ -1,80 +0,0 @@
--- source include/have_ndb.inc
--- source include/have_binlog_format_mixed_or_row.inc
-
---disable_warnings
-drop table if exists t1, t2;
-drop database if exists mysqltest;
-create database mysqltest;
-use mysqltest;
-drop database mysqltest;
-use test;
---enable_warnings
-
-#
-# basic insert, update, delete test, alter, rename, drop
-# check that ndb_binlog_index gets the right info
-#
-
-create table t1 (a int primary key) engine=ndb;
-insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-save_master_pos;
---replace_column 1 #
-select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index;
-
-delete from t1;
-alter table t1 add (b int);
-insert into t1 values (3,3),(4,4);
-alter table t1 rename t2;
-
-# get all in one epoch
-begin;
-insert into t2 values (1,1),(2,2);
-update t2 set b=1 where a=3;
-delete from t2 where a=4;
-commit;
-drop table t2;
-
-# check that above is ok
-# (save_master_pos waits for last gcp to complete, ensuring that we have
-# the expected data in the binlog)
-save_master_pos;
-select inserts from mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 5;
-select deletes from mysql.ndb_binlog_index where epoch > @max_epoch and deletes > 5;
-select inserts,updates,deletes from
- mysql.ndb_binlog_index where epoch > @max_epoch and updates > 0;
-
-#
-# check that purge clears the ndb_binlog_index
-#
-# TODO: make this deterministic
-# This test is disabled until we can make this determistic under load.
-# The problem is that in some cases, the binlog writing thread gets
-# scheduled after the purge, writes pending things, then the select
-# gets scheduled
-#
-flush logs;
---sleep 1
-purge master logs before now();
---disable_parsing
-select count(*) from mysql.ndb_binlog_index;
---enable_parsing
-
-#
-# several tables in different databases
-# check that same table name in different databases don't mix up
-#
-create table t1 (a int primary key, b int) engine=ndb;
-create database mysqltest;
-use mysqltest;
-create table t1 (c int, d int primary key) engine=ndb;
-use test;
-
-insert into mysqltest.t1 values (2,1),(2,2);
-save_master_pos;
---replace_column 1 #
-select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index;
-
-drop table t1;
-drop database mysqltest;
-select inserts,updates,deletes from
- mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 0;
diff --git a/mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test b/mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test
deleted file mode 100644
index a70dbe2011f..00000000000
--- a/mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test
+++ /dev/null
@@ -1,190 +0,0 @@
--- source include/have_multi_ndb.inc
--- source include/have_binlog_format_mixed_or_row.inc
-
---disable_warnings
-connection server2;
-drop database if exists mysqltest;
-drop table if exists t1,t2,t3;
-connection server1;
-drop database if exists mysqltest;
-drop table if exists t1,t2,t3;
---connection server1
-reset master;
---connection server2
-reset master;
---enable_warnings
-
-#
-# basic test to see if ddl distribution works across
-# multiple binlogs
-#
-
-# create database
---connection server1
-create database mysqltest;
-
-# create table
---connection server1
-use mysqltest;
-create table t1 (a int primary key) engine=ndb;
-
---connection server2
-create table t2 (a int primary key) engine=ndb;
---source include/show_binlog_events2.inc
-
---connection server1
---source include/show_binlog_events2.inc
-
-# alter table
---connection server1
-reset master;
---connection server2
-reset master;
-
---connection server2
-alter table t2 add column (b int);
-
---connection server1
---source include/show_binlog_events2.inc
-
-# alter database
---connection server1
-reset master;
---connection server2
-reset master;
-
---connection server2
-ALTER DATABASE mysqltest CHARACTER SET latin1;
-
-
-# having drop here instead of below sometimes triggers bug#18976
-## drop table and drop should come after data events
---connection server2
-drop table mysqltest.t1;
-
---connection server1
---source include/show_binlog_events2.inc
-# to track down bug#18976
---real_sleep 10
---source include/show_binlog_events2.inc
-
-#--connection server2
-#drop table mysqltest.t1;
-
-# drop database and drop should come after data events
---connection server1
-reset master;
---connection server2
-reset master;
-
---connection server1
-use test;
-insert into t2 values (1,2);
-drop database mysqltest;
-create table t1 (a int primary key) engine=ndb;
-
---connection server2
---source include/show_binlog_events2.inc
-
---connection server2
-drop table t2;
-
-# logfile groups and table spaces
---connection server1
-reset master;
---connection server2
-reset master;
-
---connection server1
-CREATE LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile.dat'
-INITIAL_SIZE 16M
-UNDO_BUFFER_SIZE = 1M
-ENGINE=NDB;
-
-ALTER LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile02.dat'
-INITIAL_SIZE = 4M
-ENGINE=NDB;
-
-CREATE TABLESPACE ts1
-ADD DATAFILE 'datafile.dat'
-USE LOGFILE GROUP lg1
-INITIAL_SIZE 12M
-ENGINE NDB;
-
-ALTER TABLESPACE ts1
-ADD DATAFILE 'datafile02.dat'
-INITIAL_SIZE = 4M
-ENGINE=NDB;
-
-ALTER TABLESPACE ts1
-DROP DATAFILE 'datafile.dat'
-ENGINE = NDB;
-
-ALTER TABLESPACE ts1
-DROP DATAFILE 'datafile02.dat'
-ENGINE = NDB;
-
-DROP TABLESPACE ts1
-ENGINE = NDB;
-
-DROP LOGFILE GROUP lg1
-ENGINE =NDB;
-
-# having drop here instead of below sometimes triggers bug#18976
-#drop table t1;
-
---connection server2
---source include/show_binlog_events2.inc
-# to track down bug#18976
---real_sleep 10
---source include/show_binlog_events2.inc
-
-drop table t1;
-
-#
-# Bug #17827 cluster: rename of several tables in one statement,
-# gets multiply logged
-#
---connection server1
-reset master;
-show tables;
---connection server2
-reset master;
-show tables;
-
---connection server1
-create table t1 (a int key) engine=ndb;
-create table t2 (a int key) engine=ndb;
-create table t3 (a int key) engine=ndb;
-rename table t3 to t4, t2 to t3, t1 to t2, t4 to t1;
---connection server2
---source include/show_binlog_events2.inc
-
-drop table t1;
-drop table t2;
-drop table t3;
-
-#
-# Bug #17838 binlog not setup on seconday master after rename
-#
-#
---connection server1
-reset master;
-show tables;
---connection server2
-reset master;
-show tables;
-
---connection server1
-create table t1 (a int key) engine=ndb;
-insert into t1 values(1);
-rename table t1 to t2;
-insert into t2 values(2);
-
-# now we should see data in table t1 _and_ t2
-# prior to bug fix, data was missing for t2
---connection server2
-drop table t2;
---source include/show_binlog_events2.inc
diff --git a/mysql-test/suite/ndb/t/ndb_binlog_discover.test b/mysql-test/suite/ndb/t/ndb_binlog_discover.test
deleted file mode 100644
index dc8275a8a39..00000000000
--- a/mysql-test/suite/ndb/t/ndb_binlog_discover.test
+++ /dev/null
@@ -1,36 +0,0 @@
--- source include/have_ndb.inc
--- source include/have_binlog_format_mixed_or_row.inc
-
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-#
-# Bug #14516 Restart of cluster can cause NDB API replication failure
-#
-create table t1 (a int key) engine=ndb;
-reset master;
---exec $NDB_MGM --no-defaults -e "all restart -n" > /dev/null
---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --not-started > /dev/null
---exec $NDB_MGM --no-defaults -e "all start" > /dev/null
---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults > /dev/null
-
---disable_query_log
-let $mysql_errno= 1;
-while ($mysql_errno)
-{
- # Table t1 is readonly until the mysqld has reconnected properly
- --error 0,1036,1296
- insert into t1 values(1);
- if ($mysql_errno)
- {
- --sleep 0.1
- }
-}
---enable_query_log
-
---source include/show_binlog_events2.inc
-PURGE MASTER LOGS TO 'mysqld-bin.000002';
-
---source include/show_binlog_events2.inc
-drop table t1;
diff --git a/mysql-test/suite/ndb/t/ndb_binlog_format.test b/mysql-test/suite/ndb/t/ndb_binlog_format.test
deleted file mode 100644
index e240a33a20e..00000000000
--- a/mysql-test/suite/ndb/t/ndb_binlog_format.test
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# test different behavior of ndb using different binlog formats
-#
-
--- source include/have_blackhole.inc
--- source include/have_ndb.inc
--- source include/have_log_bin.inc
-
-call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
-
---disable_warnings
-drop table if exists t1, t2, t3;
---enable_warnings
-
-#
-# Bug #29222 Statement mode replicates both statement and
-# rows when writing to an NDB table
-#
-CREATE TABLE t1 (m INT, n INT) ENGINE=MYISAM;
-CREATE TABLE t2 (b INT, c INT) ENGINE=BLACKHOLE;
-CREATE TABLE t3 (e INT, f INT) ENGINE=NDB;
-RESET MASTER;
-SET SESSION BINLOG_FORMAT=STATEMENT;
-INSERT INTO t1 VALUES (1,1), (1,2), (2,1), (2,2);
-INSERT INTO t2 VALUES (1,1), (1,2), (2,1), (2,2);
-UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c;
-# A transaction here is not necessary, but I wanted to group the bad statements
-START TRANSACTION;
-INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2);
-UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f;
-UPDATE t3, t2 SET e = 2, b = 3 WHERE f = c;
-COMMIT;
---source include/show_binlog_events.inc
-DROP TABLE t1, t2, t3;
-
diff --git a/mysql-test/suite/ndb/t/ndb_binlog_ignore_db-master.opt b/mysql-test/suite/ndb/t/ndb_binlog_ignore_db-master.opt
deleted file mode 100644
index e3947c0eeed..00000000000
--- a/mysql-test/suite/ndb/t/ndb_binlog_ignore_db-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---binlog-ignore-db=mysqltest
diff --git a/mysql-test/suite/ndb/t/ndb_binlog_ignore_db.test b/mysql-test/suite/ndb/t/ndb_binlog_ignore_db.test
deleted file mode 100644
index 013df54a76a..00000000000
--- a/mysql-test/suite/ndb/t/ndb_binlog_ignore_db.test
+++ /dev/null
@@ -1,16 +0,0 @@
--- source include/have_ndb.inc
--- source include/have_binlog_format_mixed_or_row.inc
-reset master;
-
---disable_warnings
-drop table if exists t1;
-drop database if exists mysqltest;
---enable_warnings
-
-create database mysqltest;
-use mysqltest;
-create table t1 (a int primary key, b int) engine=ndb;
-insert into t1 values (1, 1);
--- source include/show_binlog_events2.inc
-
-drop database mysqltest;
diff --git a/mysql-test/suite/ndb/t/ndb_binlog_log_bin.test b/mysql-test/suite/ndb/t/ndb_binlog_log_bin.test
deleted file mode 100644
index 75ac766fd25..00000000000
--- a/mysql-test/suite/ndb/t/ndb_binlog_log_bin.test
+++ /dev/null
@@ -1,49 +0,0 @@
--- source include/have_multi_ndb.inc
--- source include/have_binlog_format_mixed_or_row.inc
-
---disable_warnings
-connection server2;
-drop table if exists t1,t2,t3;
-reset master;
-connection server1;
-drop table if exists t1,t2,t3;
-reset master;
---enable_warnings
-
-# basic SQL_LOG_BIN functionality
-# see updates from one thread but not the other
-connect (con1,localhost,root,,);
-connect (con2,localhost,root,,);
-# do some stuff with SQL_LOG_BIN=0
-connection con2;
-set SQL_LOG_BIN=0;
-create database mysqltest;
-use mysqltest;
-create table t1 (a int key, b int) engine=ndb;
-create table t2 (a int key, b int) engine=ndb;
-insert into t1 values (1,1);
-alter table t1 add c int;
-# we should not see it in the local server
--- source include/show_binlog_events2.inc
-reset master;
-# we should not see it in another server
-connection server2;
-use mysqltest;
-insert into t2 values (1,1);
--- source include/show_binlog_events2.inc
-reset master;
-# but if you do stuff in "default" client setting
-connection con1;
-use mysqltest;
-drop table t1;
-drop table t2;
-create table t1 (d int key, e int) engine=ndb;
-create table t2 (d int key, e int) engine=ndb;
-insert into t1 values (1,1);
--- source include/show_binlog_events2.inc
-# and in another server
-connection server2;
-use mysqltest;
-insert into t2 values (1,1);
--- source include/show_binlog_events2.inc
-drop database mysqltest;
diff --git a/mysql-test/suite/ndb/t/ndb_binlog_multi.test b/mysql-test/suite/ndb/t/ndb_binlog_multi.test
deleted file mode 100644
index c39034c71f6..00000000000
--- a/mysql-test/suite/ndb/t/ndb_binlog_multi.test
+++ /dev/null
@@ -1,82 +0,0 @@
--- source include/have_multi_ndb.inc
--- source include/have_binlog_format_mixed_or_row.inc
-
---disable_warnings
-connection server2;
-drop table if exists t1,t2,t3;
-connection server1;
-drop table if exists t1,t2,t3;
---enable_warnings
-
-# Dummy table create/drop to avoid a race where table is created
-# before event subscription is set up, causing test failure (BUG#20677).
-connection server2;
-CREATE TABLE t3 (dummy INT PRIMARY KEY) ENGINE = NDB;
-connection server1;
-DROP TABLE t3;
-
-# reset for test
-connection server1;
-reset master;
-connection server2;
-reset master;
-
-#
-# basic test to see if one server sees the table from the other
-# and sets up the replication correctly
-#
-
-# create table on the other server
-connection server2;
-CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB;
-
-# insert something on server2
-INSERT INTO t2 VALUES (1,1),(2,2);
-# verify that we get the data in the binlog
---source include/show_binlog_events2.inc
-select * from t2 order by a;
---replace_column 1 <the_epoch>
-SELECT @the_epoch:=epoch,inserts,updates,deletes,schemaops FROM
- mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1;
-let $the_epoch= `SELECT @the_epoch`;
-
-# see if we got something on server1
-connection server1;
-SELECT * FROM t2 ORDER BY a;
-# doing drop table will ensure that all the events have been received
-DROP TABLE t2;
-# verify thar we have table and data in binlog
---source include/show_binlog_events2.inc
---replace_result $the_epoch <the_epoch>
-eval SELECT inserts,updates,deletes,schemaops FROM
- mysql.ndb_binlog_index WHERE epoch=$the_epoch;
-
-# reset for next test
-connection server1;
-reset master;
-connection server2;
-reset master;
-
-# single schema ops will not show
-connection server2;
-CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB;
-INSERT INTO t1 VALUES (1),(2);
---source include/show_binlog_events2.inc
---replace_column 1 <the_epoch2>
-SELECT @the_epoch2:=epoch,inserts,updates,deletes,schemaops FROM
- mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1;
-let $the_epoch2= `SELECT @the_epoch2`;
-
---replace_result $the_epoch <the_epoch> $the_epoch2 <the_epoch2>
-eval SELECT inserts,updates,deletes,schemaops FROM
- mysql.ndb_binlog_index WHERE epoch > $the_epoch AND epoch <= $the_epoch2;
-
-# now see that we have the events on the other server
-connection server2;
-# doing drop table will ensure that all the events have been received
-drop table t1;
-# verify thar we have table and data in binlog
---source include/show_binlog_events2.inc
---replace_result $the_epoch <the_epoch> $the_epoch2 <the_epoch2>
-eval SELECT inserts,updates,deletes,schemaops FROM
- mysql.ndb_binlog_index WHERE epoch > $the_epoch AND epoch <= $the_epoch2;
diff --git a/mysql-test/suite/ndb/t/ndb_bitfield.test b/mysql-test/suite/ndb/t/ndb_bitfield.test
deleted file mode 100644
index de0ae23bfe6..00000000000
--- a/mysql-test/suite/ndb/t/ndb_bitfield.test
+++ /dev/null
@@ -1,124 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-create table t1 (
- pk1 int not null primary key,
- b bit(64)
-) engine=ndbcluster;
-
-show create table t1;
-insert into t1 values
-(0,b'1111111111111111111111111111111111111111111111111111111111111111'),
-(1,b'1000000000000000000000000000000000000000000000000000000000000000'),
-(2,b'0000000000000000000000000000000000000000000000000000000000000001'),
-(3,b'1010101010101010101010101010101010101010101010101010101010101010'),
-(4,b'0101010101010101010101010101010101010101010101010101010101010101');
-select hex(b) from t1 order by pk1;
-drop table t1;
-
-create table t1 (
- pk1 int not null primary key,
- b bit(9)
-) engine=ndbcluster;
-insert into t1 values
-(0,b'000000000'),
-(1,b'000000001'),
-(2,b'000000010'),
-(3,b'000000011'),
-(4,b'000000100');
-select hex(b) from t1 order by pk1;
-update t1 set b = b + b'101010101';
-select hex(b) from t1 order by pk1;
-drop table t1;
-
-create table t1 (a bit(7), b bit(9)) engine = ndbcluster;
-insert into t1 values
-(94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),
-(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),
-(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),
-(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),
-(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),
-(44, 307), (68, 454), (57, 135);
-select a+0 from t1 order by a;
-select b+0 from t1 order by b;
-drop table t1;
-
-create table t1 (
- dummyKey INTEGER NOT NULL,
- a001 TINYINT,
- a010 TINYINT,
- a012 TINYINT,
- a015 TINYINT,
- a016 TINYINT,
- a017 TINYINT,
- a019 TINYINT,
- a029 TINYINT,
- a030 TINYINT,
- a031 TINYINT,
- a032 TINYINT,
- a042 TINYINT,
- a043 TINYINT,
- a044 TINYINT,
- a3001 TINYINT,
- a3002 TINYINT,
- a3003 TINYINT,
- a3004 TINYINT,
- a3005 TINYINT,
- a3021 TINYINT,
- a3022 TINYINT,
- a BIT(6),
- b BIT(6),
- c BIT(6),
- d TINYINT,
- e TINYINT,
- f TINYINT,
- g TINYINT,
- h TINYINT,
- i TINYINT,
- j TINYINT,
- k TINYINT,
- l TINYINT,
- m TINYINT,
- n TINYINT,
- o TINYINT,
- a034 TINYINT,
-PRIMARY KEY USING HASH (dummyKey) ) engine=ndb;
-INSERT INTO `t1` VALUES
-(1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000001',b'111111',b'111110',4,5,5,5,5,5,5,5,5,5,3,2,1),
-(2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000010',b'000000',b'111101',4,5,5,5,5,5,5,5,5,5,3,2,1),
-(3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000100',b'001111',b'111011',4,5,5,5,5,5,5,5,5,5,3,2,1),
-(4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'001000',b'110000',b'110111',4,5,5,5,5,5,5,5,5,5,3,2,1),
-(5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'010000',b'100001',b'101111',4,5,5,5,5,5,5,5,5,5,3,2,1),
-(6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'100000',b'010010',b'011111',4,5,5,5,5,5,5,5,5,5,3,2,1),
-(7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'001100',b'111111',4,5,5,5,5,5,5,5,5,5,3,2,1),
-(8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'000000',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1);
---exec $MYSQL_DUMP --hex-blob --compact --order-by-primary --skip-extended-insert --no-create-info test t1
-drop table t1;
-
---error 1005
-create table t1 (
- pk1 bit(9) not null primary key,
- b int
-) engine=ndbcluster;
-show warnings;
-
---error 1005
-create table t1 (
- pk1 int not null primary key,
- b bit(9),
- key(b)
-) engine=ndbcluster;
-show warnings;
-
-# bug#16125
-create table t1 (
- pk1 int primary key,
- b bit(32) not null
-) engine=ndbcluster;
-
-insert into t1 values (1,1);
-drop table t1;
diff --git a/mysql-test/suite/ndb/t/ndb_blob.test b/mysql-test/suite/ndb/t/ndb_blob.test
deleted file mode 100644
index 0388913df8b..00000000000
--- a/mysql-test/suite/ndb/t/ndb_blob.test
+++ /dev/null
@@ -1,519 +0,0 @@
---source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-drop table if exists t1;
-drop database if exists test2;
---enable_warnings
-
-#
-# Minimal NDB blobs test.
-#
-# On NDB API level there is an extensive test program "testBlobs".
-# A prerequisite for this handler test is that "testBlobs" succeeds.
-#
-
-# -- general test starts --
-
-# make test harder with autocommit off
-set autocommit=0;
-
-create table t1 (
- a int not null primary key,
- b text not null,
- c int not null,
- d longblob,
- key (c)
-) engine=ndbcluster;
-
-# -- values --
-
-# x0 size 256 (current inline size)
-set @x0 = '01234567012345670123456701234567';
-set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0);
-
-# b1 length 2000+256 (blob part aligned)
-set @b1 = 'b1';
-set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
-set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
-set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
-set @b1 = concat(@b1,@x0);
-# d1 length 3000
-set @d1 = 'dd1';
-set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1);
-set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1);
-set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1);
-
-# b2 length 20000
-set @b2 = 'b2';
-set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
-set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
-set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
-set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
-# d2 length 30000
-set @d2 = 'dd2';
-set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2);
-set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2);
-set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2);
-set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2);
-
-select length(@x0),length(@b1),length(@d1) from dual;
-select length(@x0),length(@b2),length(@d2) from dual;
-
-# -- pk ops --
-
-insert into t1 values(1,@b1,111,@d1);
-insert into t1 values(2,@b2,222,@d2);
-commit;
---replace_column 9 #
-explain select * from t1 where a = 1;
-
-# pk read
-select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3)
-from t1 where a=1;
-select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3)
-from t1 where a=2;
-
-# pk update
-update t1 set b=@b2,d=@d2 where a=1;
-update t1 set b=@b1,d=@d1 where a=2;
-commit;
-select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3)
-from t1 where a=1;
-select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3)
-from t1 where a=2;
-
-# pk update
-update t1 set b=concat(b,b),d=concat(d,d) where a=1;
-update t1 set b=concat(b,b),d=concat(d,d) where a=2;
-commit;
-select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3)
-from t1 where a=1;
-select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3)
-from t1 where a=2;
-
-# pk update to null
-update t1 set d=null where a=1;
-commit;
-select a from t1 where d is null;
-
-# bug#24028 - does not occur on MySQL level
-# bug#17986 - not seen by us anymore but could show as warning here
-delete from t1 where a=45567;
-commit;
-
-# pk delete
-delete from t1 where a=1;
-delete from t1 where a=2;
-commit;
-select count(*) from t1;
-
-# -- replace ( bug-6018 ) --
-
-# insert
-replace t1 set a=1,b=@b1,c=111,d=@d1;
-replace t1 set a=2,b=@b2,c=222,d=@d2;
-commit;
---replace_column 9 #
-explain select * from t1 where a = 1;
-
-# pk read
-select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3)
-from t1 where a=1;
-select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3)
-from t1 where a=2;
-
-# update
-replace t1 set a=1,b=@b2,c=111,d=@d2;
-replace t1 set a=2,b=@b1,c=222,d=@d1;
-commit;
-select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3)
-from t1 where a=1;
-select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3)
-from t1 where a=2;
-
-# update
-replace t1 set a=1,b=concat(@b2,@b2),c=111,d=concat(@d2,@d2);
-replace t1 set a=2,b=concat(@b1,@b1),c=222,d=concat(@d1,@d1);
-commit;
-select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3)
-from t1 where a=1;
-select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3)
-from t1 where a=2;
-
-# update to null
-replace t1 set a=1,b='xyz',c=111,d=null;
-commit;
-select a,b from t1 where d is null;
-
-# pk delete
-delete from t1 where a=1;
-delete from t1 where a=2;
-commit;
-select count(*) from t1;
-
-# -- hash index ops --
-
-insert into t1 values(1,@b1,111,@d1);
-insert into t1 values(2,@b2,222,@d2);
-commit;
---replace_column 9 #
-explain select * from t1 where c = 111;
-
-# hash key read
-select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3)
-from t1 where c=111;
-select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3)
-from t1 where c=222;
-
-# hash key update
-update t1 set b=@b2,d=@d2 where c=111;
-update t1 set b=@b1,d=@d1 where c=222;
-commit;
-select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3)
-from t1 where c=111;
-select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3)
-from t1 where c=222;
-
-# hash key update to null
-update t1 set d=null where c=111;
-commit;
-select a from t1 where d is null;
-
-# hash key delete
-delete from t1 where c=111;
-delete from t1 where c=222;
-commit;
-select count(*) from t1;
-
-# -- table scan ops, short values --
-
-insert into t1 values(1,'b1',111,'dd1');
-insert into t1 values(2,'b2',222,'dd2');
-insert into t1 values(3,'b3',333,'dd3');
-insert into t1 values(4,'b4',444,'dd4');
-insert into t1 values(5,'b5',555,'dd5');
-insert into t1 values(6,'b6',666,'dd6');
-insert into t1 values(7,'b7',777,'dd7');
-insert into t1 values(8,'b8',888,'dd8');
-insert into t1 values(9,'b9',999,'dd9');
-commit;
---replace_column 9 #
-explain select * from t1;
-
-# table scan read
-select * from t1 order by a;
-
-# table scan update
-update t1 set b=concat(a,'x',b),d=concat(a,'x',d);
-commit;
-select * from t1 order by a;
-
-# table scan delete
-delete from t1;
-commit;
-select count(*) from t1;
-
-# -- table scan ops, long values --
-
-insert into t1 values(1,@b1,111,@d1);
-insert into t1 values(2,@b2,222,@d2);
-commit;
---replace_column 9 #
-explain select * from t1;
-
-# table scan read
-select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3)
-from t1 order by a;
-
-# table scan update
-update t1 set b=concat(b,b),d=concat(d,d);
-commit;
-select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3)
-from t1 order by a;
-
-# table scan delete
-delete from t1;
-commit;
-select count(*) from t1;
-
-# -- range scan ops, short values --
-
-insert into t1 values(1,'b1',111,'dd1');
-insert into t1 values(2,'b2',222,'dd2');
-insert into t1 values(3,'b3',333,'dd3');
-insert into t1 values(4,'b4',444,'dd4');
-insert into t1 values(5,'b5',555,'dd5');
-insert into t1 values(6,'b6',666,'dd6');
-insert into t1 values(7,'b7',777,'dd7');
-insert into t1 values(8,'b8',888,'dd8');
-insert into t1 values(9,'b9',999,'dd9');
-commit;
---replace_column 9 #
-explain select * from t1 where c >= 100 order by a;
-
-# range scan read
-select * from t1 where c >= 100 order by a;
-
-# range scan update
-update t1 set b=concat(a,'x',b),d=concat(a,'x',d)
-where c >= 100;
-commit;
-select * from t1 where c >= 100 order by a;
-
-# range scan delete
-delete from t1 where c >= 100;
-commit;
-select count(*) from t1;
-
-# -- range scan ops, long values --
-
-insert into t1 values(1,@b1,111,@d1);
-insert into t1 values(2,@b2,222,@d2);
-commit;
---replace_column 9 #
-explain select * from t1 where c >= 100 order by a;
-
-# range scan read
-select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3)
-from t1 where c >= 100 order by a;
-
-# range scan update
-update t1 set b=concat(b,b),d=concat(d,d);
-commit;
-select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3)
-from t1 where c >= 100 order by a;
-
-# range scan delete
-delete from t1 where c >= 100;
-commit;
-select count(*) from t1;
-
-# -- rollback --
-
-insert into t1 values(1,@b1,111,@d1);
-insert into t1 values(2,@b2,222,@d2);
-# 626
-select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3)
-from t1 where a = 0;
-select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3)
-from t1 where a = 1;
-select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3)
-from t1 where a = 2;
-select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3)
-from t1 order by a;
-rollback;
-select count(*) from t1;
-
-# -- alter table and multi db --
-
-insert into t1 values(1,'b1',111,'dd1');
-insert into t1 values(2,'b2',222,'dd2');
-insert into t1 values(3,'b3',333,'dd3');
-insert into t1 values(4,'b4',444,'dd4');
-insert into t1 values(5,'b5',555,'dd5');
-insert into t1 values(6,'b6',666,'dd6');
-insert into t1 values(7,'b7',777,'dd7');
-insert into t1 values(8,'b8',888,'dd8');
-insert into t1 values(9,'b9',999,'dd9');
-commit;
-
-select * from t1 order by a;
-alter table t1 add x int;
-select * from t1 order by a;
-alter table t1 drop x;
-select * from t1 order by a;
-
-create database test2;
-use test2;
-
-CREATE TABLE t2 (
- a bigint unsigned NOT NULL PRIMARY KEY,
- b int unsigned not null,
- c int unsigned
-) engine=ndbcluster;
-
-insert into t2 values (1,1,1),(2,2,2);
-select * from test.t1,t2 where test.t1.a = t2.a order by test.t1.a;
-
-drop table t2;
-use test;
-
-select * from t1 order by a;
-alter table t1 add x int;
-select * from t1 order by a;
-alter table t1 drop x;
-select * from t1 order by a;
-
-# -- end general test --
-
-drop table t1;
-drop database test2;
-
-# -- bug-5252 tinytext crashes + no-commit result + replace --
-
-set autocommit=0;
-create table t1 (
- a int not null primary key,
- b tinytext
-) engine=ndbcluster;
-
-insert into t1 values(1, 'x');
-update t1 set b = 'y';
-select * from t1;
-delete from t1;
-select * from t1;
-commit;
-replace t1 set a=2, b='y';
-select * from t1;
-delete from t1;
-select * from t1;
-drop table t1;
-
-# -- bug-5013 insert empty string to text --
-
-set autocommit=0;
-create table t1 (
- a int not null primary key,
- b text not null
-) engine=ndbcluster;
-
-insert into t1 values(1, '');
-select * from t1;
-commit;
-drop table t1;
-
-# -- bug #5349 --
-set autocommit=1;
-use test;
-CREATE TABLE t1 (
- a int,
- b text,
- PRIMARY KEY (a)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-
-INSERT INTO t1 VALUES
-(1,'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA');
-INSERT INTO t1 VALUES
-(2,'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB');
-
-select * from t1 order by a;
-alter table t1 engine=ndb;
-select * from t1 order by a;
-
-# -- bug #5872 --
-set autocommit=1;
-alter table t1 engine=myisam;
-select * from t1 order by a;
-drop table t1;
-
-# -- bug #7340 --
-create table t1 (
- id int(11) unsigned primary key NOT NULL auto_increment,
- msg text NOT NULL
-) engine=ndbcluster default charset=utf8;
-insert into t1 (msg) values(
-'Tries to validate (8 byte length + inline bytes) as UTF8 :(
-Fast fix: removed validation for Text. It is not yet indexable
-so bad data will not crash kernel.');
-select * from t1;
-drop table t1;
-
-# -- bug #19201
-create table t1 (
- a int primary key not null auto_increment,
- b text
-) engine=ndbcluster;
---disable_query_log
-set autocommit=1;
-# more rows than batch size (64)
-# for this bug no blob parts would be necessary
-let $1 = 500;
-while ($1)
-{
- insert into t1 (b) values (repeat('x',4000));
- dec $1;
-}
---enable_query_log
-select count(*) from t1;
-truncate t1;
-select count(*) from t1;
-drop table t1;
-
-# -- bug#19956 - var* key, complex key
-
-create table t1 (
- a varchar(40) not null,
- b mediumint not null,
- t text,
- c varchar(2) not null,
- d bigint not null,
- primary key (a,b,c),
- key (c,a),
- unique key (d)
-) engine=ndb;
-
---disable_query_log
-set @s1 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau';
-set @s2 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz';
-set @s3 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah';
-set @v1 = repeat(@s1,123);
-set @v2 = repeat(@s2,234);
-set @v3 = repeat(@s3,345);
-set @v4 = NULL;
---enable_query_log
-
-insert into t1 (a,b,c,d,t) values ('a',1110,'a',1,@v1);
-insert into t1 (a,b,c,d,t) values ('b',1110,'a',2,@v2);
-insert into t1 (a,b,c,d,t) values ('a',1110,'b',3,@v3);
-insert into t1 (a,b,c,d,t) values ('b',1110,'b',4,@v4);
-select a,b,c,d,sha1(t) from t1 order by c,a;
-
-select a,b,c,d,sha1(t) from t1 where a='a' and b=1110 and c='a';
-select a,b,c,d,sha1(t) from t1 where a='a' and b=1110 and c='b';
-
-update t1 set t=@v4 where a='b' and b=1110 and c='a';
-update t1 set t=@v2 where a='b' and b=1110 and c='b';
-select a,b,c,d,sha1(t) from t1 order by c,a;
-
-update t1 set t=@v2 where d=2;
-update t1 set t=@v4 where d=4;
-select a,b,c,d,sha1(t) from t1 order by c,a;
-
-update t1 set t=@v4 where a='b' and c='a';
-update t1 set t=@v2 where a='b' and c='b';
-select a,b,c,d,sha1(t) from t1 order by c,a;
-
-update t1 set t=@v2 where b+d=1112;
-update t1 set t=@v4 where b+d=1114;
-select a,b,c,d,sha1(t) from t1 order by c,a;
-
-delete from t1 where a='a' and b=1110 and c='a';
-delete from t1 where a='b' and c='a';
-delete from t1 where d=3;
-delete from t1 where b+d=1114;
-select count(*) from t1;
-
-drop table t1;
-
-# End of 4.1 tests
-
-
-# bug # 30674 :
-# NOT NULL Blobs should default to zero-length. Not NULL TEXT
-# should default to zero-chars
-create table t1(
- a int,
- blob_nn blob not null,
- text_nn text not null,
- blob_nl blob,
- text_nl text,
- primary key(a)
-) engine=ndb;
-
-insert into t1(a) values (1);
-insert into t1(a, text_nl) values (2, 'MySQL Cluster NDB');
-
-select a, length(blob_nn), length(text_nn), blob_nl, text_nl from t1 order by a;
-
-drop table t1;
diff --git a/mysql-test/suite/ndb/t/ndb_blob_partition.test b/mysql-test/suite/ndb/t/ndb_blob_partition.test
deleted file mode 100644
index 35df57b96ba..00000000000
--- a/mysql-test/suite/ndb/t/ndb_blob_partition.test
+++ /dev/null
@@ -1,97 +0,0 @@
---source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_query_log
-set new=on;
---enable_query_log
-
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-#
-# Minimal NDB blobs test with range partitions.
-#
-
-create table t1 (
- a mediumint not null,
- b text not null,
- c int not null,
- d longblob,
- primary key using hash (a,c),
- unique key (c)
-)
- engine=ndb
- partition by range (c)
- partitions 3
- ( partition p1 values less than (200),
- partition p2 values less than (300),
- partition p3 values less than (400));
-
---disable_query_log
-sleep 1;
-
-# length 61
-set @s0 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau';
-set @s1 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz';
-set @s2 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah';
-
-set @v1 = repeat(@s0, 100); # 1d42dd9090cf78314a06665d4ea938c35cc760f4
-set @v2 = repeat(@s1, 200); # 10d3c783026b310218d10b7188da96a2401648c6
-set @v3 = repeat(@s2, 300); # a33549d9844092289a58ac348dd59f09fc28406a
-set @v4 = repeat(@s0, 400); # daa61c6de36a0526f0d47dc29d6b9de7e6d2630c
-set @v5 = repeat(@s1, 500); # 70fc9a7d08beebc522258bfb02000a30c77a8f1d
-set @v6 = repeat(@s2, 600); # 090565c580809efed3d369481a4bbb168b20713e
-set @v7 = repeat(@s0, 700); # 1e0070bec426871a46291de27b9bd6e4255ab4e5
-set @v8 = repeat(@s1, 800); # acbaba01bc2e682f015f40e79d9cbe475db3002e
-set @v9 = repeat(@s2, 900); # 9ee30d99162574f79c66ae95cdf132dcf9cbc259
---enable_query_log
-
-# -- insert --
-insert into t1 values (1, @v1, 101, @v2);
-insert into t1 values (1, @v2, 102, @v3);
-insert into t1 values (1, @v3, 103, @v4);
-insert into t1 values (2, @v4, 201, @v5);
-insert into t1 values (2, @v5, 202, @v6);
-insert into t1 values (2, @v6, 203, @v7);
-insert into t1 values (3, @v7, 301, @v8);
-insert into t1 values (3, @v8, 302, @v9);
-insert into t1 values (3, @v9, 303, @v1);
-select a, sha1(b), c, sha1(d) from t1 order by a;
-
-# -- pk read --
-select a, sha1(b), c, sha1(d) from t1 where a = 1 and c = 101;
-select a, sha1(b), c, sha1(d) from t1 where a = 2 and c = 201;
-select a, sha1(b), c, sha1(d) from t1 where a = 3 and c = 301;
-
-# -- pk update --
-update t1 set b = @v3, d = @v4 where a = 1 and c = 102;
-update t1 set b = @v6, d = @v7 where a = 2 and c = 202;
-update t1 set b = @v9, d = @v1 where a = 3 and c = 302;
-select a, sha1(b), c, sha1(d) from t1 order by a;
-
-# -- hash index update --
-update t1 set b = @v4, d = @v5 where c = 103;
-update t1 set b = @v7, d = @v8 where c = 203;
-update t1 set b = @v1, d = @v2 where c = 303;
-select a, sha1(b), c, sha1(d) from t1 order by a;
-
-# -- full scan update --
-update t1 set b = @v5, d = @v6;
-select a, sha1(b), c, sha1(d) from t1 order by a;
-
-# -- range scan update
-update t1 set b = @v1, d = @v2 where 100 < c and c < 200;
-update t1 set b = @v4, d = @v5 where 200 < c and c < 300;
-update t1 set b = @v7, d = @v8 where 300 < c and c < 400;
-select a, sha1(b), c, sha1(d) from t1 order by a;
-
-# -- delete --
-delete from t1 where a = 1 and c = 101;
-delete from t1 where c = 102;
-# delete from t1 where c < 300; # XXX coredump
-delete from t1;
-select a, sha1(b), c, sha1(d) from t1 order by a;
-
-# -- clean up --
-drop table t1;
diff --git a/mysql-test/suite/ndb/t/ndb_bug26793.test b/mysql-test/suite/ndb/t/ndb_bug26793.test
deleted file mode 100644
index f35d8808c1a..00000000000
--- a/mysql-test/suite/ndb/t/ndb_bug26793.test
+++ /dev/null
@@ -1,35 +0,0 @@
--- source include/have_ndb.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-CREATE TABLE `test` (
-`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
-`t` VARCHAR( 10 ) NOT NULL
-) ENGINE = ndbcluster;
-
-# Add user1@localhost with a specific password
-# and connect as that user
-GRANT USAGE ON *.* TO user1@localhost IDENTIFIED BY 'pass';
-connect (user1,localhost,user1,pass,*NO-ONE*);
-
-# Run the query 100 times
-disable_query_log;
-disable_result_log;
-let $i= 100;
-while ($i)
-{
-select count(*) from information_schema.tables union all select count(*) from information_schema.tables union all select count(*) from information_schema.tables;
-dec $i;
-}
-enable_query_log;
-enable_result_log;
-
-disconnect user1;
-
-# Switch back to the default connection and cleanup
-connection default;
-DROP TABLE `test`.`test`;
-drop user user1@localhost;
-
diff --git a/mysql-test/suite/ndb/t/ndb_bug31477.test b/mysql-test/suite/ndb/t/ndb_bug31477.test
deleted file mode 100644
index 41c519e56fd..00000000000
--- a/mysql-test/suite/ndb/t/ndb_bug31477.test
+++ /dev/null
@@ -1,109 +0,0 @@
---source include/have_ndb.inc
-
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-# setup
-
-connect (con1,localhost,root,,test);
-connect (con2,localhost,root,,test);
-
-# unique index
-connection con1;
-create table t1(a int primary key, b int, c int, unique(b)) engine = ndb;
-insert into t1 values (2,2,2);
-insert into t1 values (3,3,3);
-insert into t1 values (4,4,4);
-
-begin;
-insert into t1 values (1,1,1);
-
-connection con2;
-begin;
---error 1205
-update t1 set c = 2 where b = 1;
-rollback;
-
-connection con1;
-rollback;
-drop table t1;
-# ordered index
-
-connection con1;
-create table t1(a int primary key, b int, c int, key(b)) engine = ndb;
-insert into t1 values (2,2,2);
-insert into t1 values (3,3,3);
-insert into t1 values (4,4,4);
-
-begin;
-insert into t1 values (1,1,1);
-
-connection con2;
-begin;
---error 1205
-update t1 set c = 2 where b = 1;
-rollback;
-
-connection con1;
-rollback;
-drop table t1;
-
-# multiple versions
-
---echo --con1
-connection con1;
-create table t1(a int primary key, b int, c int, key(b)) engine = ndb;
-insert into t1 values (1,1,1);
-insert into t1 values (2,2,2);
-insert into t1 values (3,3,3);
-insert into t1 values (4,4,4);
-
-begin;
-update t1 set c = 10 where a = 1;
-update t1 set c = 20 where a = 1;
-update t1 set c = 30 where a = 1;
-
---echo --con1 c=30
-select * from t1 where b >= 1 order by b;
---echo --con2 c=1
-connection con2;
-select * from t1 where b >= 1 order by b;
-
---echo --con1
-connection con1;
-delete from t1 where a = 1;
-
---echo --con1 c=none
-select * from t1 where b >= 1 order by b;
---echo --con2 c=1
-connection con2;
-select * from t1 where b >= 1 order by b;
-
---echo --con1
-connection con1;
-commit;
-
---echo --con1 c=none
-select * from t1 where b >= 1 order by b;
---echo --con2 c=none
-connection con2;
-select * from t1 where b >= 1 order by b;
-
---echo --con1
-connection con1;
-begin;
-insert into t1 values (1,1,1);
-update t1 set c = 10 where a = 1;
-update t1 set c = 20 where a = 1;
-update t1 set c = 30 where a = 1;
-
---echo --con1 c=30
-select * from t1 where b >= 1 order by b;
---echo --con2 c=none
-connection con2;
-select * from t1 where b >= 1 order by b;
-
-# this fails with "no such table" via con2 ???
-connection con1;
-drop table t1;
diff --git a/mysql-test/suite/ndb/t/ndb_cache.test b/mysql-test/suite/ndb/t/ndb_cache.test
deleted file mode 100644
index 9c299b61c24..00000000000
--- a/mysql-test/suite/ndb/t/ndb_cache.test
+++ /dev/null
@@ -1,122 +0,0 @@
--- source include/have_query_cache.inc
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-# Turn on and reset query cache
-set GLOBAL query_cache_type=on;
-set GLOBAL query_cache_size=1355776;
-reset query cache;
-flush status;
-
-# Create test table in NDB
-CREATE TABLE t1 ( pk int not null primary key,
- a int, b int not null, c varchar(20)) ENGINE=ndbcluster;
-insert into t1 value (1, 2, 3, 'First row');
-
-# Perform one query which should be inerted in query cache
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-# Perform the same query and make sure the query cache is hit
-select * from t1;
-show status like "Qcache_hits";
-
-# Update the table and make sure the correct data is returned
-update t1 set a=3 where pk=1;
-select * from t1;
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-# Insert a new record and make sure the correct data is returned
-insert into t1 value (2, 7, 8, 'Second row');
-insert into t1 value (4, 5, 6, 'Fourth row');
-select * from t1 order by pk;
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-select * from t1 order by pk;
-show status like "Qcache_hits";
-
-# Perform a "new" query and make sure the query cache is not hit
-select * from t1 where b=3;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
-# Same query again...
-select * from t1 where b=3;
-show status like "Qcache_hits";
-
-# Delete from the table
-delete from t1 where c='Fourth row';
-show status like "Qcache_queries_in_cache";
-select * from t1 where b=3;
-show status like "Qcache_hits";
-
-# Start another connection and check that the query cache is hit
-connect (con1,localhost,root,,);
-connection con1;
-use test;
-select * from t1 order by pk;
-select * from t1 where b=3;
-show status like "Qcache_hits";
-
-# Update the table and switch to other connection
-update t1 set a=4 where b=3;
-connect (con2,localhost,root,,);
-connection con2;
-use test;
-show status like "Qcache_queries_in_cache";
-select * from t1 order by pk desc;
-select * from t1 order by pk desc;
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-connection con1;
-select * from t1 order by pk desc;
-select * from t1 order by pk desc;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-# Use transactions and make sure the query cache is not updated until
-# transaction is commited
-begin;
-update t1 set a=5 where pk=1;
-# Note!! the below test shows that table is invalidated
-# before transaction is committed
-# TODO Fix so that cache is not invalidated HERE!
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-connection con2;
-select * from t1 order by pk desc;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-connection con1;
-commit;
-# TODO Here query is invalidated once again, commit count in NDB has changed
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-connection con2;
-select * from t1 order by pk desc;
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-connection con1;
-select * from t1 order by pk desc;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-drop table t1;
-
-show status like "Qcache_queries_in_cache";
-
-SET GLOBAL query_cache_size=0;
-
-# End of 4.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_cache2.test b/mysql-test/suite/ndb/t/ndb_cache2.test
deleted file mode 100644
index 352b01ef73f..00000000000
--- a/mysql-test/suite/ndb/t/ndb_cache2.test
+++ /dev/null
@@ -1,361 +0,0 @@
--- source include/have_query_cache.inc
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-drop table if exists t1, t2, t3, t4, t5;
---enable_warnings
-
-
-# Turn on and reset query cache
-set GLOBAL query_cache_type=on;
-set GLOBAL query_cache_size=1355776;
-# Turn on thread that will fetch commit count for open tables
-set GLOBAL ndb_cache_check_time=100;
-reset query cache;
-flush status;
-
-# Create test tables in NDB
-CREATE TABLE t1 (
- pk int not null primary key,
- a1 int,
- b1 int not null,
- c1 varchar(20)
-) ENGINE=ndb;
-CREATE TABLE t2 (
- pk int not null primary key,
- a2 int,
- b2 int not null
-) ENGINE=ndb;
-CREATE TABLE t3 (
- pk int not null primary key,
- a3 int,
- b3 int not null,
- c3 int not null,
- d3 varchar(20)
-) ENGINE=ndb;
-CREATE TABLE t4 (
- a4 int,
- b4 int not null,
- c4 char(20)
-) ENGINE=ndbcluster;
-CREATE TABLE t5 (
- pk int not null primary key,
- a5 int,
- b5 int not null,
- c5 varchar(255)
-) ENGINE=ndbcluster;
-insert into t1 value (1, 2, 3, 'First row');
-insert into t2 value (1, 2, 3);
-insert into t3 value (1, 2, 3, 4, '3 - First row');
-insert into t4 value (2, 3, '4 - First row');
-insert into t5 value (1, 2, 3, '5 - First row');
-
-# Perform one query which should be inserted in query cache
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-# Perform the same query and make sure the query cache is hit
-select * from t1;
-show status like "Qcache_hits";
-
-# Update the table and make sure the correct data is returned
-update t1 set a1=3 where pk=1;
-select * from t1;
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-# Insert a new record and make sure the correct data is returned
-insert into t1 value (2, 7, 8, 'Second row');
-insert into t1 value (4, 5, 6, 'Fourth row');
-select * from t1 order by pk desc;
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-select * from t1 order by pk desc;
-show status like "Qcache_hits";
-
-# Perform a "new" query and make sure the query cache is not hit
-select * from t1 where b1=3;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_hits";
-
-# Same query again...
-select * from t1 where b1=3;
-show status like "Qcache_hits";
-
-# Delete from the table
-delete from t1 where c1='Fourth row';
-show status like "Qcache_queries_in_cache";
-select * from t1 where b1=3;
-show status like "Qcache_hits";
-
-# Start another connection and check that the query cache is hit
-connect (con1,localhost,root,,);
-connection con1;
-use test;
-select * from t1 order by pk desc;
-select * from t1 where b1=3;
-show status like "Qcache_hits";
-
-# Update the table and switch to other connection
-update t1 set a1=4 where b1=3;
-connect (con2,localhost,root,,);
-connection con2;
-use test;
-show status like "Qcache_queries_in_cache";
-select * from t1 order by pk desc;
-select * from t1 order by pk desc;
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-connection con1;
-select * from t1 order by pk desc;
-select * from t1 order by pk desc;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-# Load all tables into cache
-select * from t2;
-select * from t3;
-select * from t4;
-select * from t5;
-show status like "Qcache_queries_in_cache";
-
-#####################################################################
-# Start transaction and perform update
-# Switch to other transaction and check that update does not show up
-# Switch back and commit transaction
-# Switch to other transaction and check that update shows up
-#####################################################################
-connection con1;
-flush status;
-begin;
-update t1 set a1=5 where pk=1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-connection con2;
-select * from t1 order by pk desc;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-connection con1;
-commit;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-connection con2;
-select * from t1 order by pk desc;
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-connection con1;
-select * from t1 order by pk desc;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-#####################################################################
-# Start transaction and perform update
-# Switch to other transaction and check that update does not show up
-# Switch back, perform selects and commit transaction
-# Switch to other transaction and check that update shows up
-#####################################################################
-connection con1;
-flush status;
-begin;
-update t1 set a1=6 where pk=1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-connection con2;
-select * from t1 order by pk desc;
-select * from t1 order by pk desc;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-connection con1;
-# The two queries below will not hit cache since transaction is ongoing
-select * from t1 order by pk desc;
-select * from t1 order by pk desc;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-commit;
-
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-connection con2;
-select * from t1 order by pk desc;
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-connection con1;
-select * from t1 order by pk desc;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-#####################################################################
-# Start transaction and perform insert
-# Switch to other transaction and check that insert does not show up
-# Switch back, perform selects and commit transaction
-# Switch to other transaction and check that update shows up
-#####################################################################
-connection con1;
-flush status;
-begin;
-insert into t1 set pk=5, a1=6, b1=3, c1="New row";
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-connection con2;
-select * from t1 where pk=5;
-select * from t1 order by pk desc;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-connection con1;
-# The below four queries will not be cached, trans is ongoing
-select * from t1 where pk=5;
-select * from t1 where pk=5;
-select * from t1 order by pk desc;
-select * from t1 order by pk desc;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-commit;
-
-connection con2;
-select * from t1 order by pk desc;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-connection con1;
-
-#####################################################################
-# Start transaction and perform delete
-# Switch to other transaction and check that delete does not show up
-# Switch back, perform selects and commit transaction
-# Switch to other transaction and check that update shows up
-#####################################################################
-connection con1;
-flush status;
-begin;
-delete from t1 where pk=2;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-connection con2;
-select * from t1 where pk=2;
-select * from t1 order by pk desc;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-connection con1;
-# The below four queries will not be cached, trans is ongoing
-select * from t1 where pk=2;
-select * from t1 order by pk desc;
-select * from t1 order by pk desc;
-select * from t1 where pk=2;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-commit;
-
-connection con2;
-select * from t1 order by pk desc;
-select * from t1 where pk=2;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-connection con1;
-
-#####################################################################
-# Start a transaction which updates all tables
-# Switch to other transaction and check updates does not show up
-# Switch back, perform selects and commit transaction
-# Switch to other transaction and check that update shows up
-#####################################################################
-flush status;
-begin;
-update t1 set a1=9 where pk=1;
-update t2 set a2=9 where pk=1;
-update t3 set a3=9 where pk=1;
-update t4 set a4=9 where a4=2;
-update t5 set a5=9 where pk=1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-connection con2;
-select * from t1 order by pk desc;
-select * from t2;
-select * from t3;
-select * from t4;
-select * from t5;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-connection con1;
-# The below five queries will not be cached, trans is ongoing
-select * from t1 order by pk desc;
-select * from t1 order by pk desc;
-select * from t2;
-select * from t3;
-select * from t4;
-select * from t5;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-commit;
-
-connection con2;
-select * from t1 order by pk desc;
-select * from t2;
-select * from t3;
-select * from t4;
-select * from t5;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-connection con1;
-select * from t1 order by pk desc;
-select * from t2;
-select * from t3;
-select * from t4;
-select * from t5;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-select * from t1 order by pk desc;
-select * from t2;
-select * from t3;
-select * from t4;
-select * from t5;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-connection con2;
-select * from t1 order by pk desc;
-select * from t2;
-select * from t3;
-select * from t4;
-select * from t5;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-drop table t1, t2, t3, t4, t5;
-
-# There should be no queries in cache, when tables have been dropped
-show status like "Qcache_queries_in_cache";
-
-SET GLOBAL query_cache_size=0;
-SET GLOBAL ndb_cache_check_time=0;
-
-
diff --git a/mysql-test/suite/ndb/t/ndb_cache_multi.test b/mysql-test/suite/ndb/t/ndb_cache_multi.test
deleted file mode 100644
index 8c7f186b866..00000000000
--- a/mysql-test/suite/ndb/t/ndb_cache_multi.test
+++ /dev/null
@@ -1,71 +0,0 @@
--- source include/have_query_cache.inc
--- source include/have_multi_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-drop table if exists t1, t2;
---enable_warnings
-
-
-# Turn on and reset query cache on server1
-connection server1;
-set GLOBAL query_cache_type=on;
-set GLOBAL query_cache_size=1355776;
-reset query cache;
-flush status;
-
-# Turn on and reset query cache on server2
-connection server2;
-set GLOBAL query_cache_type=on;
-set GLOBAL query_cache_size=1355776;
-reset query cache;
-flush status;
-
-
-
-# Create test tables in NDB and load them into cache
-# on server1
-connection server1;
-create table t1 (a int) engine=ndbcluster;
-create table t2 (a int) engine=ndbcluster;
-insert into t1 value (2);
-insert into t2 value (3);
-select * from t1;
-select * from t2;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-
-# Connect server2, load table in to cache, then update the table
-connection server2;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-update t1 set a=3 where a=2;
-
-# Connect to server1 and check that cache is invalidated
-# and correct data is returned
-connection server1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-drop table t1, t2;
-
-
-# Turn off query cache on server1
-connection server1;
-set GLOBAL query_cache_size=0;
-
-# Turn off query cache on server2
-connection server2;
-set GLOBAL query_cache_size=0;
diff --git a/mysql-test/suite/ndb/t/ndb_cache_multi2.test b/mysql-test/suite/ndb/t/ndb_cache_multi2.test
deleted file mode 100644
index 853e4090193..00000000000
--- a/mysql-test/suite/ndb/t/ndb_cache_multi2.test
+++ /dev/null
@@ -1,125 +0,0 @@
--- source include/have_query_cache.inc
--- source include/have_multi_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-drop table if exists t1, t2;
---enable_warnings
-
-
-# Turn on and reset query cache on server1
-connection server1;
-echo == Connected to server1 ==;
-set GLOBAL query_cache_type=on;
-set GLOBAL query_cache_size=1355776;
-set GLOBAL ndb_cache_check_time=1;
-reset query cache;
-flush status;
-
-# Turn on and reset query cache on server2
-connection server2;
-echo == Connected to server2 ==;
-set GLOBAL query_cache_type=on;
-set GLOBAL query_cache_size=1355776;
-set GLOBAL ndb_cache_check_time=1;
-reset query cache;
-flush status;
-
-# Create test tables in NDB and load them into cache
-# on server1
-connection server1;
-echo == Connected to server1 ==;
-create table t1 (a int) engine=ndbcluster;
-create table t2 (a int) engine=ndbcluster;
-insert into t1 value (2);
-insert into t2 value (3);
-select * from t1;
-# Run the check query once to load it into qc on server1
-# See at the end of this test why we need to disable ps-protocol for
-# this query (*)
---disable_ps_protocol
-select a != 3 from t1;
---enable_ps_protocol
-select * from t2;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-
-
-# Connect server2, load table in to cache, then update the table
-connection server2;
-echo == Connected to server2 ==;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-select * from t1;
-show status like "Qcache_queries_in_cache";
-show status like "Qcache_inserts";
-show status like "Qcache_hits";
-update t1 set a=3 where a=2;
-
-# Connect to server1 and check that cache is invalidated
-# and correct data is returned
-connection server1;
-echo == Connected to server1 ==;
-
-# Loop and wait for max 10 seconds until query cache thread
-# has invalidated the cache and the column a in t1 is equal to 3
-let $retries=20;
-while (`select a != 3 from t1`)
-{
- dec $retries;
- if (!$retries)
- {
- The query_cache thread failed to invalidate query_cache in 10 seconds;
- }
- sleep 0.5;
-}
-
-# Select from t1 one last time for the result file
-# Column a should be 3
-select * from t1;
-
-# There should now be three queries in the cache
-show status like "Qcache_queries_in_cache";
-
-drop table t1, t2;
-
-# Turn off and reset query cache on server1 and server2
-connection server1;
-set GLOBAL query_cache_size=0;
-set GLOBAL ndb_cache_check_time=0;
-reset query cache;
-flush status;
-connection server2;
-set GLOBAL query_cache_size=0;
-set GLOBAL ndb_cache_check_time=0;
-reset query cache;
-flush status;
-
-# (*) Why we need to execute the query in non-ps mode.
-# The principle of this test is: two mysqlds connected to one cluster,
-# both using their query cache. Queries are cached in server1
-# ("select a!=3 from t1", "select * from t1"),
-# table t1 is modified in server2, we want to see that this invalidates
-# the query cache of server1. Invalidation with NDB works like this:
-# when a query is found in the query cache, NDB is asked if the tables
-# have changed. In this test, ha_ndbcluster calls NDB every millisecond
-# to collect change information about tables.
-# Due to this millisecond delay, there is need for a loop ("while...")
-# in this test, which waits until a query1 ("select a!=3 from t1") is
-# invalidated (which is equivalent to it returning
-# up-to-date results), and then expects query2 ("select * from t1")
-# to have been invalidated (see up-to-date results).
-# But when enabling --ps-protocol in this test, the logic breaks,
-# because query1 is still done via mysql_real_query() (see mysqltest.c:
-# eval_expr() always uses mysql_real_query()). So, query1 returning
-# up-to-date results is not a sign of it being invalidated in the cache,
-# because it was NOT in the cache ("select a!=3 from t1" on line 39
-# was done with prep stmts, while `select a!=3 from t1` is not,
-# thus the second does not see the first in the cache). Thus, we may run
-# query2 when cache still has not been invalidated.
-# The solution is to make the initial "select a!=3 from t1" run
-# as a normal query, this repairs the broken logic.
-# But note, "select * from t1" is still using prepared statements
-# which was the goal of this test with --ps-protocol.
diff --git a/mysql-test/suite/ndb/t/ndb_charset.test b/mysql-test/suite/ndb/t/ndb_charset.test
deleted file mode 100644
index 2d9f66564bc..00000000000
--- a/mysql-test/suite/ndb/t/ndb_charset.test
+++ /dev/null
@@ -1,257 +0,0 @@
---source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-#
-# Minimal NDB charset test.
-#
-
-# pk - binary
-
-create table t1 (
- a char(3) character set latin1 collate latin1_bin primary key
-) engine=ndb;
-# ok
-insert into t1 values('aAa');
-insert into t1 values('aaa');
-insert into t1 values('AAA');
-# 3
-select * from t1 order by a;
-# 1
-select * from t1 where a = 'aAa';
-# 1
-select * from t1 where a = 'aaa';
-# 0
-select * from t1 where a = 'AaA';
-# 1
-select * from t1 where a = 'AAA';
-drop table t1;
-
-# pk - case insensitive
-
-create table t1 (
- a char(3) character set latin1 collate latin1_swedish_ci primary key
-) engine=ndb;
-# ok
-insert into t1 values('aAa');
-# fail
---error ER_DUP_ENTRY
-insert into t1 values('aaa');
---error ER_DUP_ENTRY
-insert into t1 values('AAA');
-# 1
-select * from t1 order by a;
-# 1
-select * from t1 where a = 'aAa';
-# 1
-select * from t1 where a = 'aaa';
-# 1
-select * from t1 where a = 'AaA';
-# 1
-select * from t1 where a = 'AAA';
-drop table t1;
-
-# pk - varchar
-
-create table t1 (
- a varchar(20) character set latin1 collate latin1_swedish_ci primary key
-) engine=ndb;
-#
-insert into t1 values ('A'),('b '),('C '),('d '),('E'),('f');
--- error ER_DUP_ENTRY
-insert into t1 values('b');
--- error ER_DUP_ENTRY
-insert into t1 values('a ');
-#
-select a,length(a) from t1 order by a;
-select a,length(a) from t1 order by a desc;
-select * from t1 where a = 'a';
-select * from t1 where a = 'a ';
-select * from t1 where a = 'd';
-drop table t1;
-
-# unique hash index - binary
-
-create table t1 (
- p int primary key,
- a char(3) character set latin1 collate latin1_bin not null,
- unique key(a)
-) engine=ndb;
-# ok
-insert into t1 values(1, 'aAa');
-insert into t1 values(2, 'aaa');
-insert into t1 values(3, 'AAA');
-# 3
-select * from t1 order by p;
-# 1
-select * from t1 where a = 'aAa';
-# 1
-select * from t1 where a = 'aaa';
-# 0
-select * from t1 where a = 'AaA';
-# 1
-select * from t1 where a = 'AAA';
-drop table t1;
-
-# unique hash index - case insensitive
-
-create table t1 (
- p int primary key,
- a char(3) character set latin1 collate latin1_swedish_ci not null,
- unique key(a)
-) engine=ndb;
-# ok
-insert into t1 values(1, 'aAa');
-# fail
---error ER_DUP_ENTRY
-insert into t1 values(2, 'aaa');
---error ER_DUP_ENTRY
-insert into t1 values(3, 'AAA');
-# 1
-select * from t1 order by p;
-# 1
-select * from t1 where a = 'aAa';
-# 1
-select * from t1 where a = 'aaa';
-# 1
-select * from t1 where a = 'AaA';
-# 1
-select * from t1 where a = 'AAA';
-drop table t1;
-
-# unique hash index - varchar
-
-create table t1 (
- p int primary key,
- a varchar(20) character set latin1 collate latin1_swedish_ci not null,
- unique key(a)
-) engine=ndb;
-#
-insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f');
--- error ER_DUP_ENTRY
-insert into t1 values(99,'b');
--- error ER_DUP_ENTRY
-insert into t1 values(99,'a ');
-#
-select a,length(a) from t1 order by a;
-select a,length(a) from t1 order by a desc;
-select * from t1 where a = 'a';
-select * from t1 where a = 'a ';
-select * from t1 where a = 'd';
-drop table t1;
-
-# ordered index - binary
-
-create table t1 (
- p int primary key,
- a char(3) character set latin1 collate latin1_bin not null,
- index(a)
-) engine=ndb;
-# ok
-insert into t1 values(1, 'aAa');
-insert into t1 values(2, 'aaa');
-insert into t1 values(3, 'AAA');
-insert into t1 values(4, 'aAa');
-insert into t1 values(5, 'aaa');
-insert into t1 values(6, 'AAA');
-# 6
-select * from t1 order by p;
-# plan too flaky
-#--replace_column 9 #
-#explain select * from t1 where a = 'zZz' order by p;
-# 2
-select * from t1 where a = 'aAa' order by p;
-# 2
-select * from t1 where a = 'aaa' order by p;
-# 0
-select * from t1 where a = 'AaA' order by p;
-# 2
-select * from t1 where a = 'AAA' order by p;
-drop table t1;
-
-# ordered index - case insensitive
-
-create table t1 (
- p int primary key,
- a char(3) character set latin1 collate latin1_swedish_ci not null,
- index(a)
-) engine=ndb;
-# ok
-insert into t1 values(1, 'aAa');
-insert into t1 values(2, 'aaa');
-insert into t1 values(3, 'AAA');
-insert into t1 values(4, 'aAa');
-insert into t1 values(5, 'aaa');
-insert into t1 values(6, 'AAA');
-# 6
-select * from t1 order by p;
-# plan too flaky
-#--replace_column 9 #
-#explain select * from t1 where a = 'zZz' order by p;
-# 6
-select * from t1 where a = 'aAa' order by p;
-# 6
-select * from t1 where a = 'aaa' order by p;
-# 6
-select * from t1 where a = 'AaA' order by p;
-# 6
-select * from t1 where a = 'AAA' order by p;
-drop table t1;
-
-# ordered index - varchar
-
-create table t1 (
- p int primary key,
- a varchar(20) character set latin1 collate latin1_swedish_ci not null,
- index(a, p)
-) engine=ndb;
-#
-insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f');
-insert into t1 values (7,'a'),(8,'B '),(9,'c '),(10,'D'),(11,'e'),(12,'F ');
-select p,a,length(a) from t1 order by a, p;
-select * from t1 where a = 'a ' order by a desc, p desc;
-select * from t1 where a >= 'D' order by a, p;
-select * from t1 where a < 'D' order by a, p;
-#
-select count(*) from t1 x, t1 y, t1 z where x.a = y.a and y.a = z.a;
-drop table t1;
-
-# minimal multi-byte test
-# removed by jonas as this requires a configure --with-extra-charsets
-#create table t1 (
-# a char(5) character set ucs2,
-# b varchar(7) character set utf8,
-# primary key(a, b)
-#) engine=ndb;
-#
-#insert into t1 values
-# ('a','A '),('B ','b'),('c','C '),('D','d'),('e ','E'),('F','f '),
-# ('A','b '),('b ','C'),('C','d '),('d','E'),('E ','f'),
-# ('a','C '),('B ','d'),('c','E '),('D','f');
-#-- error ER_DUP_ENTRY
-#insert into t1 values('d','f');
-#
-#select a,b,length(a),length(b) from t1 order by a,b limit 3;
-#select a,b,length(a),length(b) from t1 order by a desc, b desc limit 3;
-#select a,b,length(a),length(b) from t1 where a='c' and b='c';
-#drop table t1;
-
-# bug#14007
-create table t1 (
- a char(10) primary key
-) engine=ndbcluster default charset=latin1;
-
-insert into t1 values ('aaabb');
-select * from t1;
-replace into t1 set a = 'AAABB';
-select * from t1;
-replace into t1 set a = 'aAaBb';
-select * from t1;
-replace into t1 set a = 'aaabb';
-select * from t1;
-drop table t1;
-
-# End of 4.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_condition_pushdown.test b/mysql-test/suite/ndb/t/ndb_condition_pushdown.test
deleted file mode 100644
index a6ab06eae31..00000000000
--- a/mysql-test/suite/ndb/t/ndb_condition_pushdown.test
+++ /dev/null
@@ -1,2054 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1,t2,t3,t4;
---enable_warnings
-
-#
-# Test of condition pushdown to storage engine
-#
-CREATE TABLE t1 (
- auto int(5) unsigned NOT NULL auto_increment,
- string char(10),
- vstring varchar(10),
- bin binary(2),
- vbin varbinary(7),
- tiny tinyint(4) DEFAULT '0' NOT NULL ,
- short smallint(6) DEFAULT '1' NOT NULL ,
- medium mediumint(8) DEFAULT '0' NOT NULL,
- long_int int(11) DEFAULT '0' NOT NULL,
- longlong bigint(13) DEFAULT '0' NOT NULL,
- real_float float(13,1) DEFAULT 0.0 NOT NULL,
- real_double double(16,4),
- real_decimal decimal(16,4),
- utiny tinyint(3) unsigned DEFAULT '0' NOT NULL,
- ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL,
- umedium mediumint(8) unsigned DEFAULT '0' NOT NULL,
- ulong int(11) unsigned DEFAULT '0' NOT NULL,
- ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL,
- bits bit(3),
- options enum('zero','one','two','three','four') not null,
- flags set('zero','one','two','three','four') not null,
- date_field date,
- year_field year,
- time_field time,
- date_time datetime,
- time_stamp timestamp,
- PRIMARY KEY (auto)
-) engine=ndb;
-
-insert into t1 values
-(NULL,"aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1,
- b'001','one','one',
- '1901-01-01','1901',
-'01:01:01','1901-01-01 01:01:01',NULL),
-(NULL,"bbbb","bbbb",0xBBBB,0xBBBB,-2,-2,-2,-2,-2,2.2,2.2,2.2,2,2,2,2,2,
- b'010','two','one,two',
- '1902-02-02','1902',
-'02:02:02','1902-02-02 02:02:02',NULL),
-(NULL,"cccc","cccc",0xCCCC,0xCCCC,-3,-3,-3,-3,-3,3.3,3.3,3.3,3,3,3,3,3,
- b'011','three','one,two,three',
- '1903-03-03','1903',
-'03:03:03','1903-03-03 03:03:03',NULL),
-(NULL,"dddd","dddd",0xDDDD,0xDDDD,-4,-4,-4,-4,-4,4.4,4.4,4.4,4,4,4,4,4,
- b'100','four','one,two,three,four',
- '1904-04-04','1904',
-'04:04:04','1904-04-04 04:04:04',NULL);
-
-CREATE TABLE t2 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 int unsigned, attr3 VARCHAR(10) ) ENGINE=ndbcluster;
-
-insert into t2 values (0,0,0, "a"),(1,1,1,"b"),(2,2,NULL,NULL),(3,3,3,"d"),(4,4,4,"e"),(5,5,5,"f");
-
-CREATE TABLE t3 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) ) ENGINE=ndbcluster;
-
-insert into t3 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f");
-
-CREATE TABLE t4 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) , KEY (attr1)) ENGINE=ndbcluster;
-
-insert into t4 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f");
-
-set @old_optimizer_switch = @@session.optimizer_switch;
-set optimizer_switch = "engine_condition_pushdown=off";
-
-# Test all types and compare operators
-select auto from t1 where
-string = "aaaa" and
-vstring = "aaaa" and
-bin = 0xAAAA and
-vbin = 0xAAAA and
-tiny = -1 and
-short = -1 and
-medium = -1 and
-long_int = -1 and
-longlong = -1 and
-real_float > 1.0 and real_float < 2.0 and
-real_double > 1.0 and real_double < 2.0 and
-real_decimal > 1.0 and real_decimal < 2.0 and
-utiny = 1 and
-ushort = 1 and
-umedium = 1 and
-ulong = 1 and
-ulonglong = 1 and
-bits = b'001' and
-options = 'one' and
-flags = 'one' and
-date_field = '1901-01-01' and
-year_field = '1901' and
-time_field = '01:01:01' and
-date_time = '1901-01-01 01:01:01'
-order by auto;
-
-select auto from t1 where
-string != "aaaa" and
-vstring != "aaaa" and
-bin != 0xAAAA and
-vbin != 0xAAAA and
-tiny != -1 and
-short != -1 and
-medium != -1 and
-long_int != -1 and
-longlong != -1 and
-(real_float < 1.0 or real_float > 2.0) and
-(real_double < 1.0 or real_double > 2.0) and
-(real_decimal < 1.0 or real_decimal > 2.0) and
-utiny != 1 and
-ushort != 1 and
-umedium != 1 and
-ulong != 1 and
-ulonglong != 1 and
-bits != b'001' and
-options != 'one' and
-flags != 'one' and
-date_field != '1901-01-01' and
-year_field != '1901' and
-time_field != '01:01:01' and
-date_time != '1901-01-01 01:01:01'
-order by auto;
-
-select auto from t1 where
-string > "aaaa" and
-vstring > "aaaa" and
-bin > 0xAAAA and
-vbin > 0xAAAA and
-tiny < -1 and
-short < -1 and
-medium < -1 and
-long_int < -1 and
-longlong < -1 and
-real_float > 1.1 and
-real_double > 1.1 and
-real_decimal > 1.1 and
-utiny > 1 and
-ushort > 1 and
-umedium > 1 and
-ulong > 1 and
-ulonglong > 1 and
-bits > b'001' and
-(options = 'two' or options = 'three' or options = 'four') and
-(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and
-date_field > '1901-01-01' and
-year_field > '1901' and
-time_field > '01:01:01' and
-date_time > '1901-01-01 01:01:01'
-order by auto;
-
-select auto from t1 where
-string >= "aaaa" and
-vstring >= "aaaa" and
-bin >= 0xAAAA and
-vbin >= 0xAAAA and
-tiny <= -1 and
-short <= -1 and
-medium <= -1 and
-long_int <= -1 and
-longlong <= -1 and
-real_float >= 1.0 and
-real_double >= 1.0 and
-real_decimal >= 1.0 and
-utiny >= 1 and
-ushort >= 1 and
-umedium >= 1 and
-ulong >= 1 and
-ulonglong >= 1 and
-bits >= b'001' and
-(options = 'one' or options = 'two' or options = 'three' or options = 'four') and
-(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and
-date_field >= '1901-01-01' and
-year_field >= '1901' and
-time_field >= '01:01:01' and
-date_time >= '1901-01-01 01:01:01'
-order by auto;
-
-select auto from t1 where
-string < "dddd" and
-vstring < "dddd" and
-bin < 0xDDDD and
-vbin < 0xDDDD and
-tiny > -4 and
-short > -4 and
-medium > -4 and
-long_int > -4 and
-longlong > -4 and
-real_float < 4.4 and
-real_double < 4.4 and
-real_decimal < 4.4 and
-utiny < 4 and
-ushort < 4 and
-umedium < 4 and
-ulong < 4 and
-ulonglong < 4 and
-bits < b'100' and
-(options = 'one' or options = 'two' or options = 'three') and
-(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and
-date_field < '1904-01-01' and
-year_field < '1904' and
-time_field < '04:04:04' and
-date_time < '1904-04-04 04:04:04'
-order by auto;
-
-select auto from t1 where
-string <= "dddd" and
-vstring <= "dddd" and
-bin <= 0xDDDD and
-vbin <= 0xDDDD and
-tiny >= -4 and
-short >= -4 and
-medium >= -4 and
-long_int >= -4 and
-longlong >= -4 and
-real_float <= 4.5 and
-real_double <= 4.5 and
-real_decimal <= 4.5 and
-utiny <= 4 and
-ushort <= 4 and
-umedium <= 4 and
-ulong <= 4 and
-ulonglong <= 4 and
-bits <= b'100' and
-(options = 'one' or options = 'two' or options = 'three' or options = 'four') and
-(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and
-date_field <= '1904-04-04' and
-year_field <= '1904' and
-time_field <= '04:04:04' and
-date_time <= '1904-04-04 04:04:04'
-order by auto;
-
-# Test LIKE/NOT LIKE
-select auto from t1 where
-string like "b%" and
-vstring like "b%" and
-bin like concat(0xBB, '%') and
-vbin like concat(0xBB, '%')
-order by auto;
-
-select auto from t1 where
-string not like "b%" and
-vstring not like "b%" and
-bin not like concat(0xBB, '%') and
-vbin not like concat(0xBB, '%')
-order by auto;
-
-# BETWEEN
-select auto from t1 where
-(string between "aaaa" and "cccc") and
-(vstring between "aaaa" and "cccc") and
-(bin between 0xAAAA and 0xCCCC) and
-(vbin between 0xAAAA and 0xCCCC) and
-(tiny between -3 and -1) and
-(short between -3 and -1) and
-(medium between -3 and -1) and
-(long_int between -3 and -1) and
-(longlong between -3 and -1) and
-(utiny between 1 and 3) and
-(ushort between 1 and 3) and
-(umedium between 1 and 3) and
-(ulong between 1 and 3) and
-(ulonglong between 1 and 3) and
-(bits between b'001' and b'011') and
-(options between 'one' and 'three') and
-(flags between 'one' and 'one,two,three') and
-(date_field between '1901-01-01' and '1903-03-03') and
-(year_field between '1901' and '1903') and
-(time_field between '01:01:01' and '03:03:03') and
-(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03')
-order by auto;
-
-select auto from t1 where
-("aaaa" between string and string) and
-("aaaa" between vstring and vstring) and
-(0xAAAA between bin and bin) and
-(0xAAAA between vbin and vbin) and
-(-1 between tiny and tiny) and
-(-1 between short and short) and
-(-1 between medium and medium) and
-(-1 between long_int and long_int) and
-(-1 between longlong and longlong) and
-(1 between utiny and utiny) and
-(1 between ushort and ushort) and
-(1 between umedium and umedium) and
-(1 between ulong and ulong) and
-(1 between ulonglong and ulonglong) and
-(b'001' between bits and bits) and
-('one' between options and options) and
-('one' between flags and flags) and
-('1901-01-01' between date_field and date_field) and
-('1901' between year_field and year_field) and
-('01:01:01' between time_field and time_field) and
-('1901-01-01 01:01:01' between date_time and date_time)
-order by auto;
-
-# NOT BETWEEN
-select auto from t1 where
-(string not between "aaaa" and "cccc") and
-(vstring not between "aaaa" and "cccc") and
-(bin not between 0xAAAA and 0xCCCC) and
-(vbin not between 0xAAAA and 0xCCCC) and
-(tiny not between -3 and -1) and
-(short not between -3 and -1) and
-(medium not between -3 and -1) and
-(long_int not between -3 and -1) and
-(longlong not between -3 and -1) and
-(utiny not between 1 and 3) and
-(ushort not between 1 and 3) and
-(umedium not between 1 and 3) and
-(ulong not between 1 and 3) and
-(ulonglong not between 1 and 3) and
-(bits not between b'001' and b'011') and
-(options not between 'one' and 'three') and
-(flags not between 'one' and 'one,two,three') and
-(date_field not between '1901-01-01' and '1903-03-03') and
-(year_field not between '1901' and '1903') and
-(time_field not between '01:01:01' and '03:03:03') and
-(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03')
-order by auto;
-
-select auto from t1 where
-("aaaa" not between string and string) and
-("aaaa" not between vstring and vstring) and
-(0xAAAA not between bin and bin) and
-(0xAAAA not between vbin and vbin) and
-(-1 not between tiny and tiny) and
-(-1 not between short and short) and
-(-1 not between medium and medium) and
-(-1 not between long_int and long_int) and
-(-1 not between longlong and longlong) and
-(1 not between utiny and utiny) and
-(1 not between ushort and ushort) and
-(1 not between umedium and umedium) and
-(1 not between ulong and ulong) and
-(1 not between ulonglong and ulonglong) and
-(b'001' not between bits and bits) and
-('one' not between options and options) and
-('one' not between flags and flags) and
-('1901-01-01' not between date_field and date_field) and
-('1901' not between year_field and year_field) and
-('01:01:01' not between time_field and time_field) and
-('1901-01-01 01:01:01' not between date_time and date_time)
-order by auto;
-
-# IN
-select auto from t1 where
-string in("aaaa","cccc") and
-vstring in("aaaa","cccc") and
-bin in(0xAAAA,0xCCCC) and
-vbin in(0xAAAA,0xCCCC) and
-tiny in(-1,-3) and
-short in(-1,-3) and
-medium in(-1,-3) and
-long_int in(-1,-3) and
-longlong in(-1,-3) and
-utiny in(1,3) and
-ushort in(1,3) and
-umedium in(1,3) and
-ulong in(1,3) and
-ulonglong in(1,3) and
-bits in(b'001',b'011') and
-options in('one','three') and
-flags in('one','one,two,three') and
-date_field in('1901-01-01','1903-03-03') and
-year_field in('1901','1903') and
-time_field in('01:01:01','03:03:03') and
-date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03')
-order by auto;
-
-select auto from t1 where
-"aaaa" in(string) and
-"aaaa" in(vstring) and
-0xAAAA in(bin) and
-0xAAAA in(vbin) and
-(-1 in(tiny)) and
-(-1 in(short)) and
-(-1 in(medium)) and
-(-1 in(long_int)) and
-(-1 in(longlong)) and
-1 in(utiny) and
-1 in(ushort) and
-1 in(umedium) and
-1 in(ulong) and
-1 in(ulonglong) and
-b'001' in(bits) and
-'one' in(options) and
-'one' in(flags) and
-'1901-01-01' in(date_field) and
-'1901' in(year_field) and
-'01:01:01' in(time_field) and
-'1901-01-01 01:01:01' in(date_time)
-order by auto;
-
-# NOT IN
-select auto from t1 where
-string not in("aaaa","cccc") and
-vstring not in("aaaa","cccc") and
-bin not in(0xAAAA,0xCCCC) and
-vbin not in(0xAAAA,0xCCCC) and
-tiny not in(-1,-3) and
-short not in(-1,-3) and
-medium not in(-1,-3) and
-long_int not in(-1,-3) and
-longlong not in(-1,-3) and
-utiny not in(1,3) and
-ushort not in(1,3) and
-umedium not in(1,3) and
-ulong not in(1,3) and
-ulonglong not in(1,3) and
-bits not in(b'001',b'011') and
-options not in('one','three') and
-flags not in('one','one,two,three') and
-date_field not in('1901-01-01','1903-03-03') and
-year_field not in('1901','1903') and
-time_field not in('01:01:01','03:03:03') and
-date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03')
-order by auto;
-
-select auto from t1 where
-"aaaa" not in(string) and
-"aaaa" not in(vstring) and
-0xAAAA not in(bin) and
-0xAAAA not in(vbin) and
-(-1 not in(tiny)) and
-(-1 not in(short)) and
-(-1 not in(medium)) and
-(-1 not in(long_int)) and
-(-1 not in(longlong)) and
-1 not in(utiny) and
-1 not in(ushort) and
-1 not in(umedium) and
-1 not in(ulong) and
-1 not in(ulonglong) and
-b'001' not in(bits) and
-'one' not in(options) and
-'one' not in(flags) and
-'1901-01-01' not in(date_field) and
-'1901' not in(year_field) and
-'01:01:01' not in(time_field) and
-'1901-01-01 01:01:01' not in(date_time)
-order by auto;
-
-# Various tests
-select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1;
-select * from t2 where attr3 is not null and attr1 > 2 order by pk1;
-select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1;
-select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1;
-select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1;
-select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1;
-
-set optimizer_switch = "engine_condition_pushdown=on";
-
-# Test all types and compare operators
---replace_column 9 #
-explain
-select auto from t1 where
-string = "aaaa" and
-vstring = "aaaa" and
-bin = 0xAAAA and
-vbin = 0xAAAA and
-tiny = -1 and
-short = -1 and
-medium = -1 and
-long_int = -1 and
-longlong = -1 and
-real_float > 1.0 and real_float < 2.0 and
-real_double > 1.0 and real_double < 2.0 and
-real_decimal > 1.0 and real_decimal < 2.0 and
-utiny = 1 and
-ushort = 1 and
-umedium = 1 and
-ulong = 1 and
-ulonglong = 1 and
-/* bits = b'001' and */
-options = 'one' and
-flags = 'one' and
-date_field = '1901-01-01' and
-year_field = '1901' and
-time_field = '01:01:01' and
-date_time = '1901-01-01 01:01:01'
-order by auto;
-
-select auto from t1 where
-string = "aaaa" and
-vstring = "aaaa" and
-bin = 0xAAAA and
-vbin = 0xAAAA and
-tiny = -1 and
-short = -1 and
-medium = -1 and
-long_int = -1 and
-longlong = -1 and
-real_float > 1.0 and real_float < 2.0 and
-real_double > 1.0 and real_double < 2.0 and
-real_decimal > 1.0 and real_decimal < 2.0 and
-utiny = 1 and
-ushort = 1 and
-umedium = 1 and
-ulong = 1 and
-ulonglong = 1 and
-/* bits = b'001' and */
-options = 'one' and
-flags = 'one' and
-date_field = '1901-01-01' and
-year_field = '1901' and
-time_field = '01:01:01' and
-date_time = '1901-01-01 01:01:01'
-order by auto;
-
---replace_column 9 #
-explain
-select auto from t1 where
-string != "aaaa" and
-vstring != "aaaa" and
-bin != 0xAAAA and
-vbin != 0xAAAA and
-tiny != -1 and
-short != -1 and
-medium != -1 and
-long_int != -1 and
-longlong != -1 and
-(real_float < 1.0 or real_float > 2.0) and
-(real_double < 1.0 or real_double > 2.0) and
-(real_decimal < 1.0 or real_decimal > 2.0) and
-utiny != 1 and
-ushort != 1 and
-umedium != 1 and
-ulong != 1 and
-ulonglong != 1 and
-/* bits != b'001' and */
-options != 'one' and
-flags != 'one' and
-date_field != '1901-01-01' and
-year_field != '1901' and
-time_field != '01:01:01' and
-date_time != '1901-01-01 01:01:01'
-order by auto;
-
-select auto from t1 where
-string != "aaaa" and
-vstring != "aaaa" and
-bin != 0xAAAA and
-vbin != 0xAAAA and
-tiny != -1 and
-short != -1 and
-medium != -1 and
-long_int != -1 and
-longlong != -1 and
-(real_float < 1.0 or real_float > 2.0) and
-(real_double < 1.0 or real_double > 2.0) and
-(real_decimal < 1.0 or real_decimal > 2.0) and
-utiny != 1 and
-ushort != 1 and
-umedium != 1 and
-ulong != 1 and
-ulonglong != 1 and
-/* bits != b'001' and */
-options != 'one' and
-flags != 'one' and
-date_field != '1901-01-01' and
-year_field != '1901' and
-time_field != '01:01:01' and
-date_time != '1901-01-01 01:01:01'
-order by auto;
-
---replace_column 9 #
-explain
-select auto from t1 where
-string > "aaaa" and
-vstring > "aaaa" and
-bin > 0xAAAA and
-vbin > 0xAAAA and
-tiny < -1 and
-short < -1 and
-medium < -1 and
-long_int < -1 and
-longlong < -1 and
-real_float > 1.1 and
-real_double > 1.1 and
-real_decimal > 1.1 and
-utiny > 1 and
-ushort > 1 and
-umedium > 1 and
-ulong > 1 and
-ulonglong > 1 and
-/* bits > b'001' and */
-(options = 'two' or options = 'three' or options = 'four') and
-(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and
-date_field > '1901-01-01' and
-year_field > '1901' and
-time_field > '01:01:01' and
-date_time > '1901-01-01 01:01:01'
-order by auto;
-
-select auto from t1 where
-string > "aaaa" and
-vstring > "aaaa" and
-bin > 0xAAAA and
-vbin > 0xAAAA and
-tiny < -1 and
-short < -1 and
-medium < -1 and
-long_int < -1 and
-longlong < -1 and
-real_float > 1.1 and
-real_double > 1.1 and
-real_decimal > 1.1 and
-utiny > 1 and
-ushort > 1 and
-umedium > 1 and
-ulong > 1 and
-ulonglong > 1 and
-/* bits > b'001' and */
-(options = 'two' or options = 'three' or options = 'four') and
-(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and
-date_field > '1901-01-01' and
-year_field > '1901' and
-time_field > '01:01:01' and
-date_time > '1901-01-01 01:01:01'
-order by auto;
-
---replace_column 9 #
-explain
-select auto from t1 where
-string >= "aaaa" and
-vstring >= "aaaa" and
-bin >= 0xAAAA and
-vbin >= 0xAAAA and
-tiny <= -1 and
-short <= -1 and
-medium <= -1 and
-long_int <= -1 and
-longlong <= -1 and
-real_float >= 1.0 and
-real_double >= 1.0 and
-real_decimal >= 1.0 and
-utiny >= 1 and
-ushort >= 1 and
-umedium >= 1 and
-ulong >= 1 and
-ulonglong >= 1 and
-/* bits >= b'001' and */
-(options = 'one' or options = 'two' or options = 'three' or options = 'four') and
-(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and
-date_field >= '1901-01-01' and
-year_field >= '1901' and
-time_field >= '01:01:01' and
-date_time >= '1901-01-01 01:01:01'
-order by auto;
-
-select auto from t1 where
-string >= "aaaa" and
-vstring >= "aaaa" and
-bin >= 0xAAAA and
-vbin >= 0xAAAA and
-tiny <= -1 and
-short <= -1 and
-medium <= -1 and
-long_int <= -1 and
-longlong <= -1 and
-real_float >= 1.0 and
-real_double >= 1.0 and
-real_decimal >= 1.0 and
-utiny >= 1 and
-ushort >= 1 and
-umedium >= 1 and
-ulong >= 1 and
-ulonglong >= 1 and
-/* bits >= b'001' and */
-(options = 'one' or options = 'two' or options = 'three' or options = 'four') and
-(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and
-date_field >= '1901-01-01' and
-year_field >= '1901' and
-time_field >= '01:01:01' and
-date_time >= '1901-01-01 01:01:01'
-order by auto;
-
---replace_column 9 #
-explain
-select auto from t1 where
-string < "dddd" and
-vstring < "dddd" and
-bin < 0xDDDD and
-vbin < 0xDDDD and
-tiny > -4 and
-short > -4 and
-medium > -4 and
-long_int > -4 and
-longlong > -4 and
-real_float < 4.4 and
-real_double < 4.4 and
-real_decimal < 4.4 and
-utiny < 4 and
-ushort < 4 and
-umedium < 4 and
-ulong < 4 and
-ulonglong < 4 and
-/* bits < b'100' and */
-(options = 'one' or options = 'two' or options = 'three') and
-(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and
-date_field < '1904-01-01' and
-year_field < '1904' and
-time_field < '04:04:04' and
-date_time < '1904-04-04 04:04:04'
-order by auto;
-
-select auto from t1 where
-string < "dddd" and
-vstring < "dddd" and
-bin < 0xDDDD and
-vbin < 0xDDDD and
-tiny > -4 and
-short > -4 and
-medium > -4 and
-long_int > -4 and
-longlong > -4 and
-real_float < 4.4 and
-real_double < 4.4 and
-real_decimal < 4.4 and
-utiny < 4 and
-ushort < 4 and
-umedium < 4 and
-ulong < 4 and
-ulonglong < 4 and
-/* bits < b'100' and */
-(options = 'one' or options = 'two' or options = 'three') and
-(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and
-date_field < '1904-01-01' and
-year_field < '1904' and
-time_field < '04:04:04' and
-date_time < '1904-04-04 04:04:04'
-order by auto;
-
---replace_column 9 #
-explain
-select auto from t1 where
-string <= "dddd" and
-vstring <= "dddd" and
-bin <= 0xDDDD and
-vbin <= 0xDDDD and
-tiny >= -4 and
-short >= -4 and
-medium >= -4 and
-long_int >= -4 and
-longlong >= -4 and
-real_float <= 4.5 and
-real_double <= 4.5 and
-real_decimal <= 4.5 and
-utiny <= 4 - 1 + 1 and /* Checking function composition */
-ushort <= 4 and
-umedium <= 4 and
-ulong <= 4 and
-ulonglong <= 4 and
-/* bits <= b'100' and */
-(options = 'one' or options = 'two' or options = 'three' or options = 'four') and
-(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and
-date_field <= '1904-04-04' and
-year_field <= '1904' and
-time_field <= '04:04:04' and
-date_time <= '1904-04-04 04:04:04'
-order by auto;
-
-select auto from t1 where
-string <= "dddd" and
-vstring <= "dddd" and
-bin <= 0xDDDD and
-vbin <= 0xDDDD and
-tiny >= -4 and
-short >= -4 and
-medium >= -4 and
-long_int >= -4 and
-longlong >= -4 and
-real_float <= 4.5 and
-real_double <= 4.5 and
-real_decimal <= 4.5 and
-utiny <= 4 - 1 + 1 and /* Checking function composition */
-ushort <= 4 and
-umedium <= 4 and
-ulong <= 4 and
-ulonglong <= 4 and
-/* bits <= b'100' and */
-(options = 'one' or options = 'two' or options = 'three' or options = 'four') and
-(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and
-date_field <= '1904-04-04' and
-year_field <= '1904' and
-time_field <= '04:04:04' and
-date_time <= '1904-04-04 04:04:04'
-order by auto;
-
-# Test index scan with filter
-create index medium_index on t1(medium);
-
-# Test all types and compare operators
---replace_column 9 #
-explain
-select auto from t1 where
-string = "aaaa" and
-vstring = "aaaa" and
-bin = 0xAAAA and
-vbin = 0xAAAA and
-tiny = -1 and
-short = -1 and
-medium = -1 and
-long_int = -1 and
-longlong = -1 and
-real_float > 1.0 and real_float < 2.0 and
-real_double > 1.0 and real_double < 2.0 and
-real_decimal > 1.0 and real_decimal < 2.0 and
-utiny = 1 and
-ushort = 1 and
-umedium = 1 and
-ulong = 1 and
-ulonglong = 1 and
-/* bits = b'001' and */
-options = 'one' and
-flags = 'one' and
-date_field = '1901-01-01' and
-year_field = '1901' and
-time_field = '01:01:01' and
-date_time = '1901-01-01 01:01:01'
-order by auto;
-
-select auto from t1 where
-string = "aaaa" and
-vstring = "aaaa" and
-bin = 0xAAAA and
-vbin = 0xAAAA and
-tiny = -1 and
-short = -1 and
-medium = -1 and
-long_int = -1 and
-longlong = -1 and
-real_float > 1.0 and real_float < 2.0 and
-real_double > 1.0 and real_double < 2.0 and
-real_decimal > 1.0 and real_decimal < 2.0 and
-utiny = 1 and
-ushort = 1 and
-umedium = 1 and
-ulong = 1 and
-ulonglong = 1 and
-/* bits = b'001' and */
-options = 'one' and
-flags = 'one' and
-date_field = '1901-01-01' and
-year_field = '1901' and
-time_field = '01:01:01' and
-date_time = '1901-01-01 01:01:01'
-order by auto;
-
---replace_column 9 #
-explain
-select auto from t1 where
-string != "aaaa" and
-vstring != "aaaa" and
-bin != 0xAAAA and
-vbin != 0xAAAA and
-tiny != -1 and
-short != -1 and
-medium != -1 and
-long_int != -1 and
-longlong != -1 and
-(real_float < 1.0 or real_float > 2.0) and
-(real_double < 1.0 or real_double > 2.0) and
-(real_decimal < 1.0 or real_decimal > 2.0) and
-utiny != 1 and
-ushort != 1 and
-umedium != 1 and
-ulong != 1 and
-ulonglong != 1 and
-/* bits != b'001' and */
-options != 'one' and
-flags != 'one' and
-date_field != '1901-01-01' and
-year_field != '1901' and
-time_field != '01:01:01' and
-date_time != '1901-01-01 01:01:01'
-order by auto;
-
-select auto from t1 where
-string != "aaaa" and
-vstring != "aaaa" and
-bin != 0xAAAA and
-vbin != 0xAAAA and
-tiny != -1 and
-short != -1 and
-medium != -1 and
-long_int != -1 and
-longlong != -1 and
-(real_float < 1.0 or real_float > 2.0) and
-(real_double < 1.0 or real_double > 2.0) and
-(real_decimal < 1.0 or real_decimal > 2.0) and
-utiny != 1 and
-ushort != 1 and
-umedium != 1 and
-ulong != 1 and
-ulonglong != 1 and
-/* bits != b'001' and */
-options != 'one' and
-flags != 'one' and
-date_field != '1901-01-01' and
-year_field != '1901' and
-time_field != '01:01:01' and
-date_time != '1901-01-01 01:01:01'
-order by auto;
-
---replace_column 9 #
-explain
-select auto from t1 where
-string > "aaaa" and
-vstring > "aaaa" and
-bin > 0xAAAA and
-vbin > 0xAAAA and
-tiny < -1 and
-short < -1 and
-medium < -1 and
-long_int < -1 and
-longlong < -1 and
-real_float > 1.1 and
-real_double > 1.1 and
-real_decimal > 1.1 and
-utiny > 1 and
-ushort > 1 and
-umedium > 1 and
-ulong > 1 and
-ulonglong > 1 and
-/* bits > b'001' and */
-(options = 'two' or options = 'three' or options = 'four') and
-(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and
-date_field > '1901-01-01' and
-year_field > '1901' and
-time_field > '01:01:01' and
-date_time > '1901-01-01 01:01:01'
-order by auto;
-
-select auto from t1 where
-string > "aaaa" and
-vstring > "aaaa" and
-bin > 0xAAAA and
-vbin > 0xAAAA and
-tiny < -1 and
-short < -1 and
-medium < -1 and
-long_int < -1 and
-longlong < -1 and
-real_float > 1.1 and
-real_double > 1.1 and
-real_decimal > 1.1 and
-utiny > 1 and
-ushort > 1 and
-umedium > 1 and
-ulong > 1 and
-ulonglong > 1 and
-/* bits > b'001' and */
-(options = 'two' or options = 'three' or options = 'four') and
-(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and
-date_field > '1901-01-01' and
-year_field > '1901' and
-time_field > '01:01:01' and
-date_time > '1901-01-01 01:01:01'
-order by auto;
-
---replace_column 9 #
-explain
-select auto from t1 where
-string >= "aaaa" and
-vstring >= "aaaa" and
-bin >= 0xAAAA and
-vbin >= 0xAAAA and
-tiny <= -1 and
-short <= -1 and
-medium <= -1 and
-long_int <= -1 and
-longlong <= -1 and
-real_float >= 1.0 and
-real_double >= 1.0 and
-real_decimal >= 1.0 and
-utiny >= 1 and
-ushort >= 1 and
-umedium >= 1 and
-ulong >= 1 and
-ulonglong >= 1 and
-/* bits >= b'001' and */
-(options = 'one' or options = 'two' or options = 'three' or options = 'four') and
-(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and
-date_field >= '1901-01-01' and
-year_field >= '1901' and
-time_field >= '01:01:01' and
-date_time >= '1901-01-01 01:01:01'
-order by auto;
-
-select auto from t1 where
-string >= "aaaa" and
-vstring >= "aaaa" and
-bin >= 0xAAAA and
-vbin >= 0xAAAA and
-tiny <= -1 and
-short <= -1 and
-medium <= -1 and
-long_int <= -1 and
-longlong <= -1 and
-real_float >= 1.0 and
-real_double >= 1.0 and
-real_decimal >= 1.0 and
-utiny >= 1 and
-ushort >= 1 and
-umedium >= 1 and
-ulong >= 1 and
-ulonglong >= 1 and
-/* bits >= b'001' and */
-(options = 'one' or options = 'two' or options = 'three' or options = 'four') and
-(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and
-date_field >= '1901-01-01' and
-year_field >= '1901' and
-time_field >= '01:01:01' and
-date_time >= '1901-01-01 01:01:01'
-order by auto;
-
---replace_column 9 #
-explain
-select auto from t1 where
-string < "dddd" and
-vstring < "dddd" and
-bin < 0xDDDD and
-vbin < 0xDDDD and
-tiny > -4 and
-short > -4 and
-medium > -4 and
-long_int > -4 and
-longlong > -4 and
-real_float < 4.4 and
-real_double < 4.4 and
-real_decimal < 4.4 and
-utiny < 4 and
-ushort < 4 and
-umedium < 4 and
-ulong < 4 and
-ulonglong < 4 and
-/* bits < b'100' and */
-(options = 'one' or options = 'two' or options = 'three') and
-(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and
-date_field < '1904-01-01' and
-year_field < '1904' and
-time_field < '04:04:04' and
-date_time < '1904-04-04 04:04:04'
-order by auto;
-
-select auto from t1 where
-string < "dddd" and
-vstring < "dddd" and
-bin < 0xDDDD and
-vbin < 0xDDDD and
-tiny > -4 and
-short > -4 and
-medium > -4 and
-long_int > -4 and
-longlong > -4 and
-real_float < 4.4 and
-real_double < 4.4 and
-real_decimal < 4.4 and
-utiny < 4 and
-ushort < 4 and
-umedium < 4 and
-ulong < 4 and
-ulonglong < 4 and
-/* bits < b'100' and */
-(options = 'one' or options = 'two' or options = 'three') and
-(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and
-date_field < '1904-01-01' and
-year_field < '1904' and
-time_field < '04:04:04' and
-date_time < '1904-04-04 04:04:04'
-order by auto;
-
---replace_column 9 #
-explain
-select auto from t1 where
-string <= "dddd" and
-vstring <= "dddd" and
-bin <= 0xDDDD and
-vbin <= 0xDDDD and
-tiny >= -4 and
-short >= -4 and
-medium >= -4 and
-long_int >= -4 and
-longlong >= -4 and
-real_float <= 4.5 and
-real_double <= 4.5 and
-real_decimal <= 4.5 and
-utiny <= 4 - 1 + 1 and /* Checking function composition */
-ushort <= 4 and
-umedium <= 4 and
-ulong <= 4 and
-ulonglong <= 4 and
-/* bits <= b'100' and */
-(options = 'one' or options = 'two' or options = 'three' or options = 'four') and
-(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and
-date_field <= '1904-04-04' and
-year_field <= '1904' and
-time_field <= '04:04:04' and
-date_time <= '1904-04-04 04:04:04'
-order by auto;
-
-select auto from t1 where
-string <= "dddd" and
-vstring <= "dddd" and
-bin <= 0xDDDD and
-vbin <= 0xDDDD and
-tiny >= -4 and
-short >= -4 and
-medium >= -4 and
-long_int >= -4 and
-longlong >= -4 and
-real_float <= 4.5 and
-real_double <= 4.5 and
-real_decimal <= 4.5 and
-utiny <= 4 - 1 + 1 and /* Checking function composition */
-ushort <= 4 and
-umedium <= 4 and
-ulong <= 4 and
-ulonglong <= 4 and
-/* bits <= b'100' and */
-(options = 'one' or options = 'two' or options = 'three' or options = 'four') and
-(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and
-date_field <= '1904-04-04' and
-year_field <= '1904' and
-time_field <= '04:04:04' and
-date_time <= '1904-04-04 04:04:04'
-order by auto;
-
-# Test LIKE/NOT LIKE
---replace_column 9 #
-explain
-select auto from t1 where
-string like "b%" and
-vstring like "b%" and
-bin like concat(0xBB, '%') and
-vbin like concat(0xBB, '%')
-order by auto;
-
-select auto from t1 where
-string like "b%" and
-vstring like "b%" and
-bin like concat(0xBB, '%') and
-vbin like concat(0xBB, '%')
-order by auto;
-
---replace_column 9 #
-explain
-select auto from t1 where
-string not like "b%" and
-vstring not like "b%" and
-bin not like concat(0xBB, '%') and
-vbin not like concat(0xBB, '%')
-order by auto;
-
-select auto from t1 where
-string not like "b%" and
-vstring not like "b%" and
-bin not like concat(0xBB, '%') and
-vbin not like concat(0xBB, '%')
-order by auto;
-
-# BETWEEN
---replace_column 9 #
-explain
-select auto from t1 where
-(string between "aaaa" and "cccc") and
-(vstring between "aaaa" and "cccc") and
-(bin between 0xAAAA and 0xCCCC) and
-(vbin between 0xAAAA and 0xCCCC) and
-(tiny between -3 and -1) and
-(short between -3 and -1) and
-(medium between -3 and -1) and
-(long_int between -3 and -1) and
-(longlong between -3 and -1) and
-(utiny between 1 and 3) and
-(ushort between 1 and 3) and
-(umedium between 1 and 3) and
-(ulong between 1 and 3) and
-(ulonglong between 1 and 3) and
-/* (bits between b'001' and b'011') and */
-(options between 'one' and 'three') and
-(flags between 'one' and 'one,two,three') and
-(date_field between '1901-01-01' and '1903-03-03') and
-(year_field between '1901' and '1903') and
-(time_field between '01:01:01' and '03:03:03') and
-(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03')
-order by auto;
-
-select auto from t1 where
-(string between "aaaa" and "cccc") and
-(vstring between "aaaa" and "cccc") and
-(bin between 0xAAAA and 0xCCCC) and
-(vbin between 0xAAAA and 0xCCCC) and
-(tiny between -3 and -1) and
-(short between -3 and -1) and
-(medium between -3 and -1) and
-(long_int between -3 and -1) and
-(longlong between -3 and -1) and
-(utiny between 1 and 3) and
-(ushort between 1 and 3) and
-(umedium between 1 and 3) and
-(ulong between 1 and 3) and
-(ulonglong between 1 and 3) and
-/* (bits between b'001' and b'011') and */
-(options between 'one' and 'three') and
-(flags between 'one' and 'one,two,three') and
-(date_field between '1901-01-01' and '1903-03-03') and
-(year_field between '1901' and '1903') and
-(time_field between '01:01:01' and '03:03:03') and
-(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03')
-order by auto;
-
---replace_column 9 #
-explain
-select auto from t1 where
-("aaaa" between string and string) and
-("aaaa" between vstring and vstring) and
-(0xAAAA between bin and bin) and
-(0xAAAA between vbin and vbin) and
-(-1 between tiny and tiny) and
-(-1 between short and short) and
-(-1 between medium and medium) and
-(-1 between long_int and long_int) and
-(-1 between longlong and longlong) and
-(1 between utiny and utiny) and
-(1 between ushort and ushort) and
-(1 between umedium and umedium) and
-(1 between ulong and ulong) and
-(1 between ulonglong and ulonglong) and
-/* (b'001' between bits and bits) and */
-('one' between options and options) and
-('one' between flags and flags) and
-('1901-01-01' between date_field and date_field) and
-('1901' between year_field and year_field) and
-('01:01:01' between time_field and time_field) and
-('1901-01-01 01:01:01' between date_time and date_time)
-order by auto;
-
-select auto from t1 where
-("aaaa" between string and string) and
-("aaaa" between vstring and vstring) and
-(0xAAAA between bin and bin) and
-(0xAAAA between vbin and vbin) and
-(-1 between tiny and tiny) and
-(-1 between short and short) and
-(-1 between medium and medium) and
-(-1 between long_int and long_int) and
-(-1 between longlong and longlong) and
-(1 between utiny and utiny) and
-(1 between ushort and ushort) and
-(1 between umedium and umedium) and
-(1 between ulong and ulong) and
-(1 between ulonglong and ulonglong) and
-/* (b'001' between bits and bits) and */
-('one' between options and options) and
-('one' between flags and flags) and
-('1901-01-01' between date_field and date_field) and
-('1901' between year_field and year_field) and
-('01:01:01' between time_field and time_field) and
-('1901-01-01 01:01:01' between date_time and date_time)
-order by auto;
-
-# NOT BETWEEN
---replace_column 9 #
-explain
-select auto from t1 where
-(string not between "aaaa" and "cccc") and
-(vstring not between "aaaa" and "cccc") and
-(bin not between 0xAAAA and 0xCCCC) and
-(vbin not between 0xAAAA and 0xCCCC) and
-(tiny not between -3 and -1) and
-(short not between -3 and -1) and
-(medium not between -3 and -1) and
-(long_int not between -3 and -1) and
-(longlong not between -3 and -1) and
-(utiny not between 1 and 3) and
-(ushort not between 1 and 3) and
-(umedium not between 1 and 3) and
-(ulong not between 1 and 3) and
-(ulonglong not between 1 and 3) and
-/* (bits not between b'001' and b'011') and */
-(options not between 'one' and 'three') and
-(flags not between 'one' and 'one,two,three') and
-(date_field not between '1901-01-01' and '1903-03-03') and
-(year_field not between '1901' and '1903') and
-(time_field not between '01:01:01' and '03:03:03') and
-(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03')
-order by auto;
-
-select auto from t1 where
-(string not between "aaaa" and "cccc") and
-(vstring not between "aaaa" and "cccc") and
-(bin not between 0xAAAA and 0xCCCC) and
-(vbin not between 0xAAAA and 0xCCCC) and
-(tiny not between -3 and -1) and
-(short not between -3 and -1) and
-(medium not between -3 and -1) and
-(long_int not between -3 and -1) and
-(longlong not between -3 and -1) and
-(utiny not between 1 and 3) and
-(ushort not between 1 and 3) and
-(umedium not between 1 and 3) and
-(ulong not between 1 and 3) and
-(ulonglong not between 1 and 3) and
-/* (bits not between b'001' and b'011') and */
-(options not between 'one' and 'three') and
-(flags not between 'one' and 'one,two,three') and
-(date_field not between '1901-01-01' and '1903-03-03') and
-(year_field not between '1901' and '1903') and
-(time_field not between '01:01:01' and '03:03:03') and
-(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03')
-order by auto;
-
---replace_column 9 #
-explain
-select auto from t1 where
-("aaaa" not between string and string) and
-("aaaa" not between vstring and vstring) and
-(0xAAAA not between bin and bin) and
-(0xAAAA not between vbin and vbin) and
-(-1 not between tiny and tiny) and
-(-1 not between short and short) and
-(-1 not between medium and medium) and
-(-1 not between long_int and long_int) and
-(-1 not between longlong and longlong) and
-(1 not between utiny and utiny) and
-(1 not between ushort and ushort) and
-(1 not between umedium and umedium) and
-(1 not between ulong and ulong) and
-(1 not between ulonglong and ulonglong) and
-/* (b'001' not between bits and bits) and */
-('one' not between options and options) and
-('one' not between flags and flags) and
-('1901-01-01' not between date_field and date_field) and
-('1901' not between year_field and year_field) and
-('01:01:01' not between time_field and time_field) and
-('1901-01-01 01:01:01' not between date_time and date_time)
-order by auto;
-
-select auto from t1 where
-("aaaa" not between string and string) and
-("aaaa" not between vstring and vstring) and
-(0xAAAA not between bin and bin) and
-(0xAAAA not between vbin and vbin) and
-(-1 not between tiny and tiny) and
-(-1 not between short and short) and
-(-1 not between medium and medium) and
-(-1 not between long_int and long_int) and
-(-1 not between longlong and longlong) and
-(1 not between utiny and utiny) and
-(1 not between ushort and ushort) and
-(1 not between umedium and umedium) and
-(1 not between ulong and ulong) and
-(1 not between ulonglong and ulonglong) and
-/* (b'001' not between bits and bits) and */
-('one' not between options and options) and
-('one' not between flags and flags) and
-('1901-01-01' not between date_field and date_field) and
-('1901' not between year_field and year_field) and
-('01:01:01' not between time_field and time_field) and
-('1901-01-01 01:01:01' not between date_time and date_time)
-order by auto;
-
-# IN
---replace_column 9 #
-explain
-select auto from t1 where
-string in("aaaa","cccc") and
-vstring in("aaaa","cccc") and
-bin in(0xAAAA,0xCCCC) and
-vbin in(0xAAAA,0xCCCC) and
-tiny in(-1,-3) and
-short in(-1,-3) and
-medium in(-1,-3) and
-long_int in(-1,-3) and
-longlong in(-1,-3) and
-utiny in(1,3) and
-ushort in(1,3) and
-umedium in(1,3) and
-ulong in(1,3) and
-ulonglong in(1,3) and
-/* bits in(b'001',b'011') and */
-options in('one','three') and
-flags in('one','one,two,three') and
-date_field in('1901-01-01','1903-03-03') and
-year_field in('1901','1903') and
-time_field in('01:01:01','03:03:03') and
-date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03')
-order by auto;
-
-select auto from t1 where
-string in("aaaa","cccc") and
-vstring in("aaaa","cccc") and
-bin in(0xAAAA,0xCCCC) and
-vbin in(0xAAAA,0xCCCC) and
-tiny in(-1,-3) and
-short in(-1,-3) and
-medium in(-1,-3) and
-long_int in(-1,-3) and
-longlong in(-1,-3) and
-utiny in(1,3) and
-ushort in(1,3) and
-umedium in(1,3) and
-ulong in(1,3) and
-ulonglong in(1,3) and
-/* bits in(b'001',b'011') and */
-options in('one','three') and
-flags in('one','one,two,three') and
-date_field in('1901-01-01','1903-03-03') and
-year_field in('1901','1903') and
-time_field in('01:01:01','03:03:03') and
-date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03')
-order by auto;
-
---replace_column 9 #
-explain
-select auto from t1 where
-"aaaa" in(string) and
-"aaaa" in(vstring) and
-0xAAAA in(bin) and
-0xAAAA in(vbin) and
-(-1 in(tiny)) and
-(-1 in (short)) and
-(-1 in(medium)) and
-(-1 in(long_int)) and
-(-1 in(longlong)) and
-1 in(utiny) and
-1 in(ushort) and
-1 in(umedium) and
-1 in(ulong) and
-1 in(ulonglong) and
-/* b'001' in(bits) and */
-'one' in(options) and
-'one' in(flags) and
-'1901-01-01' in(date_field) and
-'1901' in(year_field) and
-'01:01:01' in(time_field) and
-'1901-01-01 01:01:01' in(date_time)
-order by auto;
-
-select auto from t1 where
-"aaaa" in(string) and
-"aaaa" in(vstring) and
-0xAAAA in(bin) and
-0xAAAA in(vbin) and
-(-1 in(tiny)) and
-(-1 in (short)) and
-(-1 in(medium)) and
-(-1 in(long_int)) and
-(-1 in(longlong)) and
-1 in(utiny) and
-1 in(ushort) and
-1 in(umedium) and
-1 in(ulong) and
-1 in(ulonglong) and
-/* b'001' in(bits) and */
-'one' in(options) and
-'one' in(flags) and
-'1901-01-01' in(date_field) and
-'1901' in(year_field) and
-'01:01:01' in(time_field) and
-'1901-01-01 01:01:01' in(date_time)
-order by auto;
-
-# NOT IN
---replace_column 9 #
-explain
-select auto from t1 where
-string not in("aaaa","cccc") and
-vstring not in("aaaa","cccc") and
-bin not in(0xAAAA,0xCCCC) and
-vbin not in(0xAAAA,0xCCCC) and
-tiny not in(-1,-3) and
-short not in(-1,-3) and
-medium not in(-1,-3) and
-long_int not in(-1,-3) and
-longlong not in(-1,-3) and
-utiny not in(1,3) and
-ushort not in(1,3) and
-umedium not in(1,3) and
-ulong not in(1,3) and
-ulonglong not in(1,3) and
-/* bits not in(b'001',b'011') and */
-options not in('one','three') and
-flags not in('one','one,two,three') and
-date_field not in('1901-01-01','1903-03-03') and
-year_field not in('1901','1903') and
-time_field not in('01:01:01','03:03:03') and
-date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03')
-order by auto;
-
-select auto from t1 where
-string not in("aaaa","cccc") and
-vstring not in("aaaa","cccc") and
-bin not in(0xAAAA,0xCCCC) and
-vbin not in(0xAAAA,0xCCCC) and
-tiny not in(-1,-3) and
-short not in(-1,-3) and
-medium not in(-1,-3) and
-long_int not in(-1,-3) and
-longlong not in(-1,-3) and
-utiny not in(1,3) and
-ushort not in(1,3) and
-umedium not in(1,3) and
-ulong not in(1,3) and
-ulonglong not in(1,3) and
-/* bits not in(b'001',b'011') and */
-options not in('one','three') and
-flags not in('one','one,two,three') and
-date_field not in('1901-01-01','1903-03-03') and
-year_field not in('1901','1903') and
-time_field not in('01:01:01','03:03:03') and
-date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03')
-order by auto;
-
---replace_column 9 #
-explain
-select auto from t1 where
-"aaaa" not in(string) and
-"aaaa" not in(vstring) and
-0xAAAA not in(bin) and
-0xAAAA not in(vbin) and
-(-1 not in(tiny)) and
-(-1 not in(short)) and
-(-1 not in(medium)) and
-(-1 not in(long_int)) and
-(-1 not in(longlong)) and
-1 not in(utiny) and
-1 not in(ushort) and
-1 not in(umedium) and
-1 not in(ulong) and
-1 not in(ulonglong) and
-/* b'001' not in(bits) and */
-'one' not in(options) and
-'one' not in(flags) and
-'1901-01-01' not in(date_field) and
-'1901' not in(year_field) and
-'01:01:01' not in(time_field) and
-'1901-01-01 01:01:01' not in(date_time)
-order by auto;
-
-select auto from t1 where
-"aaaa" not in(string) and
-"aaaa" not in(vstring) and
-0xAAAA not in(bin) and
-0xAAAA not in(vbin) and
-(-1 not in(tiny)) and
-(-1 not in(short)) and
-(-1 not in(medium)) and
-(-1 not in(long_int)) and
-(-1 not in(longlong)) and
-1 not in(utiny) and
-1 not in(ushort) and
-1 not in(umedium) and
-1 not in(ulong) and
-1 not in(ulonglong) and
-/* b'001' not in(bits) and */
-'one' not in(options) and
-'one' not in(flags) and
-'1901-01-01' not in(date_field) and
-'1901' not in(year_field) and
-'01:01:01' not in(time_field) and
-'1901-01-01 01:01:01' not in(date_time)
-order by auto;
-
-# Update test
-update t1
-set medium = 17
-where
-string = "aaaa" and
-vstring = "aaaa" and
-bin = 0xAAAA and
-vbin = 0xAAAA and
-tiny = -1 and
-short = -1 and
-medium = -1 and
-long_int = -1 and
-longlong = -1 and
-real_float > 1.0 and real_float < 2.0 and
-real_double > 1.0 and real_double < 2.0 and
-real_decimal > 1.0 and real_decimal < 2.0 and
-utiny = 1 and
-ushort = 1 and
-umedium = 1 and
-ulong = 1 and
-ulonglong = 1 and
-/* bits = b'001' and */
-options = 'one' and
-flags = 'one' and
-date_field = '1901-01-01' and
-year_field = '1901' and
-time_field = '01:01:01' and
-date_time = '1901-01-01 01:01:01';
-
-# Delete test
-delete from t1
-where
-string = "aaaa" and
-vstring = "aaaa" and
-bin = 0xAAAA and
-vbin = 0xAAAA and
-tiny = -1 and
-short = -1 and
-medium = 17 and
-long_int = -1 and
-longlong = -1 and
-real_float > 1.0 and real_float < 2.0 and
-real_double > 1.0 and real_double < 2.0 and
-real_decimal > 1.0 and real_decimal < 2.0 and
-utiny = 1 and
-ushort = 1 and
-umedium = 1 and
-ulong = 1 and
-ulonglong = 1 and
-/* bits = b'001' and */
-options = 'one' and
-flags = 'one' and
-date_field = '1901-01-01' and
-year_field = '1901' and
-time_field = '01:01:01' and
-date_time = '1901-01-01 01:01:01';
-
-select count(*) from t1;
-
-# Various tests
---replace_column 9 #
-explain
-select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1;
-select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1;
-
---replace_column 9 #
-explain
-select * from t2 where attr3 is not null and attr1 > 2 order by pk1;
-select * from t2 where attr3 is not null and attr1 > 2 order by pk1;
-
---replace_column 9 #
-explain
-select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1;
-select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1;
-
---replace_column 9 #
-explain
-select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1;
-select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1;
-
---replace_column 9 #
-explain
-select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1;
-select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1;
-
---replace_column 9 #
-explain
-select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1;
-select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1;
-
-# Some tests that are currently not supported and should not push condition
---replace_column 9 #
-explain
-select auto from t1 where string = "aaaa" collate latin1_general_ci order by auto;
---replace_column 9 #
-explain
-select * from t2 where (attr1 < 2) = (attr2 < 2) order by pk1;
---replace_column 9 #
-explain
-select * from t3 left join t4 on t4.attr2 = t3.attr2 where t4.attr1 > 1 and t4.attr3 < 5 or t4.attr1 is null order by t4.pk1;
-
-# bug#15722
-create table t5 (a int primary key auto_increment, b tinytext not null)
-engine = ndb;
-insert into t5 (b) values ('jonas'), ('jensing'), ('johan');
-set optimizer_switch = "engine_condition_pushdown=off";
-select * from t5 where b like '%jo%' order by a;
-set optimizer_switch = "engine_condition_pushdown=on";
---replace_column 9 #
-explain select * from t5 where b like '%jo%';
-select * from t5 where b like '%jo%' order by a;
-
-# bug#21056 ndb pushdown equal/setValue error on datetime
-set optimizer_switch = "engine_condition_pushdown=off";
-select auto from t1 where date_time like '1902-02-02 %' order by auto;
-select auto from t1 where date_time not like '1902-02-02 %' order by auto;
-set optimizer_switch = "engine_condition_pushdown=on";
---replace_column 9 #
-explain select auto from t1 where date_time like '1902-02-02 %';
-select auto from t1 where date_time like '1902-02-02 %' order by auto;
---replace_column 9 #
-explain select auto from t1 where date_time not like '1902-02-02 %';
-select auto from t1 where date_time not like '1902-02-02 %' order by auto;
-
-# bug#17421 -1
-drop table t1;
-create table t1 (a int, b varchar(3), primary key using hash(a))
-engine=ndb;
-insert into t1 values (1,'a'), (2,'ab'), (3,'abc');
-# in TUP the constants 'ab' 'abc' were expected in varchar format
-# "like" returned error which became "false"
-# scan filter negates "or" which exposes the bug
-set optimizer_switch = "engine_condition_pushdown=off";
-select * from t1 where b like 'ab';
-select * from t1 where b like 'ab' or b like 'ab';
-select * from t1 where b like 'abc';
-select * from t1 where b like 'abc' or b like 'abc';
-set optimizer_switch = "engine_condition_pushdown=on";
-select * from t1 where b like 'ab';
-select * from t1 where b like 'ab' or b like 'ab';
-select * from t1 where b like 'abc';
-select * from t1 where b like 'abc' or b like 'abc';
-
-# bug#17421 -2
-drop table t1;
-create table t1 (a int, b char(3), primary key using hash(a))
-engine=ndb;
-insert into t1 values (1,'a'), (2,'ab'), (3,'abc');
-# test that incorrect MySQL behaviour is preserved
-# 'ab ' LIKE 'ab' is true in MySQL
-set optimizer_switch = "engine_condition_pushdown=off";
-select * from t1 where b like 'ab';
-select * from t1 where b like 'ab' or b like 'ab';
-select * from t1 where b like 'abc';
-select * from t1 where b like 'abc' or b like 'abc';
-set optimizer_switch = "engine_condition_pushdown=on";
-select * from t1 where b like 'ab';
-select * from t1 where b like 'ab' or b like 'ab';
-select * from t1 where b like 'abc';
-select * from t1 where b like 'abc' or b like 'abc';
-
-# bug#20406 (maybe same as bug#17421 -1, not seen on 32-bit x86)
-drop table t1;
-create table t1 ( fname varchar(255), lname varchar(255) )
-engine=ndbcluster;
-insert into t1 values ("Young","Foo");
-
-set optimizer_switch = "engine_condition_pushdown=off";
-SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%');
-set optimizer_switch = "engine_condition_pushdown=on";
-SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%');
-
-# make sure optimizer does not do some crazy shortcut
-insert into t1 values ("aaa", "aaa");
-insert into t1 values ("bbb", "bbb");
-insert into t1 values ("ccc", "ccc");
-insert into t1 values ("ddd", "ddd");
-
-set optimizer_switch = "engine_condition_pushdown=off";
-SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%');
-set optimizer_switch = "engine_condition_pushdown=on";
-SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%');
-
-# bug#29390 (scan filter is too large, discarded)
-# bug#34107 (previous limit was too large for TUP)
-
-drop table t1;
-
-create table t1 (a int, b int, c int, d int, primary key using hash(a))
- engine=ndbcluster;
-
-insert into t1 values (10,1,100,0+0x1111);
-insert into t1 values (20,2,200,0+0x2222);
-insert into t1 values (30,3,300,0+0x3333);
-insert into t1 values (40,4,400,0+0x4444);
-insert into t1 values (50,5,500,0+0x5555);
-
-set optimizer_switch = "engine_condition_pushdown=on";
-
-select a,b,d from t1
- where b in (0,1,2,5)
- order by b;
-
---echo -- big filter just below limit
---disable_query_log
-select a,b,d from t1
- where b in (
-0,1,2,5,0,1,2,5,0,1,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2)
- order by b;
---enable_query_log
-
---echo -- big filter just above limit
---disable_query_log
-select a,b,d from t1
- where b in (
-0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,
-0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2)
- order by b;
---enable_query_log
-
-set optimizer_switch = @old_optimizer_switch;
-DROP TABLE t1,t2,t3,t4,t5;
diff --git a/mysql-test/suite/ndb/t/ndb_config.test b/mysql-test/suite/ndb/t/ndb_config.test
deleted file mode 100644
index 08d1226953c..00000000000
--- a/mysql-test/suite/ndb/t/ndb_config.test
+++ /dev/null
@@ -1,23 +0,0 @@
--- source include/have_ndb.inc
--- source include/ndb_default_cluster.inc
--- source include/not_embedded.inc
-
---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=type,nodeid,host 2> /dev/null
---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid,host,DataMemory,IndexMemory --type=ndbd 2> /dev/null
---exec $NDB_TOOLS_DIR/ndb_config --no-defaults -r \\\n -f " " --query=nodeid,host,DataMemory,IndexMemory --type=ndbd 2> /dev/null
---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --type=ndbd --host=localhost 2> /dev/null
---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=type,nodeid,host --config-file=$MYSQL_TEST_DIR/std_data/ndb_config_config.ini 2> /dev/null
-
-# End of 4.1 tests
-
---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.jonas --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf1.cnf --query=type,nodeid,host,IndexMemory,DataMemory --mycnf 2> /dev/null
-
---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster0 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null
---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster1 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null
---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null
---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --ndb-shm --connections --query=type,nodeid1,nodeid2,group,nodeidserver --mycnf 2> /dev/null
-
-
---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=localhost --config-file=$MYSQL_TEST_DIR/std_data/ndb_config_config.ini 2> /dev/null
---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=1.2.3.4 --config-file=$MYSQL_TEST_DIR/std_data/ndb_config_config.ini 2> /dev/null
---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=127.0.0.1 --config-file=$MYSQL_TEST_DIR/std_data/ndb_config_config.ini 2> /dev/null
diff --git a/mysql-test/suite/ndb/t/ndb_config2.test b/mysql-test/suite/ndb/t/ndb_config2.test
deleted file mode 100644
index 170f1b2e5e7..00000000000
--- a/mysql-test/suite/ndb/t/ndb_config2.test
+++ /dev/null
@@ -1,7 +0,0 @@
--- source include/have_ndb.inc
--- source include/ndb_default_cluster.inc
--- source include/not_embedded.inc
-
-# Following doesn't work in all configurations (if shm is not defined)
-
---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --ndb-shm --connections --query=type,nodeid1,nodeid2,group,nodeidserver --mycnf 2> /dev/null
diff --git a/mysql-test/suite/ndb/t/ndb_cursor.test b/mysql-test/suite/ndb/t/ndb_cursor.test
deleted file mode 100644
index 406f8629cfe..00000000000
--- a/mysql-test/suite/ndb/t/ndb_cursor.test
+++ /dev/null
@@ -1,47 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-drop table if exists t1;
-drop table if exists t2;
---enable_warnings
-
-create table t1 (
- a int not null primary key,
- b int not null
-) engine=ndb;
-
-create table t2 (
- a int not null primary key,
- b int not null
-) engine=ndb;
-
-insert into t1 values (1,10), (2,20), (3,30), (4, 40);
-
-delimiter //;
-create procedure test_cursor ()
-begin
- declare done int default 0;
- declare temp_a int;
- declare temp_b int;
- declare cur1 cursor for select a,b from t1;
- declare continue handler for sqlstate '02000' set done = 1;
- open cur1;
- repeat
- fetch cur1 into temp_a, temp_b;
- if not done then
- insert into t2 values (temp_a, temp_b);
- end if;
- until done end repeat;
- close cur1;
-end;
-//
-delimiter ;//
-
-select * from t2 order by a;
-call test_cursor();
-select * from t2 order by a;
-drop procedure test_cursor;
-drop table t1,t2;
-
---echo end of 5.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_database.test b/mysql-test/suite/ndb/t/ndb_database.test
deleted file mode 100644
index 8bfdf40de88..00000000000
--- a/mysql-test/suite/ndb/t/ndb_database.test
+++ /dev/null
@@ -1,24 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-drop database if exists mysqltest;
---enable_warnings
-
-#
-# Check that all tables in a database are dropped when database is dropped
-#
-
-create database mysqltest;
-create table mysqltest.t1 (a int primary key, b int) engine=ndb;
-use mysqltest;
-show tables;
-
-drop database mysqltest;
-create database mysqltest;
-use mysqltest;
-show tables;
-
-drop database mysqltest;
-
-# End of 4.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_dd_alter.test b/mysql-test/suite/ndb/t/ndb_dd_alter.test
deleted file mode 100644
index 7635a8944da..00000000000
--- a/mysql-test/suite/ndb/t/ndb_dd_alter.test
+++ /dev/null
@@ -1,274 +0,0 @@
-##############################################################
-# Author: JBM
-# Date: 2006-01-12
-# Purpose: To test using ndb memory and disk tables together.
-##############################################################
-
-##############################################################
-# Author: Nikolay
-# Date: 2006-05-12
-# Purpose: To test using ndb memory and disk tables together.
-#
-# Select from disk into memory table
-# Select from disk into memory table
-# Create test that loads data, use mysql dump to dump data, drop table,
-# create table and load from mysql dump.
-# Use group by asc and dec; Use having; Use order by
-# ALTER Tests (Meta data testing):
-# ALTER from InnoDB to Cluster Disk Data
-# ALTER from MyISAM to Cluster Disk Data
-# ALTER from Cluster Disk Data to InnoDB
-# ALTER from Cluster Disk Data to MyISAM
-# ALTER DD Tables and add columns
-# ALTER DD Tables and add Indexes
-# ALTER DD Tables and drop columns
-#
-##############################################################
-# Author: Jonathan
-# Date 2006-08-28
-# Purpose: To take out some of the test that are already
-# Covered by other tests. Per Jonas
-# The new purpose of this test is testing "Alter"
-# Statements. Therefore the name is changed to
-# ndb_dd_alter.test
-# Removed tests include:
-# Select from disk into memory table
-# Select from disk into memory table
-# Create test that loads data, use mysql dump to dump data, drop table,
-# create table and load from mysql dump.
-# Use group by asc and dec; Use having; Use order by
-##############################################################
-
--- source include/have_ndb.inc
--- source include/have_innodb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-DROP TABLE IF EXISTS test.t1;
-DROP TABLE IF EXISTS test.t2;
---enable_warnings
-
-############ Test Setup Section #############
--- echo **** Test Setup Section ****
-################## ALTER Tests (Meta data testing) ####################
-
- CREATE LOGFILE GROUP lg
- ADD UNDOFILE './lg_group/undofile.dat'
- INITIAL_SIZE 16M
- UNDO_BUFFER_SIZE = 1M
- ENGINE=NDB;
-
- CREATE TABLESPACE ts
- ADD DATAFILE './table_space/datafile.dat'
- USE LOGFILE GROUP lg
- INITIAL_SIZE 12M
- ENGINE NDB;
-
-#### Try to ALTER from InnoDB to Cluster Disk Data
-
-CREATE TABLE test.t1 (
- a1 smallint NOT NULL,
- a2 int NOT NULL,
- a3 bigint NOT NULL,
- a4 char(10),
- a5 decimal(5,1),
- a6 time,
- a7 date,
- a8 datetime,
- a9 VARCHAR(255),
- a10 blob,
- PRIMARY KEY(a1)
-) ENGINE=InnoDB;
-
-let $1=20;
-disable_query_log;
-while ($1)
-{
- eval insert into test.t1 values($1, $1+1, $1+2000000000, "aaa$1", 34.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data");
- dec $1;
-}
-enable_query_log;
-
-SHOW CREATE TABLE test.t1;
-SELECT * FROM test.t1 ORDER BY a1;
-ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB;
-SHOW CREATE TABLE test.t1;
-# Check column storage
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST='
-SELECT * FROM test.t1 ORDER BY a1;
-DROP TABLE test.t1;
-
-#### Try to ALTER from MyISAM to Cluster Disk Data
-
-CREATE TABLE test.t1 (
- a1 smallint NOT NULL,
- a2 int NOT NULL,
- a3 bigint NOT NULL,
- a4 char(10),
- a5 decimal(5,1),
- a6 time,
- a7 date,
- a8 datetime,
- a9 VARCHAR(255),
- a10 blob,
- PRIMARY KEY(a1)
-) ENGINE=MyISAM;
-
-let $1=20;
-disable_query_log;
-while ($1)
-{
- eval insert into test.t1 values($1, $1+1, $1+2000000000, "aaa$1", 34.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data");
- dec $1;
-}
-enable_query_log;
-
-SHOW CREATE TABLE test.t1;
-SELECT * FROM test.t1 ORDER BY a1;
-ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB;
-SHOW CREATE TABLE test.t1;
-# Check column storage
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST='
-SELECT * FROM test.t1 ORDER BY a1;
-
-#### Try to ALTER from Cluster Disk Data to InnoDB
-
-ALTER TABLE test.t1 ENGINE=InnoDB;
-SHOW CREATE TABLE test.t1;
-SELECT * FROM test.t1 ORDER BY a1;
-ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB;
-SHOW CREATE TABLE test.t1;
-# Check column storage
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST='
-
-#### Try to ALTER from Cluster Disk Data to MyISAM
-
-ALTER TABLE test.t1 ENGINE=MyISAM;
-SHOW CREATE TABLE test.t1;
-DROP TABLE test.t1;
-
-#### Try to ALTER DD Tables and add columns
-
-CREATE TABLE test.t1 (a1 INT PRIMARY KEY) TABLESPACE ts STORAGE DISK ENGINE=NDB;
-
-let $1=20;
-disable_query_log;
-while ($1)
-{
- eval insert into test.t1 values($1);
- dec $1;
-}
-enable_query_log;
-
-SELECT * FROM test.t1 ORDER BY a1;
-
-SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0';
-
-ALTER TABLE test.t1 ADD a2 FLOAT, ADD a3 DOUBLE;
-
-SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0';
-
-let $1=20;
-disable_query_log;
-while ($1)
-{
- eval update test.t1 set a2 = $1+1.2345, a3 = $1+20000000.00 where a1 = $1;
- dec $1;
-}
-enable_query_log;
-
-SELECT * FROM test.t1 ORDER BY a1;
-
-ALTER TABLE test.t1 ADD a4 BIT, ADD a5 TINYINT, ADD a6 BIGINT, ADD a7 DATE, ADD a8 TIME;
-
-let $1=20;
-disable_query_log;
-while ($1)
-{
- eval update test.t1 set a4 = 0, a5 = 1, a6 = $1+23456, a7 = '2006-1-1',
- a8 = '07:04:00' where a1 = $1;
- dec $1;
-}
-enable_query_log;
-
-SELECT a1,a2,a3,hex(a4), a5,a6,a7,a8 FROM test.t1 ORDER BY a1;
-
-ALTER TABLE test.t1 ADD a9 DATETIME, ADD a10 TINYTEXT, ADD a11 MEDIUMTEXT, ADD a12 LONGTEXT, ADD a13 TEXT, ADD a14 BLOB;
-SHOW CREATE TABLE test.t1;
-# Check column storage
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST='
-
-disable_query_log;
-set @d2 = 'dd2';
-set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2);
-set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2);
-set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2);
-set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2);
-enable_query_log;
-
-let $1=20;
-disable_query_log;
-while ($1)
-{
- eval update test.t1 set a9 = '1971-5-28 16:55:03', a10 = 'abc', a11 = 'abcdefg',
- a12 = 'LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', a13 = 'Text Field',
- a14 = @d2 where a1 = $1;
- dec $1;
-}
-enable_query_log;
-
-SELECT a1, a2,a3,hex(a4),a5,a6,a7,a8,a9,a10,a11,a12,a13 FROM test.t1 ORDER BY a1;
-
-#### Try to ALTER DD Tables and add Indexes
-
-ALTER TABLE test.t1 ADD INDEX a2_i (a2), ADD INDEX a3_i (a3);
-
-SHOW CREATE TABLE test.t1;
-
-# Check column storage
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST='
-
-ALTER TABLE test.t1 DROP INDEX a2_i;
-
-SHOW CREATE TABLE test.t1;
-
-# Check column storage
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST='
-
-TRUNCATE TABLE test.t1;
-
-SHOW CREATE TABLE test.t1;
-
-# Check column storage
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST='
-
-#### Try to ALTER DD Tables and drop columns
-
-
-ALTER TABLE test.t1 DROP a14;
-ALTER TABLE test.t1 DROP a13;
-ALTER TABLE test.t1 DROP a12;
-ALTER TABLE test.t1 DROP a11;
-ALTER TABLE test.t1 DROP a10;
-ALTER TABLE test.t1 DROP a9;
-ALTER TABLE test.t1 DROP a8;
-ALTER TABLE test.t1 DROP a7;
-ALTER TABLE test.t1 DROP a6;
-ALTER TABLE test.t1 DROP PRIMARY KEY;
-
-SHOW CREATE TABLE test.t1;
-
-# Check column storage
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST='
-
-DROP TABLE test.t1;
-
- ALTER TABLESPACE ts
- DROP DATAFILE './table_space/datafile.dat'
- ENGINE NDB;
- DROP TABLESPACE ts ENGINE NDB;
- DROP LOGFILE GROUP lg ENGINE=NDB;
-
-####################### End section 4 #########################
-#End 5.1 test case
-
diff --git a/mysql-test/suite/ndb/t/ndb_dd_basic.test b/mysql-test/suite/ndb/t/ndb_dd_basic.test
deleted file mode 100644
index 0fb793e2142..00000000000
--- a/mysql-test/suite/ndb/t/ndb_dd_basic.test
+++ /dev/null
@@ -1,485 +0,0 @@
-#################################
-# Author: JO
-# Org Date: ?
-# Purpose: To test basic Cluster Disk Data
-#################################
-# Change Author: JBM
-# Change Date: 2006-01-11
-# Change: Cleanup and test rename
-#################################
-# Change Author: Guangbao Ni
-# Change Date: 2007-03-20
-# Change: Test insert data when no datafile in spacetable
-#################################
-
--- source include/have_ndb.inc
-
-#
-# Bug#30322 Server crashes on selecting from i_s.columns when cluster is running -regression
-#
---replace_column 1 #
-select count(*) from information_schema.columns;
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-# some negative tests
-CREATE LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile.dat'
-INITIAL_SIZE 16M
-UNDO_BUFFER_SIZE = 1M
-ENGINE=MYISAM;
-
-ALTER LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile02.dat'
-INITIAL_SIZE = 4M
-ENGINE=XYZ;
-
-CREATE TABLESPACE ts1
-ADD DATAFILE 'datafile.dat'
-USE LOGFILE GROUP lg1
-INITIAL_SIZE 12M;
-
-##################################
-# Basic test of disk tables for NDB
-# Start by creating a logfile group
-##################################
-
-set storage_engine=ndb;
-CREATE LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile.dat'
-INITIAL_SIZE 16M
-UNDO_BUFFER_SIZE = 1M;
-
-ALTER LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile02.dat'
-INITIAL_SIZE = 4M
-ENGINE=NDB;
-
-###################################################
-# Create a tablespace connected to the logfile group
-###################################################
-
-set storage_engine=myisam;
-CREATE TABLESPACE ts1
-ADD DATAFILE 'datafile.dat'
-USE LOGFILE GROUP lg1
-INITIAL_SIZE 12M
-ENGINE NDB;
-
-ALTER TABLESPACE ts1
-ADD DATAFILE 'datafile02.dat'
-INITIAL_SIZE = 4M
-ENGINE=NDB;
-
-########################################
-# Create a table using this tablespace
-########################################
-
-CREATE TABLE t1
-(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
-TABLESPACE ts1 STORAGE DISK
-ENGINE=NDB;
-
-SHOW CREATE TABLE t1;
-
-INSERT INTO t1 VALUES (0, 0, 0);
-SELECT * FROM t1;
-
-INSERT INTO t1 VALUES
-(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
-(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10),
-(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15),
-(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20),
-(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25),
-(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30),
-(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35),
-(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40),
-(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45),
-(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50),
-(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55),
-(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60),
-(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65),
-(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70),
-(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75),
-(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80),
-(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85),
-(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90),
-(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95),
-(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100),
-(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105),
-(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110),
-(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115),
-(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120),
-(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125),
-(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130),
-(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135),
-(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140),
-(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145),
-(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150),
-(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155),
-(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160),
-(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165),
-(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170),
-(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175),
-(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180),
-(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185),
-(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190),
-(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195),
-(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200),
-(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205),
-(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210),
-(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215),
-(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220),
-(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225),
-(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230),
-(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235),
-(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240),
-(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245),
-(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250),
-(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255),
-(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260),
-(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265),
-(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270),
-(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275),
-(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280),
-(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285),
-(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290),
-(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295),
-(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300),
-(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305),
-(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310),
-(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315),
-(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320),
-(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325),
-(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330),
-(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335),
-(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340),
-(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345),
-(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350),
-(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355),
-(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360),
-(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365),
-(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370),
-(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375),
-(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380),
-(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385),
-(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390),
-(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395),
-(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400),
-(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405),
-(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410),
-(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415),
-(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420),
-(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425),
-(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430),
-(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435),
-(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440),
-(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445),
-(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450),
-(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455),
-(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460),
-(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465),
-(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470),
-(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475),
-(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480),
-(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485),
-(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490),
-(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495),
-(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500);
-
-SELECT COUNT(*) FROM t1;
-
-####################################
-# Test error cases with size numbers
-####################################
---error ER_WRONG_SIZE_NUMBER
-CREATE LOGFILE GROUP lg2
-ADD UNDOFILE 'x.dat'
-INITIAL_SIZE 10y
-ENGINE = NDB;
-
---error ER_WRONG_SIZE_NUMBER
-CREATE LOGFILE GROUP lg2
-ADD UNDOFILE 'x.dat'
-INITIAL_SIZE 10MB
-ENGINE = NDB;
-
---error 1064
-CREATE LOGFILE GROUP lg2
-ADD UNDOFILE 'x.dat'
-INITIAL_SIZE 10 MB
-ENGINE = NDB;
-
---error 1064
-CREATE LOGFILE GROUP lg2
-ADD UNDOFILE 'x.dat'
-INITIAL_SIZE 10 M
-ENGINE = NDB;
-
---error ER_SIZE_OVERFLOW_ERROR
-CREATE LOGFILE GROUP lg2
-ADD UNDOFILE 'x.dat'
-INITIAL_SIZE 1000000000000K
-ENGINE = NDB;
-
-DROP TABLE t1;
-
-create tablespace ts2
-add datafile 'datafile2_1.dat'
-use logfile group lg1
-initial_size 12M
-engine ndb;
-
-CREATE TABLE City (
- ID int(11) NOT NULL AUTO_INCREMENT,
- Name char(35) NOT NULL,
- CountryCode char(3) NOT NULL,
- District char(20) NOT NULL,
- Population int(11) NOT NULL,
- PRIMARY KEY (ID)
-) ENGINE=ndbcluster
-tablespace ts2
-storage disk;
-
-alter tablespace ts2
-drop datafile 'datafile2_1.dat'
-engine ndb;
-
-#It will give error messages: NoDatafile in tablespace
---error ER_GET_ERRMSG
-insert
-into City (Name,CountryCode,District,Population)
-values ('BeiJing','CN','Beijing',2000);
-
---error ER_DROP_FILEGROUP_FAILED
-drop tablespace ts2
-engine ndb;
-
-drop table City;
-
-drop tablespace ts2
-engine ndb;
-
-############################
-# Test update of mm/dd part
-############################
-
-CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE = NDB;
-INSERT INTO t1 VALUES (1,'1','1'), (2,'2','2'), (3,'3','3');
-BEGIN;
-UPDATE t1 SET b = '2' WHERE a = 1;
-SELECT b FROM t1 WHERE a = 1;
-SELECT * FROM t1 WHERE a = 1;
-UPDATE t1 SET c = '2' WHERE a = 1;
-SELECT b FROM t1 WHERE a = 1;
-SELECT * FROM t1 WHERE a = 1;
-UPDATE t1 SET b = '3' WHERE a = 1;
-SELECT b FROM t1 WHERE a = 1;
-SELECT * FROM t1 WHERE a = 1;
-COMMIT;
-SELECT * FROM t1 ORDER BY 1;
-BEGIN;
-UPDATE t1 SET c = '3' WHERE a = 1;
-SELECT b FROM t1 WHERE a = 1;
-SELECT * FROM t1 WHERE a = 1;
-UPDATE t1 SET b = '4' WHERE a = 1;
-SELECT b FROM t1 WHERE a = 1;
-SELECT * FROM t1 WHERE a = 1;
-UPDATE t1 SET c = '4' WHERE a = 1;
-SELECT b FROM t1 WHERE a = 1;
-SELECT * FROM t1 WHERE a = 1;
-COMMIT;
-SELECT * FROM t1 ORDER BY 1;
-UPDATE t1 SET b = '5' WHERE a = 1;
-SELECT * FROM t1 ORDER BY 1;
-UPDATE t1 SET b = '6' WHERE b = '5';
-SELECT * FROM t1 ORDER BY 1;
-UPDATE t1 SET b = '7'WHERE c = '4';
-SELECT * FROM t1 ORDER BY 1;
-UPDATE t1 SET c = '5' WHERE a = 1;
-SELECT * FROM t1 ORDER BY 1;
-UPDATE t1 SET c = '6' WHERE b = '7';
-SELECT * FROM t1 ORDER BY 1;
-UPDATE t1 SET c = '7' WHERE c = '6';
-SELECT * FROM t1 ORDER BY 1;
-DROP TABLE t1;
-
-#####
-
-CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE NDB;
-INSERT INTO t1 VALUE (1,'1','1'), (2,'2','2'), (3,'3','3');
-BEGIN;
-UPDATE t1 SET b = '2' WHERE a = 1;
-SELECT b FROM t1 WHERE a = 1;
-SELECT * FROM t1 WHERE a = 1;
-UPDATE t1 SET c = '2' WHERE a = 1;
-SELECT b FROM t1 WHERE a = 1;
-SELECT * FROM t1 WHERE a = 1;
-UPDATE t1 SET b = '3' WHERE a = 1;
-SELECT b FROM t1 WHERE a = 1;
-SELECT * FROM t1 WHERE a = 1;
-COMMIT;
-SELECT * FROM t1 ORDER BY 1;
-BEGIN;
-UPDATE t1 SET c = '3' WHERE a = 1;
-SELECT b FROM t1 WHERE a = 1;
-SELECT * FROM t1 WHERE a = 1;
-UPDATE t1 SET b = '4' WHERE a = 1;
-SELECT b FROM t1 WHERE a = 1;
-SELECT * FROM t1 WHERE a = 1;
-UPDATE t1 SET c = '4' WHERE a = 1;
-SELECT b FROM t1 WHERE a = 1;
-SELECT * FROM t1 WHERE a = 1;
-COMMIT;
-SELECT * FROM t1 ORDER BY 1;
-UPDATE t1 SET b = '5' WHERE a = 1;
-SELECT * FROM t1 ORDER BY 1;
-UPDATE t1 SET b = '6' WHERE b = '5';
-SELECT * FROM t1 ORDER BY 1;
-UPDATE t1 SET b = '7' WHERE c = '4';
-SELECT * FROM t1 ORDER BY 1;
-UPDATE t1 SET c = '5' WHERE a = 1;
-SELECT * FROM t1 ORDER BY 1;
-UPDATE t1 SET c = '6' WHERE b = '7';
-SELECT * FROM t1 ORDER BY 1;
-UPDATE t1 SET c = '7' WHERE c = '6';
-SELECT * FROM t1 ORDER BY 1;
-
-DELETE FROM t1;
-INSERT INTO t1 VALUES (3,'1','1');
-BEGIN;
-UPDATE t1 SET b = b + 2 WHERE A = 3;
-DELETE FROM t1 WHERE A = 3;
-INSERT INTO t1 VALUES (3,'0','0');
-COMMIT;
-SELECT * from t1 ORDER BY 1;
-
-DROP TABLE t1;
-
-########################
-# Test for blobs...
-########################
-
-CREATE TABLE t1 (
- a INT NOT NULL PRIMARY KEY,
- b TEXT NOT NULL
-) TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER;
-
-# b1 length 2000+256 (blob part aligned)
-#########################################
-set @x0 = '01234567012345670123456701234567';
-set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0);
-set @b1 = 'b1';
-set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
-set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
-set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
-set @b1 = concat(@b1,@x0);
-# b2 length 20000
-##########################################
-set @b2 = 'b2';
-set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
-set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
-set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
-set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
-
-INSERT INTO t1 VALUES(1,@b1);
-INSERT INTO t1 VALUES(2,@b2);
-SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=1;
-SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=2;
-UPDATE t1 SET b=@b2 WHERE a=1;
-UPDATE t1 SET b=@b1 WHERE a=2;
-SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=1;
-SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=2;
-UPDATE t1 SET b=concat(b,b) WHERE a=1;
-UPDATE t1 SET b=concat(b,b) WHERE a=2;
-SELECT a,length(b),substr(b,1+4*9000,2) FROM t1 WHERE a=1;
-SELECT a,length(b),substr(b,1+4*900,2) FROM t1 WHERE a=2;
-DELETE FROM t1 WHERE a=1;
-DELETE FROM t1 WHERE a=2;
-SELECT COUNT(*) FROM t1;
-DROP TABLE t1;
-
-# bug#20612 INS-DEL bug (not pgman bug)
-# found via disk data assert but is not pgman or disk data related
-
-CREATE TABLE t1 (
- a int NOT NULL,
- b varchar(4000), -- must use 2 pages undo
- PRIMARY KEY using hash (a)
-)
-TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER;
-
-set autocommit = 0;
-insert into t1 values(0,'x');
-insert into t1 values(1,'x');
-insert into t1 values(2,'x');
-insert into t1 values(3,'x');
-insert into t1 values(4,'x');
-insert into t1 values(5,'x');
-insert into t1 values(6,'x');
-insert into t1 values(7,'x');
-insert into t1 values(8,'x');
-delete from t1 where a = 0;
-commit;
-
-delete from t1;
-begin;
-insert into t1 values (1, 'x');
-select * from t1;
-rollback;
-
-set autocommit = 1;
-
-
-drop table t1;
-#############################
-# Customer posted order by test case
-# Org in ndb_dd_advance.test
-#############################
-
-create table test.t1 (f1 varchar(50) primary key, f2 text,f3 int)
-TABLESPACE ts1 STORAGE DISK engine=NDB;
-insert into test.t1 (f1,f2,f3)VALUES("111111","aaaaaa",1);
-insert into test.t1 (f1,f2,f3)VALUES("222222","bbbbbb",2);
-select * from test.t1 order by f1;
-select f1,f2 from test.t1 order by f2;
-select f2 from test.t1 order by f2;
-select f1,f2 from test.t1 order by f1;
-drop table test.t1;
-
-# bug#34118 hash index trigger and do not update any disk attr
-CREATE TABLE t1 (
-id int unsigned NOT NULL,
-c1 int unsigned NOT NULL,
-c2 int DEFAULT NULL,
-PRIMARY KEY using hash (id),
-UNIQUE KEY c1 using hash (c1))
-TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster;
-
-insert into t1 values(1, 1, 3);
-insert into t1 values(2, 2, 3);
---error ER_DUP_ENTRY
-update t1 set c1 = 1 where id = 2;
-drop table t1;
-
-###################
-# Test Cleanup
-###################
-
-ALTER TABLESPACE ts1
-DROP DATAFILE 'datafile.dat'
-ENGINE = NDB;
-
-ALTER TABLESPACE ts1
-DROP DATAFILE 'datafile02.dat'
-ENGINE = NDB;
-
-DROP TABLESPACE ts1
-ENGINE = NDB;
-
-DROP LOGFILE GROUP lg1
-ENGINE =NDB;
-
-#End 5.1 test case
diff --git a/mysql-test/suite/ndb/t/ndb_dd_ddl.test b/mysql-test/suite/ndb/t/ndb_dd_ddl.test
deleted file mode 100644
index ca39be87c94..00000000000
--- a/mysql-test/suite/ndb/t/ndb_dd_ddl.test
+++ /dev/null
@@ -1,470 +0,0 @@
-#########################################
-# Author: JBM
-# Date: 2006-01-03
-# Purpose: Test the NDB engine reaction to duplicate
-# Table spaces and log groups. Also to test
-# Statement mixed case.
-############################################
-# Change Author:JBM
-# Change Date 2006-01-19
-# Change: Adding to test cases feedback from OB
-# 1) The 'duplicate' tests.
-# a) The test is using the default (test) database and is not
-# attempting to create databases (only logs, table spaces and
-# tables). Is this intentional?
-# b) What about a duplication of table name when one exists on disk and
-# you are trying to create it again in memory?
-#
-#2) 'CaSE SensiTiVE' tests
-# a) Suggest you include a test case where the case difference is in
-# the file name. I know this is not an issue for *nix systems but
-# will be when we expand to Windows and Mac. Better put it in now.
-############################################
-#
-# Jonas 2006-03-10
-# Add verification that ndb currently is limited to 1 logfile group
-#
-
-
--- source include/have_ndb.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
-DROP DATABASE IF EXISTS mysqltest;
-CREATE DATABASE mysqltest;
---enable_warnings
-
-############## Duplcate Statement Testing #########
-
---echo **** Begin Duplicate Statement Testing ****
-
-CREATE LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile.dat'
-INITIAL_SIZE 1M
-UNDO_BUFFER_SIZE = 1M
-ENGINE=NDB;
-
-# Verify that one currently can create only 1 logfile group
---error ER_CREATE_FILEGROUP_FAILED
-CREATE LOGFILE GROUP lg2
-ADD UNDOFILE 'undofile2.dat'
-INITIAL_SIZE 1M
-UNDO_BUFFER_SIZE 1M
-ENGINE NDB;
-SHOW WARNINGS;
-
---error ER_CREATE_FILEGROUP_FAILED
-CREATE LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile.dat'
-INITIAL_SIZE 1M
-UNDO_BUFFER_SIZE = 1M
-ENGINE=NDB;
-
-ALTER LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile02.dat'
-INITIAL_SIZE 1M ENGINE NDB;
-
---error ER_ALTER_FILEGROUP_FAILED
-ALTER LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile02.dat'
-INITIAL_SIZE 1M ENGINE=NDB;
-
-CREATE TABLESPACE ts1
-ADD DATAFILE 'datafile.dat'
-USE LOGFILE GROUP lg1
-INITIAL_SIZE 1M
-ENGINE NDB;
-
---error ER_CREATE_FILEGROUP_FAILED
-CREATE TABLESPACE ts1
-ADD DATAFILE 'datafile.dat'
-USE LOGFILE GROUP lg1
-INITIAL_SIZE 1M
-ENGINE NDB;
-
-
-ALTER TABLESPACE ts1
-ADD DATAFILE 'datafile2.dat'
-INITIAL_SIZE 1M
-ENGINE=NDB;
-
---error ER_ALTER_FILEGROUP_FAILED
-ALTER TABLESPACE ts1
-ADD DATAFILE 'datafile2.dat'
-INITIAL_SIZE 1M
-ENGINE=NDB;
-
-CREATE TABLE mysqltest.t1
-(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
-TABLESPACE ts1 STORAGE DISK
-ENGINE=NDB;
-
---error ER_TABLE_EXISTS_ERROR
-CREATE TABLE mysqltest.t1
-(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
-TABLESPACE ts1 STORAGE DISK
-ENGINE=NDB;
-
---error ER_TABLE_EXISTS_ERROR
-CREATE TABLE mysqltest.t1
-(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
-ENGINE=NDB;
-
-
-DROP TABLE mysqltest.t1;
-
-ALTER TABLESPACE ts1
-DROP DATAFILE 'datafile2.dat'
-ENGINE=NDB;
-
---error ER_ALTER_FILEGROUP_FAILED
-ALTER TABLESPACE ts1
-DROP DATAFILE 'datafile2.dat'
-ENGINE=NDB;
-
-ALTER TABLESPACE ts1
-DROP DATAFILE 'datafile.dat'
-ENGINE=NDB;
-
---error ER_ALTER_FILEGROUP_FAILED
-ALTER TABLESPACE ts1
-DROP DATAFILE 'datafile.dat'
-ENGINE=NDB;
-
-DROP TABLESPACE ts1
-ENGINE=NDB;
-
---error ER_DROP_FILEGROUP_FAILED
-DROP TABLESPACE ts1
-ENGINE=NDB;
-
-DROP LOGFILE GROUP lg1
-ENGINE=NDB;
-
---error ER_DROP_FILEGROUP_FAILED
-DROP LOGFILE GROUP lg1
-ENGINE=NDB;
-
-DROP DATABASE IF EXISTS mysqltest;
-
---echo **** End Duplicate Statement Testing ****
-############# End Duplicate Statments ############
---echo
-############ Begin CaSe Testing ##################
---echo **** Begin Statment CaSe Testing ****
-
-creaTE LOgfilE GrOuP lg1
-adD undoFILE 'undofile.dat'
-initiAL_siZE 1M
-UnDo_BuFfEr_SiZe = 1M
-ENGInE=NDb;
-
-altER LOgFiLE GrOUp lg1
-AdD UnDOfILe 'uNdOfiLe02.daT'
-INItIAl_SIzE 1M ENgINE nDB;
-
-CrEAtE TABLEspaCE ts1
-ADD DATAfilE 'datafile.dat'
-UsE LoGFiLE GRoUP lg1
-INITiaL_SizE 1M
-ENGiNe NDb;
-
-AlTeR tAbLeSpAcE ts1
-AdD DaTaFiLe 'dAtAfiLe2.daT'
-InItIaL_SiZe 1M
-EnGiNe=NDB;
-
-CREATE TABLE t1
-(pk1 int not null primary key, b int not null, c int not null)
-TABLEspace ts1 storAGE dISk
-ENGine nDb;
-
-DROP TABLE t1;
-
-AlteR TAblespaCE ts1
-droP DATAfile 'dAtAfiLe2.daT'
-ENGINE=NDB;
-
-ALter tablesPACE ts1
-dROp dAtAfIlE 'datafile.dat'
-ENGine=Ndb;
-
-DrOp TaBleSpAcE ts1
-engINE=ndB;
-
-DrOp lOgFiLe GrOuP lg1
-EnGiNe=nDb;
-
---echo **** End Statment CaSe Testing ****
-############ End CaSe Testing ##################
---echo
-############ Begin = and no = Testing ##########
---echo **** Begin = And No = Testing ****
-
-CREATE LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile.dat'
-INITIAL_SIZE=1M
-UNDO_BUFFER_SIZE=1M
-ENGINE=NDB;
-
-ALTER LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile02.dat'
-INITIAL_SIZE=1M
-ENGINE=NDB;
-
-CREATE TABLESPACE ts1
-ADD DATAFILE 'datafile.dat'
-USE LOGFILE GROUP lg1
-INITIAL_SIZE=1M
-ENGINE=NDB;
-
-ALTER TABLESPACE ts1
-ADD DATAFILE 'datafile2.dat'
-INITIAL_SIZE=1M
-ENGINE=NDB;
-
-CREATE TABLE t1
-(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
-TABLESPACE ts1 STORAGE DISK
-ENGINE=NDB;
-
-DROP TABLE t1;
-
-ALTER TABLESPACE ts1
-DROP DATAFILE 'datafile2.dat'
-ENGINE=NDB;
-
-ALTER TABLESPACE ts1
-DROP DATAFILE 'datafile.dat'
-ENGINE=NDB;
-
-DROP TABLESPACE ts1
-ENGINE=NDB;
-
-DROP LOGFILE GROUP lg1
-ENGINE=NDB;
-
---echo
---echo **** End of = ****
---echo
-
-CREATE LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile.dat'
-INITIAL_SIZE 1M
-UNDO_BUFFER_SIZE 1M
-ENGINE NDB;
-
-ALTER LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile02.dat'
-INITIAL_SIZE 1M
-ENGINE NDB;
-
-CREATE TABLESPACE ts1
-ADD DATAFILE 'datafile.dat'
-USE LOGFILE GROUP lg1
-INITIAL_SIZE 1M
-ENGINE NDB;
-
-ALTER TABLESPACE ts1
-ADD DATAFILE 'datafile2.dat'
-INITIAL_SIZE 1M
-ENGINE NDB;
-
---error 1005
-CREATE TABLE t1
-(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
-TABLESPACE ts1 STORAGE MEMORY
-ENGINE NDB;
-
-CREATE TABLE t1
-(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
-TABLESPACE ts1 STORAGE DISK
-ENGINE NDB;
-
-
-CREATE INDEX b_i on t1(b);
-CREATE INDEX bc_i on t1(b, c);
-
-DROP TABLE t1;
-
-# bug#20053
-
-CREATE TABLESPACE ts2
-ADD DATAFILE 'datafile3.dat'
-USE LOGFILE GROUP lg1
-INITIAL_SIZE 1M
-ENGINE NDB;
-
---error ER_ALTER_FILEGROUP_FAILED
-ALTER TABLESPACE ts1
-DROP DATAFILE 'datafile3.dat'
-ENGINE NDB;
-
---error ER_ALTER_FILEGROUP_FAILED
-ALTER TABLESPACE ts2
-DROP DATAFILE 'datafile2.dat'
-ENGINE NDB;
-# bug#20053
-
-ALTER TABLESPACE ts1
-DROP DATAFILE 'datafile2.dat'
-ENGINE NDB;
-
-ALTER TABLESPACE ts1
-DROP DATAFILE 'datafile.dat'
-ENGINE NDB;
-
-DROP TABLESPACE ts1
-ENGINE NDB;
-
-ALTER TABLESPACE ts2
-DROP DATAFILE 'datafile3.dat'
-ENGINE NDB;
-
-DROP TABLESPACE ts2
-ENGINE NDB;
-
-DROP LOGFILE GROUP lg1
-ENGINE NDB;
-
---echo **** End = And No = ****
-############ End = And No = ##################
-
-###
-#
-# bug#16341
-#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
---error ER_CREATE_FILEGROUP_FAILED
---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
-add undofile 'undofile.dat'
-initial_size 1M
-undo_buffer_size = 1M
-engine=ndb;
-
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---error ER_CREATE_FILEGROUP_FAILED
---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
-drop tablespace ts1
-engine ndb;
-
-drop logfile group lg1
-engine ndb;
-
-#drop table t1;
---exec rm $MYSQLTEST_VARDIR/tmp/t1.frm
-
-
---echo
---echo # -----------------------------------------------------------------
---echo # End 5.1 test
---echo # -----------------------------------------------------------------
-
---echo
---echo # --
---echo # -- WL#4300: Define privileges for tablespaces.
---echo # --
-
-GRANT CREATE TABLESPACE ON *.* TO mysqltest_u1@localhost;
-
---echo
-
---disable_warnings
-DROP DATABASE IF EXISTS mysqltest2;
---enable_warnings
-
-CREATE DATABASE mysqltest2;
-
-GRANT ALL PRIVILEGES ON mysqltest2.* TO mysqltest_u2@localhost;
-
---echo
---echo # -- Connection: mysqltest_u1@localhost
---echo
---connect(con1, localhost, mysqltest_u1,,)
-
---echo # -- Grants for mysqltest_u1@localhost:
-SHOW GRANTS;
-
---echo
---echo # -- Check CREATE LOGFILE GROUP...
-CREATE LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile.dat'
-INITIAL_SIZE 1M
-UNDO_BUFFER_SIZE = 1M
-ENGINE = NDB;
-
---echo
---echo # -- Check ALTER LOGFILE GROUP...
-ALTER LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile02.dat'
-INITIAL_SIZE 1M
-ENGINE = NDB;
-
---echo
---echo # -- Check CREATE TABLESPACE...
-CREATE TABLESPACE ts1
-ADD DATAFILE 'datafile.dat'
-USE LOGFILE GROUP lg1
-INITIAL_SIZE 1M
-ENGINE = NDB;
-
---echo
---echo # -- Check ALTER TABLESPACE...
-ALTER TABLESPACE ts1
-DROP DATAFILE 'datafile.dat'
-INITIAL_SIZE 1M
-ENGINE = NDB;
-
---echo
---echo # -- Connection: mysqltest_u2@localhost
---echo
---connect(con2, localhost, mysqltest_u2,,mysqltest2)
-
---echo # -- Grants for mysqltest_u2@localhost:
-SHOW GRANTS;
-
-CREATE TABLE t1(c INT) TABLESPACE ts1;
-
-DROP TABLE t1;
-
---echo
---echo # -- Connection: mysqltest_u1@localhost
---echo
---connection con1
-
---echo
---echo # -- Check DROP TABLESPACE...
-DROP TABLESPACE ts1
-ENGINE = NDB;
-
---echo
---echo # -- Check DROP LOGFILE GROUP...
-DROP LOGFILE GROUP lg1
-ENGINE = NDB;
-
---echo
---echo # -- Connection: root@localhost
---echo
---connection default
---disconnect con1
-
-DROP USER mysqltest_u1@localhost;
-DROP USER mysqltest_u2@localhost;
-DROP DATABASE mysqltest2;
-
---echo
---echo # -----------------------------------------------------------------
---echo # End 6.0 test
---echo # -----------------------------------------------------------------
diff --git a/mysql-test/suite/ndb/t/ndb_dd_disk2memory.test b/mysql-test/suite/ndb/t/ndb_dd_disk2memory.test
deleted file mode 100644
index 5975f44e087..00000000000
--- a/mysql-test/suite/ndb/t/ndb_dd_disk2memory.test
+++ /dev/null
@@ -1,292 +0,0 @@
-########################################
-# Author: JBM
-# Date: 2006-01-12
-# Purpose: To test using ndb memory and
-# disk tables together.
-########################################
-
--- source include/have_ndb.inc
-
---disable_warnings
-DROP TABLE IF EXISTS test.t1;
-DROP TABLE IF EXISTS test.t2;
---enable_warnings
-
-############ Test Setup Section #############
--- echo **** Test Setup Section ****
-
-CREATE LOGFILE GROUP log_group1
-ADD UNDOFILE './log_group1/undofile.dat'
-INITIAL_SIZE 16M
-UNDO_BUFFER_SIZE = 1M
-ENGINE=NDB;
-
-CREATE TABLESPACE table_space1
-ADD DATAFILE './table_space1/datafile.dat'
-USE LOGFILE GROUP log_group1
-INITIAL_SIZE 12M
-ENGINE NDB;
-
-
-CREATE TABLE test.t1
-(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
-TABLESPACE table_space1 STORAGE DISK
-ENGINE=NDB;
-
-CREATE TABLE test.t2
-(pk2 INT NOT NULL PRIMARY KEY, b2 INT NOT NULL, c2 INT NOT NULL)
-ENGINE=NDB;
-
---echo
-##################### Data load for first test ####################
---echo **** Data load for first test ****
-
-INSERT INTO test.t1 VALUES
-(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
-(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10),
-(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15),
-(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20),
-(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25),
-(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30),
-(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35),
-(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40),
-(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45),
-(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50),
-(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55),
-(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60),
-(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65),
-(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70),
-(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75);
-
-
-INSERT INTO test.t2 VALUES
-(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
-(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10),
-(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15),
-(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20),
-(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25),
-(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30),
-(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35),
-(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40),
-(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45),
-(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50),
-(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55),
-(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60),
-(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65),
-(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70),
-(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75);
-
---echo
-##################### Test 1 Section Begins ###############
---echo *** Test 1 Section Begins ***
-SELECT COUNT(*) FROM test.t2 LEFT JOIN test.t1 ON pk2=pk1 WHERE b2 IN (4);
-SELECT * FROM test.t2 LEFT JOIN test.t1 ON pk2=pk1 WHERE b2 IN (4);
-SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 WHERE b IN (4);
-SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON b=b2 WHERE pk1 IN (75);
-SELECT b, c FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 ORDER BY b;
---echo
-####################### Test 1 Section End ################
-
-##################### Setup for test 2 ####################
---echo *** Setup for test 2 ****
-DELETE FROM test.t1;
-INSERT INTO test.t1 VALUES
-(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
-(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10),
-(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15),
-(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20),
-(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25),
-(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30),
-(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35),
-(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40),
-(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45);
---echo
-############################# Test Section 2 ###############
---echo **** Test Section 2 ****
-SELECT b, c FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 ORDER BY b;
-SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON b=b2;
-SELECT COUNT(*) FROM test.t1 RIGHT JOIN test.t2 ON b=b2;
-SHOW CREATE TABLE test.t2;
-SHOW CREATE TABLE test.t1;
-ALTER TABLE test.t2 TABLESPACE table_space1 STORAGE DISK
-ENGINE=NDB;
-SHOW CREATE TABLE test.t2;
-ALTER TABLE test.t1 STORAGE MEMORY ENGINE=NDBCLUSTER;
-SHOW CREATE TABLE test.t1;
---echo
-######################### End Test Section 2 #################
-DROP TABLE test.t1;
-DROP TABLE test.t2;
-##################### Setup for Test Section 3 ###############
---echo *** Setup for Test Section 3 ***
-CREATE TABLE test.t1 (
- usr_id INT unsigned NOT NULL,
- uniq_id INT unsigned NOT NULL AUTO_INCREMENT,
- start_num INT unsigned NOT NULL DEFAULT 1,
- increment INT unsigned NOT NULL DEFAULT 1,
- PRIMARY KEY (uniq_id),
- INDEX usr_uniq_idx (usr_id, uniq_id),
- INDEX uniq_usr_idx (uniq_id, usr_id))
-TABLESPACE table_space1 STORAGE DISK
-ENGINE=NDB;
-
-
-CREATE TABLE test.t2 (
- id INT unsigned NOT NULL DEFAULT 0,
- usr2_id INT unsigned NOT NULL DEFAULT 0,
- max INT unsigned NOT NULL DEFAULT 0,
- c_amount INT unsigned NOT NULL DEFAULT 0,
- d_max INT unsigned NOT NULL DEFAULT 0,
- d_num INT unsigned NOT NULL DEFAULT 0,
- orig_time INT unsigned NOT NULL DEFAULT 0,
- c_time INT unsigned NOT NULL DEFAULT 0,
- active ENUM ("no","yes") NOT NULL,
- PRIMARY KEY (id,usr2_id),
- INDEX id_idx (id),
- INDEX usr2_idx (usr2_id))
-ENGINE=NDB;
-
-INSERT INTO test.t1 VALUES (3,NULL,0,50),(3,NULL,0,200),(3,NULL,0,25),(3,NULL,0,84676),(3,NULL,0,235),(3,NULL,0,10),(3,NULL,0,3098),(3,NULL,0,2947),(3,NULL,0,8987),(3,NULL,0,8347654),(3,NULL,0,20398),(3,NULL,0,8976),(3,NULL,0,500),(3,NULL,0,198);
-
---echo
-###################### Test Section 3 ######################
---echo **** Test Section 3 ****
-SELECT test.t1.usr_id,test.t1.uniq_id,test.t1.increment,
-test.t2.usr2_id,test.t2.c_amount,test.t2.max
-FROM test.t1
-LEFT JOIN test.t2 ON test.t2.id = test.t1.uniq_id
-WHERE test.t1.uniq_id = 4
-ORDER BY test.t2.c_amount;
-
-INSERT INTO test.t2 VALUES (2,3,3000,6000,0,0,746584,837484,'yes');
-INSERT INTO test.t2 VALUES (4,3,3000,6000,0,0,746584,837484,'yes');
-INSERT INTO test.t2 VALUES (7,3,1000,2000,0,0,746294,937484,'yes');
-
-SELECT test.t1.usr_id,test.t1.uniq_id,test.t1.increment,
-test.t2.usr2_id,test.t2.c_amount,test.t2.max
-FROM test.t1
-LEFT JOIN test.t2 ON test.t2.id = test.t1.uniq_id
-WHERE test.t1.uniq_id = 4
-ORDER BY test.t2.c_amount;
---echo
-####################### End Section 3 #########################
-DROP TABLE test.t1;
-DROP TABLE test.t2;
-
-########## Test that use to be in ndb_dd_advance.test #########
-########## ndb_dd_advance.test is now ndb_dd_alter.test #######
-#### Use group by asc and dec; Use having; Use order by. ####
-
-CREATE TABLE test.t1 (
- a1 smallint NOT NULL,
- a2 int NOT NULL,
- a3 bigint NOT NULL,
- a4 char(10),
- a5 decimal(5,1),
- a6 time,
- a7 date,
- a8 datetime,
- a9 VARCHAR(255),
- a10 blob,
- PRIMARY KEY(a1)
-) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB;
-
-CREATE TABLE test.t2 (
- b1 smallint NOT NULL,
- b2 int NOT NULL,
- b3 bigint NOT NULL,
- b4 char(10),
- b5 decimal(5,1),
- b6 time,
- b7 date,
- b8 datetime,
- b9 VARCHAR(255),
- b10 blob,
- PRIMARY KEY(b1)
-) ENGINE=NDB;
-
-### ADD Some DATA to tables ######
-
-
-let $1=20;
-disable_query_log;
-while ($1)
-{
- eval insert into test.t1 values($1, $1+1, $1+2000000000, "aaa$1", 34.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data");
- eval insert into test.t2 values($1+2, $1+3, $1+3000000000, "aaa$1", 35.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data");
- dec $1;
-}
-
-ALTER TABLE test.t1 ADD INDEX (a2), ADD INDEX (a3), ADD INDEX (a8);
-ALTER TABLE test.t2 ADD INDEX (b2), ADD INDEX (b3), ADD INDEX (b8);
-SHOW CREATE TABLE test.t1;
-SHOW CREATE TABLE test.t2;
-SELECT * FROM test.t1 order by a1;
-SELECT * FROM test.t2 order by b1;
-SELECT COUNT(a1), a1, COUNT(a1)*a1 FROM test.t1 GROUP BY a1;
-SELECT COUNT(a2), (a2+1), COUNT(a2)*(a2+0) FROM test.t1 GROUP BY a2;
-
-DROP TABLE test.t1;
-DROP TABLE test.t2;
-
-CREATE TABLE test.t1 (a INT NOT NULL,
-b CHAR(5), c TEXT, d INT NOT NULL PRIMARY KEY) TABLESPACE
-table_space1 STORAGE DISK ENGINE=NDB;
-
-insert into test.t1 (a,b,c,d) values (1,'a','Jonas',1),(2,'b','Tomas',2),
-(3,'c','Pekka',3),(4,'d','Martin',4),(5,'e','Stewart',5),(6,'f','Jeb',6),
-(7,'g','Serge',7),(8,'h','Clavin',8);
-select distinct a from test.t1 group by b,a having a > 4 order by a desc;
-select distinct a,c from test.t1 group by b,c,a having a > 2 order by a desc;
-select distinct a from test.t1 group by b,a having a > 1 order by a asc;
-select distinct a,c from test.t1 group by b,c,a having a > 3 order by a asc;
-drop table test.t1;
-
-create table test.t1 (a char(1), key(a)) TABLESPACE table_space1
-STORAGE DISK ENGINE=NDB;
-insert into test.t1 values('1'),('1'),('1'),('2'),('2'),('3'),('3');
-select * from test.t1 where a >= '1' order by a;
-select distinct a from test.t1 order by a desc;
-select distinct a from test.t1 where a >= '1' order by a desc;
-select distinct a from test.t1 where a >= '1' order by a asc;
-drop table test.t1;
-
-CREATE TABLE test.t1 (email varchar(50), infoID BIGINT, dateentered DATETIME)
-TABLESPACE table_space1 STORAGE DISK ENGINE=NDB;
-CREATE TABLE test.t2 (infoID BIGINT, shipcode varchar(10)) ENGINE=NDB;
-
-INSERT INTO test.t1 (email, infoID, dateentered) VALUES
- ('test1@testdomain.com', 1, '2002-07-30 22:56:38'),
- ('test1@testdomain.com', 1, '2002-07-27 22:58:16'),
- ('test2@testdomain.com', 1, '2002-06-19 15:22:19'),
- ('test2@testdomain.com', 2, '2002-06-18 14:23:47'),
- ('test3@testdomain.com', 1, '2002-05-19 22:17:32');
-
-INSERT INTO test.t2(infoID, shipcode) VALUES
- (1, 'Z001'),
- (2, 'R002');
-
-SELECT DISTINCTROW email, shipcode FROM test.t1, test.t2
-WHERE t1.infoID=t2.infoID order by email, shipcode;
-SELECT DISTINCTROW email FROM test.t1 ORDER BY dateentered DESC;
-SELECT DISTINCTROW email, shipcode FROM test.t1, test.t2
-WHERE test.t1.infoID=test.t2.infoID ORDER BY dateentered DESC;
-
-DROP TABLE test.t1,test.t2;
-
-#################
-# Test Cleanup
-#################
-
-ALTER TABLESPACE table_space1
-DROP DATAFILE './table_space1/datafile.dat'
-ENGINE = NDB;
-
-DROP TABLESPACE table_space1
-ENGINE = NDB;
-
-DROP LOGFILE GROUP log_group1
-ENGINE =NDB;
-
-#End 5.1 test case
-
diff --git a/mysql-test/suite/ndb/t/ndb_dd_dump.test b/mysql-test/suite/ndb/t/ndb_dd_dump.test
deleted file mode 100644
index 7fc315ef167..00000000000
--- a/mysql-test/suite/ndb/t/ndb_dd_dump.test
+++ /dev/null
@@ -1,289 +0,0 @@
--- source include/have_ndb.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1, t2, t3;
---enable_warnings
-
-CREATE LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile_lg1_01.dat'
-INITIAL_SIZE 2M
-UNDO_BUFFER_SIZE = 1M
-ENGINE NDB;
-
-ALTER LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile_lg1_02.dat'
-INITIAL_SIZE = 4M
-ENGINE NDB;
-
-CREATE TABLESPACE ts1
-ADD DATAFILE 'datafile_ts1_01.dat'
-USE LOGFILE GROUP lg1
-EXTENT_SIZE 1M
-INITIAL_SIZE 2M
-ENGINE NDB;
-
-ALTER TABLESPACE ts1
-ADD DATAFILE 'datafile_ts1_02.dat'
-INITIAL_SIZE = 1M
-ENGINE=NDB;
-
-CREATE TABLESPACE ts2
-ADD DATAFILE 'datafile_ts2_01.dat'
-USE LOGFILE GROUP lg1
-INITIAL_SIZE 2M
-ENGINE NDB;
-
-CREATE TABLESPACE ts3
-ADD DATAFILE 'datafile_ts3_01.dat'
-USE LOGFILE GROUP lg1
-INITIAL_SIZE 4M
-ENGINE NDB;
-
-########################################
-# Create a table using this tablespace
-########################################
-
-CREATE TABLE t1
-(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
-TABLESPACE ts1 STORAGE DISK
-ENGINE=NDB;
-
-CREATE TABLE t2
-(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
-TABLESPACE ts2 STORAGE DISK
-ENGINE=NDB;
-
-CREATE TABLE t3
-(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
-TABLESPACE ts3 STORAGE DISK
-ENGINE=NDB;
-
-INSERT INTO t1 VALUES
-(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
-(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10),
-(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15),
-(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20),
-(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25),
-(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30),
-(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35),
-(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40),
-(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45),
-(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50),
-(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55),
-(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60),
-(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65),
-(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70),
-(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75),
-(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80),
-(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85),
-(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90),
-(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95),
-(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100),
-(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105),
-(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110),
-(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115),
-(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120),
-(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125),
-(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130),
-(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135),
-(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140),
-(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145),
-(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150),
-(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155),
-(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160),
-(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165),
-(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170),
-(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175),
-(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180),
-(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185),
-(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190),
-(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195),
-(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200),
-(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205),
-(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210),
-(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215),
-(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220),
-(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225),
-(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230),
-(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235),
-(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240),
-(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245),
-(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250),
-(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255),
-(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260),
-(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265),
-(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270),
-(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275),
-(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280),
-(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285),
-(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290),
-(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295),
-(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300),
-(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305),
-(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310),
-(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315),
-(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320),
-(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325),
-(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330),
-(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335),
-(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340),
-(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345),
-(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350),
-(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355),
-(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360),
-(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365),
-(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370),
-(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375),
-(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380),
-(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385),
-(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390),
-(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395),
-(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400),
-(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405),
-(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410),
-(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415),
-(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420),
-(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425),
-(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430),
-(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435),
-(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440),
-(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445),
-(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450),
-(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455),
-(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460),
-(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465),
-(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470),
-(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475),
-(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480),
-(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485),
-(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490),
-(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495),
-(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500);
-
-INSERT INTO t2 VALUES
-(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5);
-
-INSERT INTO t3 VALUES
-(1,1,1);
-
---exec $MYSQL_DUMP --skip-comments --compact -Y test > $MYSQLTEST_VARDIR/tmp/ndb_dd_dump.sql
-
-DROP TABLE t1;
-DROP TABLE t2;
-DROP TABLE t3;
-
-ALTER TABLESPACE ts1
-DROP DATAFILE 'datafile_ts1_01.dat'
-ENGINE = NDB;
-
-ALTER TABLESPACE ts1
-DROP DATAFILE 'datafile_ts1_02.dat'
-ENGINE = NDB;
-
-ALTER TABLESPACE ts2
-DROP DATAFILE 'datafile_ts2_01.dat'
-ENGINE = NDB;
-
-ALTER TABLESPACE ts3
-DROP DATAFILE 'datafile_ts3_01.dat'
-ENGINE = NDB;
-
-DROP TABLESPACE ts1 ENGINE = NDB;
-DROP TABLESPACE ts2 ENGINE = NDB;
-DROP TABLESPACE ts3 ENGINE = NDB;
-
-DROP LOGFILE GROUP lg1 ENGINE = NDB;
-
---exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/ndb_dd_dump.sql
-
-SELECT DISTINCT
- LOGFILE_GROUP_NAME,
- FILE_NAME,
- TOTAL_EXTENTS,
- INITIAL_SIZE,
- ENGINE
-FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="UNDO LOG" ORDER BY FILE_NAME;
-
-SELECT DISTINCT
- TABLESPACE_NAME,
- LOGFILE_GROUP_NAME,
- FILE_NAME,
- EXTENT_SIZE,
- INITIAL_SIZE,
- ENGINE
-FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="DATAFILE" ORDER BY FILE_NAME;
-
-SELECT COUNT(*) FROM t1;
-SELECT COUNT(*) FROM t2;
-SELECT COUNT(*) FROM t3;
-
-DROP TABLE t1;
-DROP TABLE t2;
-DROP TABLE t3;
-
-#### BUG 18856 test case comented out
-##### Use "SELECT * INTO OUTFILE" to dump data and "LOAD DATA INFILE" to load ##### data back to the data file.
-
-CREATE TABLE test.t (
- a smallint NOT NULL,
- b int NOT NULL,
- c bigint NOT NULL,
- d char(10),
- e TEXT,
- f VARCHAR(255),
- PRIMARY KEY(a)
-) TABLESPACE ts1 STORAGE DISK ENGINE=NDB;
-
- ALTER TABLE test.t ADD INDEX (d), ADD INDEX (f);
- SHOW CREATE TABLE test.t;
-
-# insert records into tables
-
- let $1=100;
- disable_query_log;
- while ($1)
- {
- eval insert into test.t values($1, $1+1, $1+2, "aaa$1", "bbb$1", "ccccc$1");
- dec $1;
- }
- enable_query_log;
-
- SELECT * FROM test.t order by a;
-
- SELECT * INTO OUTFILE 't_backup' FROM test.t;
- TRUNCATE test.t;
-
-#'TRUNCATE test.t' failed: 1205: Lock wait timeout exceeded; try restarting
-#transaction. TABLESPACE ts STORAGE DISK ENGINE=NDB;
-
- SELECT count(*) FROM test.t;
- LOAD DATA INFILE 't_backup' INTO TABLE test.t;
-
- SELECT * FROM test.t order by a;
-
- DROP TABLE test.t;
-
-
-ALTER TABLESPACE ts1
-DROP DATAFILE 'datafile_ts1_01.dat'
-ENGINE = NDB;
-
-ALTER TABLESPACE ts1
-DROP DATAFILE 'datafile_ts1_02.dat'
-ENGINE = NDB;
-
-ALTER TABLESPACE ts2
-DROP DATAFILE 'datafile_ts2_01.dat'
-ENGINE = NDB;
-
-ALTER TABLESPACE ts3
-DROP DATAFILE 'datafile_ts3_01.dat'
-ENGINE = NDB;
-
-DROP TABLESPACE ts1 ENGINE = NDB;
-DROP TABLESPACE ts2 ENGINE = NDB;
-DROP TABLESPACE ts3 ENGINE = NDB;
-
-DROP LOGFILE GROUP lg1 ENGINE = NDB;
-
-#End 5.1 test case
diff --git a/mysql-test/suite/ndb/t/ndb_dd_sql_features.test b/mysql-test/suite/ndb/t/ndb_dd_sql_features.test
deleted file mode 100644
index f46cb217ab4..00000000000
--- a/mysql-test/suite/ndb/t/ndb_dd_sql_features.test
+++ /dev/null
@@ -1,551 +0,0 @@
-##############################################################
-# Author: Nikolay
-# Date: 2006-04-01
-# Purpose: Specific Blob and Varchar testing using disk tables.
-##############################################################
-# Create Stored procedures that use disk based tables.
-# Create function that operate on disk based tables.
-# Create triggers that operate on disk based tables.
-# Create views that operate on disk based tables.
-# Try to create FK constraints on disk based tables.
-# Create and use disk based table that use auto inc.
-# Create test that use transaction (commit, rollback)
-# Create large disk base table, do random queries, check cache hits,
-# do same query 10 times check cache hits.
-# Create test that uses COUNT(), SUM(), MAX(), MIN(),
-# NOW(), USER(), ... other built in # SQL functions
-# Create test that uses locks.
-# Create test using truncate.
-##############################################################
-# Author: Jonathan
-# Date: 2006-08-28
-# Change: Remove all the create and drop LFG and TS except
-# The first create and the last drop to make test
-# run faster.
-# In addition, renamed test to be to a name that
-# gives a better idea of what the test is about
-###########################################################
--- source include/have_ndb.inc
-
---disable_warnings
-DROP TABLE IF EXISTS test.t1;
-DROP TABLE IF EXISTS test.t2;
-DROP TABLE IF EXISTS test.t3;
---enable_warnings
-
-#### Copy data from table in one table space to table in ###
-#### different table space. ####
---echo *****
---echo **** Copy data from table in one table space to table
---echo **** in different table space
---echo *****
-
- CREATE LOGFILE GROUP lg
- ADD UNDOFILE './lg_group/undofile.dat'
- INITIAL_SIZE 16M
- UNDO_BUFFER_SIZE = 1M
- ENGINE=NDB;
-
- CREATE TABLESPACE ts1
- ADD DATAFILE './table_space1/datafile.dat'
- USE LOGFILE GROUP lg
- INITIAL_SIZE 25M
- ENGINE NDB;
-
- CREATE TABLESPACE ts2
- ADD DATAFILE './table_space2/datafile.dat'
- USE LOGFILE GROUP lg
- INITIAL_SIZE 20M
- ENGINE NDB;
-
- CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB)
- TABLESPACE ts1 STORAGE DISK ENGINE=NDB;
- CREATE TABLE test.t2 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB)
- TABLESPACE ts2 STORAGE DISK ENGINE=NDB;
-
- SHOW CREATE TABLE test.t1;
- SHOW CREATE TABLE test.t2;
-
- INSERT INTO test.t1 VALUES (1,'111111','aaaaaaaa');
- INSERT INTO test.t1 VALUES (2,'222222','bbbbbbbb');
- SELECT * FROM test.t1 ORDER BY a1;
- INSERT INTO test.t2(a1,a2,a3) SELECT * FROM test.t1;
- SELECT * FROM test.t2 ORDER BY a1;
-
- DROP TABLE test.t1, test.t2;
-
- # populate BLOB field with large data
-
-set @vc1 = repeat('a', 200);
-set @vc2 = repeat('b', 500);
-set @vc3 = repeat('c', 1000);
-set @vc4 = repeat('d', 4000);
-
-# x0 size 256
-set @x0 = '01234567012345670123456701234567';
-set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0);
-
-# b1 length 2000+256
-set @b1 = 'b1';
-set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
-set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
-set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
-set @b1 = concat(@b1,@x0);
-# d1 length 3000
-set @d1 = 'dd1';
-set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1);
-set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1);
-set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1);
-
-# b2 length 20000
-set @b2 = 'b2';
-set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
-set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
-set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
-set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
-# d2 length 30000
-set @d2 = 'dd2';
-set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2);
-set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2);
-set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2);
-set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2);
-
-select length(@x0),length(@b1),length(@d1) from dual;
-select length(@x0),length(@b2),length(@d2) from dual;
-
- CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB)
- TABLESPACE ts1 STORAGE DISK ENGINE=NDB;
- CREATE TABLE test.t2 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB)
- TABLESPACE ts2 STORAGE DISK ENGINE=NDB;
-
- SHOW CREATE TABLE test.t1;
- SHOW CREATE TABLE test.t2;
-
- INSERT INTO test.t1 VALUES (1,@vc1,@d1);
- INSERT INTO test.t1 VALUES (2,@vc2,@b1);
- INSERT INTO test.t1 VALUES (3,@vc3,@d2);
- INSERT INTO test.t1 VALUES (4,@vc4,@b2);
-
- SELECT a1,length(a2),substr(a2,180,2),length(a3),substr(a3,1+3*900,3)
- FROM test.t1 WHERE a1=1;
- SELECT a1,length(a2),substr(a2,480,2),length(a3),substr(a3,1+2*900,3)
- FROM test.t1 where a1=2;
-
- INSERT INTO test.t2(a1,a2,a3) SELECT * FROM test.t1;
- SELECT a1,length(a2),substr(a2,180,2),length(a3),substr(a3,1+3*900,3)
- FROM test.t2 WHERE a1=1;
- SELECT a1,length(a2),substr(a2,480,2),length(a3),substr(a3,1+2*900,3)
- FROM test.t2 where a1=2;
-
-
- DROP TABLE test.t1, test.t2;
-
-#### Insert, Update, Delete from NDB table with BLOB fields ####
---echo *****
---echo **** Insert, Update, Delete from NDB table with BLOB fields
---echo *****
-
-set @vc1 = repeat('a', 200);
-set @vc2 = repeat('b', 500);
-set @vc3 = repeat('c', 1000);
-set @vc4 = repeat('d', 4000);
-set @vc5 = repeat('d', 5000);
-
-set @bb1 = repeat('1', 2000);
-set @bb2 = repeat('2', 5000);
-set @bb3 = repeat('3', 10000);
-set @bb4 = repeat('4', 40000);
-set @bb5 = repeat('5', 50000);
-
-select length(@vc1),length(@vc2),length(@vc3),length(@vc4),length(@vc5)
-from dual;
-select length(@bb1),length(@bb2),length(@bb3),length(@bb4),length(@bb5)
-from dual;
-
- CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB)
- TABLESPACE ts1 STORAGE DISK ENGINE=NDB;
-# CREATE TABLE test.t2 (a1 int NOT NULL, a2 VARCHAR(5000), a3 BLOB)
-# TABLESPACE ts2 STORAGE DISK ENGINE=NDB;
-
- INSERT INTO test.t1 VALUES (1,@vc1,@bb1);
- INSERT INTO test.t1 VALUES (2,@vc2,@bb2);
- INSERT INTO test.t1 VALUES (3,@vc3,@bb3);
- INSERT INTO test.t1 VALUES (4,@vc4,@bb4);
- INSERT INTO test.t1 VALUES (5,@vc5,@bb5);
-
- UPDATE test.t1 SET a2=@vc5, a3=@bb5 WHERE a1=1;
- SELECT a1,length(a2),substr(a2,4998,2),length(a3),substr(a3,49997,3)
- FROM test.t1 WHERE a1=1;
-
- UPDATE test.t1 SET a2=@vc4, a3=@bb4 WHERE a1=2;
- SELECT a1,length(a2),substr(a2,3998,2),length(a3),substr(a3,39997,3)
- FROM test.t1 WHERE a1=2;
-
- UPDATE test.t1 SET a2=@vc2, a3=@bb2 WHERE a1=3;
- SELECT a1,length(a2),substr(a2,498,2),length(a3),substr(a3,3997,3)
- FROM test.t1 WHERE a1=3;
-
- UPDATE test.t1 SET a2=@vc3, a3=@bb3 WHERE a1=4;
- SELECT a1,length(a2),substr(a2,998,2),length(a3),substr(a3,9997,3)
- FROM test.t1 WHERE a1=4;
-
- UPDATE test.t1 SET a2=@vc1, a3=@bb1 WHERE a1=5;
- SELECT a1,length(a2),substr(a2,198,2),length(a3),substr(a3,1997,3)
- FROM test.t1 WHERE a1=5;
-
- DELETE FROM test.t1 where a1=5;
- SELECT count(*) from test.t1;
- DELETE FROM test.t1 where a1=4;
- SELECT count(*) from test.t1;
- DELETE FROM test.t1 where a1=3;
- SELECT count(*) from test.t1;
- DELETE FROM test.t1 where a1=2;
- SELECT count(*) from test.t1;
- DELETE FROM test.t1 where a1=1;
- SELECT count(*) from test.t1;
-
- DROP TABLE test.t1;
-
-##### Create Stored procedures that use disk based tables #####
---echo *****
---echo **** Create Stored procedures that use disk based tables
---echo *****
-
-delimiter //;
- CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB)
- TABLESPACE ts1 STORAGE DISK ENGINE=NDB//
- CREATE PROCEDURE test.sp1()
- BEGIN
- INSERT INTO test.t1 values (1,'111111','aaaaaaaa');
- END//
-delimiter ;//
-
- CALL test.sp1();
- SELECT * FROM test.t1;
-
-delimiter //;
- CREATE PROCEDURE test.sp2(n INT, vc VARCHAR(256), blb BLOB)
- BEGIN
- UPDATE test.t1 SET a2=vc, a3=blb where a1=n;
- END//
-delimiter ;//
-
- CALL test.sp2(1,'222222','bbbbbbbb');
- SELECT * FROM test.t1;
-
- DELETE FROM test.t1;
- DROP PROCEDURE test.sp1;
- DROP PROCEDURE test.sp2;
- DROP TABLE test.t1;
-
-
-#### Create function that operate on disk based tables ####
---echo *****
---echo ***** Create function that operate on disk based tables
---echo *****
-
- CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB)
- TABLESPACE ts1 STORAGE DISK ENGINE=NDB;
- let $1=100;
- disable_query_log;
- while ($1)
- {
- eval insert into test.t1 values($1, "aaaaa$1", "bbbbb$1");
- dec $1;
- }
- enable_query_log;
-
- delimiter //;
- CREATE FUNCTION test.fn1(n INT) RETURNS INT
- BEGIN
- DECLARE v INT;
- SELECT a1 INTO v FROM test.t1 WHERE a1=n;
- RETURN v;
- END//
- delimiter ;//
-
-delimiter //;
- CREATE FUNCTION test.fn2(n INT, blb BLOB) RETURNS BLOB
- BEGIN
- DECLARE vv BLOB;
- UPDATE test.t1 SET a3=blb where a1=n;
- SELECT a3 INTO vv FROM test.t1 WHERE a1=n;
- RETURN vv;
- END//
- delimiter ;//
-
- SELECT test.fn1(10) FROM DUAL;
- SELECT test.fn2(50, 'new BLOB content') FROM DUAL;
-
- DELETE FROM test.t1;
- DROP FUNCTION test.fn1;
- DROP FUNCTION test.fn2;
- DROP TABLE test.t1;
-
-#### Create triggers that operate on disk based tables ####
---echo *****
---echo ***** Create triggers that operate on disk based tables
---echo *****
-
- CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB)
- TABLESPACE ts1 STORAGE DISK ENGINE=NDB;
-
- delimiter //;
- CREATE TRIGGER test.trg1 BEFORE INSERT ON test.t1 FOR EACH ROW
- BEGIN
- if isnull(new.a2) then
- set new.a2:= 'trg1 works on a2 field';
- end if;
- if isnull(new.a3) then
- set new.a3:= 'trg1 works on a3 field';
- end if;
- end//
- insert into test.t1 (a1) values (1)//
- insert into test.t1 (a1,a2) values (2, 'ccccccc')//
- select * from test.t1 order by a1//
- delimiter ;//
-
- DELETE FROM test.t1;
- DROP TRIGGER test.trg1;
- DROP TABLE test.t1;
-
-#### Create, update views that operate on disk based tables ####
---echo *****
---echo ***** Create, update views that operate on disk based tables
---echo *****
-
-
- CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB)
- TABLESPACE ts1 STORAGE DISK ENGINE=NDB;
- let $1=10;
- disable_query_log;
- while ($1)
- {
- eval insert into test.t1 values($1, "aaaaa$1", "bbbbb$1");
- dec $1;
- }
- enable_query_log;
- CREATE VIEW test.v1 AS SELECT * FROM test.t1;
- SELECT * FROM test.v1 order by a1;
- CHECK TABLE test.v1, test.t1;
-
- UPDATE test.v1 SET a2='zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz' WHERE a1=5;
- SELECT * FROM test.v1 order by a1;
-
- DROP VIEW test.v1;
- DELETE FROM test.t1;
- DROP TABLE test.t1;
-
-#### Create and use disk based table that use auto inc ####
---echo *****
---echo ***** Create and use disk based table that use auto inc
---echo *****
-
- CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
- a2 VARCHAR(256), a3 BLOB)
- TABLESPACE ts1 STORAGE DISK ENGINE=NDB;
- let $1=10;
- disable_query_log;
- while ($1)
- {
- eval insert into test.t1 values(NULL, "aaaaa$1", "bbbbb$1");
- dec $1;
- }
- enable_query_log;
- SELECT * FROM test.t1 ORDER BY a1;
- DELETE FROM test.t1;
- DROP TABLE test.t1;
-
-
-#### Create test that use transaction (commit, rollback) ####
---echo *****
---echo ***** Create test that use transaction (commit, rollback)
---echo *****
-
- SET AUTOCOMMIT=0;
- CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
- a2 VARCHAR(256), a3 BLOB)
- TABLESPACE ts1 STORAGE DISK ENGINE=NDB;
-
- INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1");
- COMMIT;
- SELECT * FROM test.t1 ORDER BY a1;
- INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2");
- ROLLBACK;
- SELECT * FROM test.t1 ORDER BY a1;
-
- DELETE FROM test.t1;
- DROP TABLE test.t1;
- SET AUTOCOMMIT=1;
-
-# Now do the same thing with START TRANSACTION without using AUTOCOMMIT.
-
- CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
- a2 VARCHAR(256), a3 BLOB)
- TABLESPACE ts1 STORAGE DISK ENGINE=NDB;
-
- START TRANSACTION;
- INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1");
- COMMIT;
- SELECT * FROM test.t1 ORDER BY a1;
-
- START TRANSACTION;
- INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2");
- ROLLBACK;
- SELECT * FROM test.t1 ORDER BY a1;
-
- DELETE FROM test.t1;
- DROP TABLE test.t1;
-
-#### Create test that uses locks ####
---echo *****
---echo ***** Create test that uses locks
---echo *****
-
- connect (con1,localhost,root,,);
- connect (con2,localhost,root,,);
-
-# connection con1;
---disable_warnings
- drop table if exists test.t1;
- CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
- a2 VARCHAR(256), a3 BLOB)
- TABLESPACE ts1 STORAGE DISK ENGINE=NDB;
---enable_warnings
-
- LOCK TABLES test.t1 write;
- INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1");
- INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2");
- SELECT * FROM test.t1 ORDER BY a1;
-
- connection con2;
- SELECT * FROM test.t1 ORDER BY a1;
- INSERT INTO test.t1 VALUES(NULL, "aaaaa3", "bbbbb3");
-
- connection con1;
- UNLOCK TABLES;
-
- connection con2;
- INSERT INTO test.t1 VALUES(NULL, "aaaaa3", "bbbbb3");
- SELECT * FROM test.t1 ORDER BY a1;
- DELETE FROM test.t1;
- DROP TABLE test.t1;
-
- #connection defualt;
-
-#### Create large disk base table, do random queries, check cache hits ####
---echo *****
---echo ***** Create large disk base table, do random queries, check cache hits
---echo *****
-
-set @vc1 = repeat('a', 200);
-SELECT @vc1 FROM DUAL;
-set @vc2 = repeat('b', 500);
-set @vc3 = repeat('b', 998);
-
-# x0 size 256
-set @x0 = '01234567012345670123456701234567';
-set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0);
-
-# b1 length 2000+256 (blob part aligned)
-set @b1 = 'b1';
-set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
-set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
-set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
-set @b1 = concat(@b1,@x0);
-# d1 length 3000
-set @d1 = 'dd1';
-set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1);
-set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1);
-set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1);
-
-# b2 length 20000
-set @b2 = 'b2';
-set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
-set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
-set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
-set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
-# d2 length 30000
-set @d2 = 'dd2';
-set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2);
-set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2);
-set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2);
-set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2);
-
-select length(@x0),length(@b1),length(@d1) from dual;
-select length(@x0),length(@b2),length(@d2) from dual;
-
- CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(1000), a3 BLOB)
- TABLESPACE ts1 STORAGE DISK ENGINE=NDB;
-
- INSERT INTO test.t1 values(1,@vc1,@d1);
- INSERT INTO test.t1 values(2,@vc2,@d2);
- --replace_column 9 #
- explain SELECT * from test.t1 WHERE a1 = 1;
-
- SELECT a1,length(a2),substr(a2,1+2*900,2),length(a3),substr(a3,1+3*900,3)
- FROM test.t1 WHERE a1=1 ORDER BY a1;
- SELECT a1,length(a2),substr(a2,1+2*9000,2),length(a3),substr(a3,1+3*9000,3)
- FROM test.t1 where a1=2 ORDER BY a1;
-
- UPDATE test.t1 set a2=@vc2,a3=@d2 where a1=1;
- UPDATE test.t1 set a2=@vc1,a3=@d1 where a1=2;
-
- SELECT a1,length(a2),substr(a2,1+2*9000,2),length(a3),substr(a3,1+3*9000,3)
- FROM test.t1 where a1=1;
- SELECT a1,length(a2),substr(a2,1+2*900,2),length(a3),substr(a3,1+3*900,3)
- FROM test.t1 where a1=2;
-
- #SHOW VARIABLES LIKE 'have_query_cache';
- #SHOW STATUS LIKE 'Qcache%';
-
- DELETE FROM test.t1;
- DROP TABLE test.t1;
-
-#### Create test that uses COUNT(), SUM(), MAX(), ####
-##### MIN(), NOW(), USER(), TRUNCATE ####
---echo *****
---echo ***** Create test that uses COUNT(), SUM(), MAX(), MIN(), NOW(),
---echo ***** USER(), TRUNCATE
---echo *****
-
- CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256),
- a3 BLOB, a4 DATE, a5 CHAR(250))
- TABLESPACE ts1 STORAGE DISK ENGINE=NDB;
- let $1=100;
- disable_query_log;
- while ($1)
- {
- eval insert into test.t1 values($1, "aaaaaaaaaaaaaaaa$1",
- "bbbbbbbbbbbbbbbbbb$1", '2006-06-20' , USER());
- dec $1;
- }
- enable_query_log;
-
- SELECT COUNT(*) from test.t1;
- SELECT SUM(a1) from test.t1;
- SELECT MIN(a1) from test.t1;
- SELECT MAX(a1) from test.t1;
- SELECT a5 from test.t1 where a1=50;
-
-
- SELECT * from test.t1 order by a1;
-
- DROP TABLE test.t1;
-
- ALTER TABLESPACE ts1
- DROP DATAFILE './table_space1/datafile.dat'
- ENGINE=NDB;
- DROP TABLESPACE ts1 ENGINE=NDB;
-
- ALTER TABLESPACE ts2
- DROP DATAFILE './table_space2/datafile.dat'
- ENGINE=NDB;
- DROP TABLESPACE ts2 ENGINE=NDB;
-
- DROP LOGFILE GROUP lg
- ENGINE=NDB;
-
-
-#End 5.1 test case
-
diff --git a/mysql-test/suite/ndb/t/ndb_gis.test b/mysql-test/suite/ndb/t/ndb_gis.test
deleted file mode 100644
index babff535f94..00000000000
--- a/mysql-test/suite/ndb/t/ndb_gis.test
+++ /dev/null
@@ -1,5 +0,0 @@
---source include/have_ndb.inc
-SET storage_engine=ndbcluster;
---source include/gis_generic.inc
-set optimizer_switch = "engine_condition_pushdown=on";
---source include/gis_generic.inc
diff --git a/mysql-test/suite/ndb/t/ndb_grant.later b/mysql-test/suite/ndb/t/ndb_grant.later
deleted file mode 100644
index 5431d94e1f8..00000000000
--- a/mysql-test/suite/ndb/t/ndb_grant.later
+++ /dev/null
@@ -1,385 +0,0 @@
--- source include/have_ndb.inc
-# Test of GRANT commands
-
-# Cleanup
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-SET NAMES binary;
-
-#
-# Alter mysql system tables to ndb
-# make sure you alter all back in the end
-#
-use mysql;
-alter table columns_priv engine=ndb;
-alter table db engine=ndb;
-alter table func engine=ndb;
-alter table help_category engine=ndb;
-alter table help_keyword engine=ndb;
-alter table help_relation engine=ndb;
-alter table help_topic engine=ndb;
-alter table host engine=ndb;
-alter table tables_priv engine=ndb;
-alter table time_zone engine=ndb;
-alter table time_zone_leap_second engine=ndb;
-alter table time_zone_name engine=ndb;
-alter table time_zone_transition engine=ndb;
-alter table time_zone_transition_type engine=ndb;
-alter table user engine=ndb;
-use test;
-
-#
-# Test that SSL options works properly
-#
-delete from mysql.user where user='mysqltest_1';
-delete from mysql.db where user='mysqltest_1';
-flush privileges;
-begin;
-grant select on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA";
-commit;
-show grants for mysqltest_1@localhost;
-begin;
-grant delete on mysqltest.* to mysqltest_1@localhost;
-commit;
-select * from mysql.user where user="mysqltest_1";
-show grants for mysqltest_1@localhost;
-begin;
-revoke delete on mysqltest.* from mysqltest_1@localhost;
-commit;
-show grants for mysqltest_1@localhost;
-begin;
-grant select on mysqltest.* to mysqltest_1@localhost require NONE;
-commit;
-show grants for mysqltest_1@localhost;
-begin;
-grant USAGE on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "testsubject" ISSUER "MySQL AB";
-commit;
-show grants for mysqltest_1@localhost;
-begin;
-revoke all privileges on mysqltest.* from mysqltest_1@localhost;
-commit;
-show grants for mysqltest_1@localhost;
-delete from mysql.user where user='mysqltest_1';
-flush privileges;
-
-#
-# Test that the new db privileges are stored/retrieved correctly
-#
-
-begin;
-grant CREATE TEMPORARY TABLES, LOCK TABLES on mysqltest.* to mysqltest_1@localhost;
-commit;
-show grants for mysqltest_1@localhost;
-flush privileges;
-show grants for mysqltest_1@localhost;
-begin;
-revoke CREATE TEMPORARY TABLES on mysqltest.* from mysqltest_1@localhost;
-commit;
-show grants for mysqltest_1@localhost;
-begin;
-grant ALL PRIVILEGES on mysqltest.* to mysqltest_1@localhost with GRANT OPTION;
-commit;
-flush privileges;
-show grants for mysqltest_1@localhost;
-begin;
-revoke LOCK TABLES, ALTER on mysqltest.* from mysqltest_1@localhost;
-commit;
-show grants for mysqltest_1@localhost;
-begin;
-revoke all privileges on mysqltest.* from mysqltest_1@localhost;
-commit;
-delete from mysql.user where user='mysqltest_1';
-flush privileges;
-begin;
-grant usage on test.* to mysqltest_1@localhost with grant option;
-commit;
-show grants for mysqltest_1@localhost;
-delete from mysql.user where user='mysqltest_1';
-delete from mysql.db where user='mysqltest_1';
-delete from mysql.tables_priv where user='mysqltest_1';
-delete from mysql.columns_priv where user='mysqltest_1';
-flush privileges;
---error 1141
-show grants for mysqltest_1@localhost;
-
-#
-# Test what happens when you have same table and colum level grants
-#
-
-create table t1 (a int);
-begin;
-GRANT select,update,insert on t1 to mysqltest_1@localhost;
-GRANT select (a), update (a),insert(a), references(a) on t1 to mysqltest_1@localhost;
-commit;
-show grants for mysqltest_1@localhost;
-select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1";
-begin;
-REVOKE select (a), update on t1 from mysqltest_1@localhost;
-commit;
-show grants for mysqltest_1@localhost;
-begin;
-REVOKE select,update,insert,insert (a) on t1 from mysqltest_1@localhost;
-commit;
-show grants for mysqltest_1@localhost;
-begin;
-GRANT select,references on t1 to mysqltest_1@localhost;
-commit;
-select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1";
-begin;
-grant all on test.* to mysqltest_3@localhost with grant option;
-revoke all on test.* from mysqltest_3@localhost;
-commit;
-show grants for mysqltest_3@localhost;
-begin;
-revoke grant option on test.* from mysqltest_3@localhost;
-commit;
-show grants for mysqltest_3@localhost;
-begin;
-grant all on test.t1 to mysqltest_2@localhost with grant option;
-revoke all on test.t1 from mysqltest_2@localhost;
-commit;
-show grants for mysqltest_2@localhost;
-begin;
-revoke grant option on test.t1 from mysqltest_2@localhost;
-commit;
-show grants for mysqltest_2@localhost;
-delete from mysql.user where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3";
-delete from mysql.db where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3";
-delete from mysql.tables_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3";
-delete from mysql.columns_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3";
-flush privileges;
-drop table t1;
-
-#
-# Test some error conditions
-#
-begin;
---error 1221
-GRANT FILE on mysqltest.* to mysqltest_1@localhost;
-commit;
-select 1; -- To test that the previous command didn't cause problems
-
-#
-# Bug#6123: GRANT USAGE inserts useless Db row
-#
-create database mysqltest1;
-begin;
-grant usage on mysqltest1.* to test6123 identified by 'magic123';
-commit;
-select host,db,user,select_priv,insert_priv from mysql.db where db="mysqltest1";
-delete from mysql.user where user='test6123';
-drop database mysqltest1;
-
-#
-# Test for 'drop user', 'revoke privileges, grant'
-#
-
-create table t1 (a int);
-begin;
-grant ALL PRIVILEGES on *.* to drop_user2@localhost with GRANT OPTION;
-commit;
-show grants for drop_user2@localhost;
-begin;
-revoke all privileges, grant option from drop_user2@localhost;
-commit;
-drop user drop_user2@localhost;
-
-begin;
-grant ALL PRIVILEGES on *.* to drop_user@localhost with GRANT OPTION;
-grant ALL PRIVILEGES on test.* to drop_user@localhost with GRANT OPTION;
-grant select(a) on test.t1 to drop_user@localhost;
-commit;
-show grants for drop_user@localhost;
-
-#
-# Bug3086
-#
-set sql_mode=ansi_quotes;
-show grants for drop_user@localhost;
-set sql_mode=default;
-
-set sql_quote_show_create=0;
-show grants for drop_user@localhost;
-set sql_mode="ansi_quotes";
-show grants for drop_user@localhost;
-set sql_quote_show_create=1;
-show grants for drop_user@localhost;
-set sql_mode="";
-show grants for drop_user@localhost;
-
-revoke all privileges, grant option from drop_user@localhost;
-show grants for drop_user@localhost;
-drop user drop_user@localhost;
-begin;
---error 1269
-revoke all privileges, grant option from drop_user@localhost;
-commit;
-
-begin;
-grant select(a) on test.t1 to drop_user1@localhost;
-commit;
-flush privileges;
-begin;
-grant select on test.t1 to drop_user2@localhost;
-grant select on test.* to drop_user3@localhost;
-grant select on *.* to drop_user4@localhost;
-commit;
-flush privileges;
-# Drop user now implicitly revokes all privileges.
-drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost,
-drop_user4@localhost;
-begin;
---error 1269
-revoke all privileges, grant option from drop_user1@localhost, drop_user2@localhost,
-drop_user3@localhost, drop_user4@localhost;
-commit;
-flush privileges;
-#--error 1268
-drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost,
-drop_user4@localhost;
-drop table t1;
-begin;
-grant usage on *.* to mysqltest_1@localhost identified by "password";
-grant select, update, insert on test.* to mysqltest_1@localhost;
-commit;
-show grants for mysqltest_1@localhost;
-drop user mysqltest_1@localhost;
-
-#
-# Bug #3403 Wrong encodin in SHOW GRANTS output
-#
-SET NAMES koi8r;
-CREATE DATABASE ÂÄ;
-USE ÂÄ;
-CREATE TABLE ÔÁÂ (ËÏÌ int);
-
-begin;
-GRANT SELECT ON ÂÄ.* TO ÀÚÅÒ@localhost;
-commit;
-SHOW GRANTS FOR ÀÚÅÒ@localhost;
-begin;
-REVOKE SELECT ON ÂÄ.* FROM ÀÚÅÒ@localhost;
-commit;
-
-begin;
-GRANT SELECT ON ÂÄ.ÔÁÂ TO ÀÚÅÒ@localhost;
-commit;
-SHOW GRANTS FOR ÀÚÅÒ@localhost;
-begin;
-REVOKE SELECT ON ÂÄ.ÔÁÂ FROM ÀÚÅÒ@localhost;
-commit;
-
-begin;
-GRANT SELECT (ËÏÌ) ON ÂÄ.ÔÁÂ TO ÀÚÅÒ@localhost;
-commit;
-SHOW GRANTS FOR ÀÚÅÒ@localhost;
-begin;
-REVOKE SELECT (ËÏÌ) ON ÂÄ.ÔÁÂ FROM ÀÚÅÒ@localhost;
-commit;
-
-DROP DATABASE ÂÄ;
-SET NAMES latin1;
-
-#
-# Bug #5831: REVOKE ALL PRIVILEGES, GRANT OPTION does not revoke everything
-#
-USE test;
-CREATE TABLE t1 (a int );
-CREATE TABLE t2 LIKE t1;
-CREATE TABLE t3 LIKE t1;
-CREATE TABLE t4 LIKE t1;
-CREATE TABLE t5 LIKE t1;
-CREATE TABLE t6 LIKE t1;
-CREATE TABLE t7 LIKE t1;
-CREATE TABLE t8 LIKE t1;
-CREATE TABLE t9 LIKE t1;
-CREATE TABLE t10 LIKE t1;
-CREATE DATABASE testdb1;
-CREATE DATABASE testdb2;
-CREATE DATABASE testdb3;
-CREATE DATABASE testdb4;
-CREATE DATABASE testdb5;
-CREATE DATABASE testdb6;
-CREATE DATABASE testdb7;
-CREATE DATABASE testdb8;
-CREATE DATABASE testdb9;
-CREATE DATABASE testdb10;
-begin;
-GRANT ALL ON testdb1.* TO testuser@localhost;
-GRANT ALL ON testdb2.* TO testuser@localhost;
-GRANT ALL ON testdb3.* TO testuser@localhost;
-GRANT ALL ON testdb4.* TO testuser@localhost;
-GRANT ALL ON testdb5.* TO testuser@localhost;
-GRANT ALL ON testdb6.* TO testuser@localhost;
-GRANT ALL ON testdb7.* TO testuser@localhost;
-GRANT ALL ON testdb8.* TO testuser@localhost;
-GRANT ALL ON testdb9.* TO testuser@localhost;
-GRANT ALL ON testdb10.* TO testuser@localhost;
-GRANT SELECT ON test.t1 TO testuser@localhost;
-GRANT SELECT ON test.t2 TO testuser@localhost;
-GRANT SELECT ON test.t3 TO testuser@localhost;
-GRANT SELECT ON test.t4 TO testuser@localhost;
-GRANT SELECT ON test.t5 TO testuser@localhost;
-GRANT SELECT ON test.t6 TO testuser@localhost;
-GRANT SELECT ON test.t7 TO testuser@localhost;
-GRANT SELECT ON test.t8 TO testuser@localhost;
-GRANT SELECT ON test.t9 TO testuser@localhost;
-GRANT SELECT ON test.t10 TO testuser@localhost;
-GRANT SELECT (a) ON test.t1 TO testuser@localhost;
-GRANT SELECT (a) ON test.t2 TO testuser@localhost;
-GRANT SELECT (a) ON test.t3 TO testuser@localhost;
-GRANT SELECT (a) ON test.t4 TO testuser@localhost;
-GRANT SELECT (a) ON test.t5 TO testuser@localhost;
-GRANT SELECT (a) ON test.t6 TO testuser@localhost;
-GRANT SELECT (a) ON test.t7 TO testuser@localhost;
-GRANT SELECT (a) ON test.t8 TO testuser@localhost;
-GRANT SELECT (a) ON test.t9 TO testuser@localhost;
-GRANT SELECT (a) ON test.t10 TO testuser@localhost;
-commit;
-begin;
-REVOKE ALL PRIVILEGES, GRANT OPTION FROM testuser@localhost;
-commit;
-SHOW GRANTS FOR testuser@localhost;
-DROP USER testuser@localhost;
-DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
-DROP DATABASE testdb1;
-DROP DATABASE testdb2;
-DROP DATABASE testdb3;
-DROP DATABASE testdb4;
-DROP DATABASE testdb5;
-DROP DATABASE testdb6;
-DROP DATABASE testdb7;
-DROP DATABASE testdb8;
-DROP DATABASE testdb9;
-DROP DATABASE testdb10;
-
-#
-# just SHOW PRIVILEGES test
-#
-SHOW PRIVILEGES;
-
-#
-# Alter mysql system tables back to myisam
-#
-use mysql;
-alter table columns_priv engine=myisam;
-alter table db engine=myisam;
-alter table func engine=myisam;
-alter table help_category engine=myisam;
-alter table help_keyword engine=myisam;
-alter table help_relation engine=myisam;
-alter table help_topic engine=myisam;
-alter table host engine=myisam;
-alter table tables_priv engine=myisam;
-alter table time_zone engine=myisam;
-alter table time_zone_leap_second engine=myisam;
-alter table time_zone_name engine=myisam;
-alter table time_zone_transition engine=myisam;
-alter table time_zone_transition_type engine=myisam;
-alter table user engine=myisam;
-use test;
-flush privileges;
-
-# End of 4.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_index.test b/mysql-test/suite/ndb/t/ndb_index.test
deleted file mode 100644
index 272f30e3e6f..00000000000
--- a/mysql-test/suite/ndb/t/ndb_index.test
+++ /dev/null
@@ -1,131 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-CREATE TABLE t1 (
- PORT varchar(16) NOT NULL,
- ACCESSNODE varchar(16) NOT NULL,
- POP varchar(48) NOT NULL,
- ACCESSTYPE int unsigned NOT NULL,
- CUSTOMER_ID varchar(20) collate latin1_bin NOT NULL,
- PROVIDER varchar(16),
- TEXPIRE int unsigned,
- NUM_IP int unsigned,
- LEASED_NUM_IP int unsigned,
- LOCKED_IP int unsigned,
- STATIC_DNS int unsigned,
- SUSPENDED_SERVICE int unsigned,
- SUSPENDED_REASON int unsigned,
- BGP_COMMUNITY int unsigned,
- INDEX CUSTOMER_ID_INDEX(CUSTOMER_ID),
- INDEX FQPN_INDEX(POP,ACCESSNODE,PORT),
- PRIMARY KEY(POP,ACCESSNODE,PORT,ACCESSTYPE)
-) engine=ndbcluster;
-
-INSERT INTO t1 VALUES ('port67', 'node78', 'pop98', 1, 'kllopmn', 'pr_43', 121212, 1, 2, 3, 8, NULL, NULL, NULL);
-INSERT INTO t1 VALUES ('port67', 'node78', 'pop99', 2, 'klkighh', 'pr_44', 121213, 3, 3, 6, 7, NULL, NULL, NULL);
-INSERT INTO t1 VALUES ('port79', 'node79', 'pop79', 2, 'kpongfaa', 'pr_44', 981213, 2, 4, 10, 11, 2, 99, 1278);
-
-
-# Test select using port
-select port, accessnode, pop, accesstype from t1 where port='port67' order by accesstype;
-select port, accessnode, pop, accesstype from t1 where port='foo';
-
-# Test select using accessnode
-select port, accessnode, pop, accesstype from t1 where accessnode='node78' order by accesstype;
-select port, accessnode, pop, accesstype from t1 where accessnode='foo';
-
-# Test select using pop
-select port, accessnode, pop, accesstype from t1 where pop='pop98';
-select port, accessnode, pop, accesstype from t1 where pop='pop98';
-select port, accessnode, pop, accesstype from t1 where pop='pop98';
-select port, accessnode, pop, accesstype from t1 where pop='pop98' order by accesstype;
-# The following two querys will not return any rows since
-# the index used for access is case sensitive
-# They are thus disabled for now
-#select port, accessnode, pop, accesstype from t1 where pop='POP98';
-#select port, accessnode, pop, accesstype from t1 where pop='POP98' order by accesstype;
-select port, accessnode, pop, accesstype from t1 where pop='foo';
-
-# Test select using accesstype
-select port, accessnode, pop, accesstype from t1 where accesstype=1;
-select port, accessnode, pop, accesstype from t1 where accesstype=2 order by port;
-select port, accessnode, pop, accesstype from t1 where accesstype=98 order by port;
-
-# Test select using customer_id
-# NOTE! customer_id has a INDEX (ordered index in NDB), it's case sensitive!
-select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn';
-select port, accessnode, pop, accesstype from t1 where customer_id='KLLOPMN';
-select port, accessnode, pop, accesstype from t1 where customer_id='kLLoPMn';
-select port, accessnode, pop, accesstype from t1 where customer_id='foo';
-
-# Test select using provider
-select port, accessnode, pop, accesstype from t1 where provider='pr_43';
-select port, accessnode, pop, accesstype from t1 where provider='foo';
-
-# Test select using texpire
-select port, accessnode from t1 where texpire=121212;
-select port, accessnode from t1 where texpire=2323;
-
-# Test select using num_ip
-select port, accessnode, pop, accesstype from t1 where num_ip=1;
-select port, accessnode, pop, accesstype from t1 where num_ip=89;
-
-# Test select using leased_num_ip
-select port, accessnode, pop, accesstype from t1 where leased_num_ip=2;
-select port, accessnode, pop, accesstype from t1 where leased_num_ip=89;
-
-# Test select using locked_ip
-select port, accessnode, pop, accesstype from t1 where locked_ip=3;
-select port, accessnode, pop, accesstype from t1 where locked_ip=89;
-
-# Test select using static_dns
-select port, accessnode, pop, accesstype from t1 where static_dns=8;
-select port, accessnode, pop, accesstype from t1 where static_dns=89;
-
-# Test select using suspended_service
-select port, accessnode, pop, accesstype from t1 where suspended_service=8;
-select port, accessnode, pop, accesstype from t1 where suspended_service=89;
-
-# Test select using suspended_reason
-select port, accessnode, pop, accesstype from t1 where suspended_reason=NULL;
-select port, accessnode, pop, accesstype from t1 where suspended_reason=89;
-select port, accessnode, pop, accesstype from t1 where suspended_reason=0;
-
-# Test select using bgp_community
-select port, accessnode, pop, accesstype from t1 where bgp_community=NULL;
-select port, accessnode, pop, accesstype from t1 where bgp_community=89;
-select port, accessnode, pop, accesstype from t1 where bgp_community=0;
-
-# Test select using full primary key
-select port, accessnode, pop, accesstype from t1 where port='port67' and accessnode='node78' and pop='pop98' and accesstype=1;
-select port, accessnode, pop, accesstype from t1 where port='port67' and accesstype=1 and accessnode='node78' and pop='pop98';
-select port, accessnode, pop, accesstype from t1 where pop='pop98' and port='port67' and accesstype=1 and accessnode='node78';
-select port, accessnode from t1 where port='foo' and accessnode='foo' and pop='foo' and accesstype=99;
-
-# Test select using partial primary key
-select port, accessnode, pop, accesstype from t1 where port='port67' and pop='pop98' and accesstype=1;
-select port, accessnode, pop, accesstype from t1 where accesstype=1 and accessnode='node78' and pop='pop98';
-select port, accessnode, pop, accesstype from t1 where port='port67' and accesstype=1 and accessnode='node78';
-select port, accessnode from t1 where port='foo' and accessnode='foo' and pop='foo';
-
-# Test select using CUSTOMER_ID_INDEX
-select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn';
-select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn' and accesstype=1;
-select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn' and accesstype=2;
-select port, accessnode, pop, accesstype from t1 where accesstype=2 and customer_id='kllopmn';
-
-# Test select using FQPN_INDEX
-select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67';
-#select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' order by accesstype;
-#select port, accessnode, pop, accesstype from t1 where accessnode='node78' and port='port67' and pop='pop98' order by accesstype;
-#select port, accessnode, pop, accesstype from t1 where port='port67' and pop='pop98' and accessnode='node78' order by accesstype;
-select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='kllopmn';
-select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='foo';
-
-drop table t1;
-
-# End of 4.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_index_ordered.test b/mysql-test/suite/ndb/t/ndb_index_ordered.test
deleted file mode 100644
index c8dfc1de59f..00000000000
--- a/mysql-test/suite/ndb/t/ndb_index_ordered.test
+++ /dev/null
@@ -1,488 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-drop table if exists t1, test1, test2;
---enable_warnings
-
-#
-# Simple test to show use of ordered indexes
-#
-
-CREATE TABLE t1 (
- a int unsigned NOT NULL PRIMARY KEY,
- b int unsigned not null,
- c int unsigned,
- KEY(b)
-) engine=ndbcluster;
-
-insert t1 values(1, 2, 3), (2,3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2);
-select * from t1 order by b;
-select * from t1 where b >= 4 order by b;
-select * from t1 where b = 4 order by b;
-select * from t1 where b > 4 order by b;
-select * from t1 where b < 4 order by b;
-select * from t1 where b <= 4 order by b;
-
-# Test of reset_bounds
-select tt1.* from t1 as tt1, t1 as tt2 use index(b) where tt1.b = tt2.b order by tt1.b;
-select a, b, c from t1 where a!=2 and c=6;
-select a, b, c from t1 where a!=2 order by a;
-
-#
-# Here we should add some "explain select" to verify that the ordered index is
-# used for these queries.
-#
-
-#
-# Update using ordered index scan
-#
-
-update t1 set c = 3 where b = 3;
-select * from t1 order by a;
-update t1 set c = 10 where b >= 6;
-select * from t1 order by a;
-update t1 set c = 11 where b < 5;
-select * from t1 order by a;
-update t1 set c = 12 where b > 0;
-select * from t1 order by a;
-update t1 set c = 13 where b <= 3;
-select * from t1 order by a;
-update t1 set b = b + 1 where b > 4 and b < 7;
-select * from t1 order by a;
-# Update primary key
-update t1 set a = a + 10 where b > 1 and b < 7;
-select * from t1 order by a;
-
-#
-# Delete using ordered index scan
-#
-
-drop table t1;
-
-CREATE TABLE t1 (
- a int unsigned NOT NULL PRIMARY KEY,
- b int unsigned not null,
- c int unsigned,
- KEY(b)
-) engine=ndbcluster;
-
-insert t1 values(1, 2, 13), (2,3, 13), (3, 4, 12), (4, 5, 12), (5,6, 12), (6,7, 12);
-
-delete from t1 where b = 3;
-select * from t1 order by a;
-delete from t1 where b >= 6;
-select * from t1 order by a;
-delete from t1 where b < 4;
-select * from t1 order by a;
-delete from t1 where b > 5;
-select * from t1 order by a;
-delete from t1 where b <= 4;
-select * from t1 order by a;
-
-drop table t1;
-
-
-#
-#multi part key
-#
-CREATE TABLE t1 (
- a int unsigned NOT NULL PRIMARY KEY,
- b int unsigned not null,
- c int unsigned not null
-) engine = ndb;
-
-create index a1 on t1 (b, c);
-
-insert into t1 values (1, 2, 13);
-insert into t1 values (2,3, 13);
-insert into t1 values (3, 4, 12);
-insert into t1 values (4, 5, 12);
-insert into t1 values (5,6, 12);
-insert into t1 values (6,7, 12);
-insert into t1 values (7, 2, 1);
-insert into t1 values (8,3, 6);
-insert into t1 values (9, 4, 12);
-insert into t1 values (14, 5, 4);
-insert into t1 values (15,5,5);
-insert into t1 values (16,5, 6);
-insert into t1 values (17,4,4);
-insert into t1 values (18,1, 7);
-
-
-
-select * from t1 order by a;
-select * from t1 where b<=5 order by a;
-select * from t1 where b<=5 and c=0;
-insert into t1 values (19,4, 0);
-select * from t1 where b<=5 and c=0;
-select * from t1 where b=4 and c<=5 order by a;
-select * from t1 where b<=4 and c<=5 order by a;
-select * from t1 where b<=5 and c=0 or b<=5 and c=2;
-
-select count(*) from t1 where b = 0;
-select count(*) from t1 where b = 1;
-drop table t1;
-
-#
-# Indexing NULL values
-#
-
-CREATE TABLE t1 (
- a int unsigned NOT NULL PRIMARY KEY,
- b int unsigned,
- c int unsigned,
- KEY bc(b,c)
-) engine = ndb;
-
-insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL);
-select * from t1 use index (bc) where b IS NULL order by a;
-
-select * from t1 use index (bc)order by a;
-select * from t1 use index (bc) order by a;
-select * from t1 use index (PRIMARY) where b IS NULL order by a;
-select * from t1 use index (bc) where b IS NULL order by a;
-select * from t1 use index (bc) where b IS NULL and c IS NULL order by a;
-select * from t1 use index (bc) where b IS NULL and c = 2 order by a;
-select * from t1 use index (bc) where b < 4 order by a;
-select * from t1 use index (bc) where b IS NOT NULL order by a;
-drop table t1;
-
-#
-# Order by again, including descending.
-#
-
-create table t1 (
- a int unsigned primary key,
- b int unsigned,
- c char(10),
- key bc (b, c)
-) engine=ndb;
-
-insert into t1 values(1,1,'a'),(2,2,'b'),(3,3,'c'),(4,4,'d'),(5,5,'e');
-insert into t1 select a*7,10*b,'f' from t1;
-insert into t1 select a*13,10*b,'g' from t1;
-insert into t1 select a*17,10*b,'h' from t1;
-insert into t1 select a*19,10*b,'i' from t1;
-insert into t1 select a*23,10*b,'j' from t1;
-insert into t1 select a*29,10*b,'k' from t1;
-#
-select b, c from t1 where b <= 10 and c <'f' order by b, c;
-select b, c from t1 where b <= 10 and c <'f' order by b desc, c desc;
-#
-select b, c from t1 where b=4000 and c<'k' order by b, c;
-select b, c from t1 where b=4000 and c<'k' order by b desc, c desc;
-select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b, c;
-select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b desc, c desc;
-#
-select min(b), max(b) from t1;
-#
-drop table t1;
-
-#
-# Bug #6435
-CREATE TABLE test1 (
-SubscrID int(11) NOT NULL auto_increment,
-UsrID int(11) NOT NULL default '0',
-PRIMARY KEY (SubscrID),
-KEY idx_usrid (UsrID)
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
-
-INSERT INTO test1 VALUES (2,224),(3,224),(1,224);
-
-CREATE TABLE test2 (
-SbclID int(11) NOT NULL auto_increment,
-SbcrID int(11) NOT NULL default '0',
-PRIMARY KEY (SbclID),
-KEY idx_sbcrid (SbcrID)
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
-
-INSERT INTO test2 VALUES (3,2),(1,1),(2,1),(4,2);
-select * from test1 order by 1;
-select * from test2 order by 1;
-SELECT s.SubscrID,l.SbclID FROM test1 s left JOIN test2 l ON
-l.SbcrID=s.SubscrID WHERE s.UsrID=224 order by 1, 2;
-drop table test1;
-drop table test2;
-
-# bug#7424 + bug#7725
-
-create table t1 (
- pk int primary key,
- dt datetime not null,
- da date not null,
- ye year not null,
- ti time not null,
- ts timestamp not null,
- index(dt),
- index(da),
- index(ye),
- index(ti),
- index(ts)
-) engine=ndb;
-
-insert into t1 (pk,dt,da,ye,ti,ts) values
- (1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59', '2001-01-01 23:00:59'),
- (2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59', '2001-01-01 13:00:59'),
- (3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00', '2001-01-01 00:00:00'),
- (4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00', '2001-01-01 00:00:00'),
- (5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06', '2001-01-01 06:06:06'),
- (6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06', '2001-01-01 06:06:06'),
- (7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10', '2001-01-01 10:11:10'),
- (8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11', '2001-01-01 10:11:11'),
- (9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59', '2001-01-01 23:59:59');
-
-# datetime
-select count(*)-9 from t1 use index (dt) where dt > '1900-01-01 00:00:00';
-select count(*)-6 from t1 use index (dt) where dt >= '1955-12-31 00:00:00';
-select count(*)-5 from t1 use index (dt) where dt > '1955-12-31 00:00:00';
-select count(*)-5 from t1 use index (dt) where dt < '1970-03-03 22:22:22';
-select count(*)-7 from t1 use index (dt) where dt < '2001-01-01 10:11:11';
-select count(*)-8 from t1 use index (dt) where dt <= '2001-01-01 10:11:11';
-select count(*)-9 from t1 use index (dt) where dt <= '2055-01-01 00:00:00';
-
-# date
-select count(*)-9 from t1 use index (da) where da > '1900-01-01';
-select count(*)-6 from t1 use index (da) where da >= '1955-12-31';
-select count(*)-5 from t1 use index (da) where da > '1955-12-31';
-select count(*)-5 from t1 use index (da) where da < '1970-03-03';
-select count(*)-6 from t1 use index (da) where da < '2001-01-01';
-select count(*)-8 from t1 use index (da) where da <= '2001-01-02';
-select count(*)-9 from t1 use index (da) where da <= '2055-01-01';
-
-# year
-select count(*)-9 from t1 use index (ye) where ye > '1900';
-select count(*)-6 from t1 use index (ye) where ye >= '1955';
-select count(*)-5 from t1 use index (ye) where ye > '1955';
-select count(*)-5 from t1 use index (ye) where ye < '1970';
-select count(*)-6 from t1 use index (ye) where ye < '2001';
-select count(*)-8 from t1 use index (ye) where ye <= '2001';
-select count(*)-9 from t1 use index (ye) where ye <= '2055';
-
-# time
-select count(*)-9 from t1 use index (ti) where ti >= '00:00:00';
-select count(*)-7 from t1 use index (ti) where ti > '00:00:00';
-select count(*)-7 from t1 use index (ti) where ti > '05:05:05';
-select count(*)-5 from t1 use index (ti) where ti > '06:06:06';
-select count(*)-5 from t1 use index (ti) where ti < '10:11:11';
-select count(*)-6 from t1 use index (ti) where ti <= '10:11:11';
-select count(*)-8 from t1 use index (ti) where ti < '23:59:59';
-select count(*)-9 from t1 use index (ti) where ti <= '23:59:59';
-
-# timestamp
-select count(*)-9 from t1 use index (ts) where ts >= '2001-01-01 00:00:00';
-select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 00:00:00';
-select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 05:05:05';
-select count(*)-5 from t1 use index (ts) where ts > '2001-01-01 06:06:06';
-select count(*)-5 from t1 use index (ts) where ts < '2001-01-01 10:11:11';
-select count(*)-6 from t1 use index (ts) where ts <= '2001-01-01 10:11:11';
-select count(*)-8 from t1 use index (ts) where ts < '2001-01-01 23:59:59';
-select count(*)-9 from t1 use index (ts) where ts <= '2001-01-01 23:59:59';
-
-drop table t1;
-
-# decimal (not the new 5.0 thing)
-
-create table t1 (
- a int primary key,
- s decimal(12),
- t decimal(12, 5),
- u decimal(12) unsigned,
- v decimal(12, 5) unsigned,
- key (s),
- key (t),
- key (u),
- key (v)
-) engine=ndb;
-#
-insert into t1 values
- ( 0, -000000000007, -0000061.00003, 000000000061, 0000965.00042),
- ( 1, -000000000007, -0000061.00042, 000000000061, 0000965.00003),
- ( 2, -071006035767, 4210253.00024, 000000000001, 0000001.84488),
- ( 3, 000000007115, 0000000.77607, 000077350625, 0000018.00013),
- ( 4, -000000068391, -0346486.00000, 000000005071, 0005334.00002),
- ( 5, -521579890459, -1936874.00001, 000000000154, 0000003.00018),
- ( 6, -521579890459, -1936874.00018, 000000000154, 0000003.00001),
- ( 7, 000000000333, 0000051.39140, 000000907958, 0788643.08374),
- ( 8, 000042731229, 0000009.00000, 000000000009, 6428667.00000),
- ( 9, -000008159769, 0000918.00004, 000096951421, 7607730.00008);
-#
-select count(*)- 5 from t1 use index (s) where s < -000000000007;
-select count(*)- 7 from t1 use index (s) where s <= -000000000007;
-select count(*)- 2 from t1 use index (s) where s = -000000000007;
-select count(*)- 5 from t1 use index (s) where s >= -000000000007;
-select count(*)- 3 from t1 use index (s) where s > -000000000007;
-#
-select count(*)- 4 from t1 use index (t) where t < -0000061.00003;
-select count(*)- 5 from t1 use index (t) where t <= -0000061.00003;
-select count(*)- 1 from t1 use index (t) where t = -0000061.00003;
-select count(*)- 6 from t1 use index (t) where t >= -0000061.00003;
-select count(*)- 5 from t1 use index (t) where t > -0000061.00003;
-#
-select count(*)- 2 from t1 use index (u) where u < 000000000061;
-select count(*)- 4 from t1 use index (u) where u <= 000000000061;
-select count(*)- 2 from t1 use index (u) where u = 000000000061;
-select count(*)- 8 from t1 use index (u) where u >= 000000000061;
-select count(*)- 6 from t1 use index (u) where u > 000000000061;
-#
-select count(*)- 5 from t1 use index (v) where v < 0000965.00042;
-select count(*)- 6 from t1 use index (v) where v <= 0000965.00042;
-select count(*)- 1 from t1 use index (v) where v = 0000965.00042;
-select count(*)- 5 from t1 use index (v) where v >= 0000965.00042;
-select count(*)- 4 from t1 use index (v) where v > 0000965.00042;
-
-drop table t1;
-
-#
-# Disabled due to WL#4284
-#
-# Needs to be reworked. It's not possible anymore to do a non-fast alter table
-# on a table that is being used by a pending transaction (transaction holds a
-# metadata lock on the table).
-#
-# bug#7798
-# create table t1(a int primary key, b int not null, c int, index(b));
-# insert into t1 values (1,1,1), (2,2,2);
-# connect (con1,localhost,root,,test);
-# connect (con2,localhost,root,,test);
-# connection con1;
-# set autocommit=0;
-# begin;
-# select count(*) from t1;
-# connection con2;
-# ALTER TABLE t1 ADD COLUMN c int
-# connection con1;
-# select a from t1 where b = 2;
-# show tables;
-# drop table t1;
-#
-
-# mysqld 5.0.13 crash, no bug#
-create table t1 (a int, c varchar(10),
- primary key using hash (a), index(c)) engine=ndb;
-insert into t1 (a, c) values (1,'aaa'),(3,'bbb');
-select count(*) from t1 where c<'bbb';
-drop table t1;
-
-# -- index statistics --
-
-set autocommit=1;
-show session variables like 'ndb_index_stat_%';
-
-set ndb_index_stat_enable = off;
-show session variables like 'ndb_index_stat_%';
-
-create table t1 (a int, b int, c varchar(10) not null,
- primary key using hash (a), index(b,c)) engine=ndb;
-insert into t1 values
- (1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'),
- (4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'),
- (7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc');
-select count(*) from t1 where b < 10;
-select count(*) from t1 where b >= 10 and c >= 'bbb';
-select count(*) from t1 where b > 10;
-select count(*) from t1 where b <= 20 and c < 'ccc';
-select count(*) from t1 where b = 20 and c = 'ccc';
-select count(*) from t1 where b > 20;
-select count(*) from t1 where b = 30 and c > 'aaa';
-select count(*) from t1 where b <= 20;
-select count(*) from t1 where b >= 20 and c > 'aaa';
-drop table t1;
-
-set ndb_index_stat_enable = on;
-set ndb_index_stat_cache_entries = 0;
-show session variables like 'ndb_index_stat_%';
-
-create table t1 (a int, b int, c varchar(10) not null,
- primary key using hash (a), index(b,c)) engine=ndb;
-insert into t1 values
- (1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'),
- (4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'),
- (7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc');
-select count(*) from t1 where b < 10;
-select count(*) from t1 where b >= 10 and c >= 'bbb';
-select count(*) from t1 where b > 10;
-select count(*) from t1 where b <= 20 and c < 'ccc';
-select count(*) from t1 where b = 20 and c = 'ccc';
-select count(*) from t1 where b > 20;
-select count(*) from t1 where b = 30 and c > 'aaa';
-select count(*) from t1 where b <= 20;
-select count(*) from t1 where b >= 20 and c > 'aaa';
-drop table t1;
-
-set ndb_index_stat_enable = on;
-set ndb_index_stat_cache_entries = 4;
-set ndb_index_stat_update_freq = 2;
-show session variables like 'ndb_index_stat_%';
-
-create table t1 (a int, b int, c varchar(10) not null,
- primary key using hash (a), index(b,c)) engine=ndb;
-insert into t1 values
- (1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'),
- (4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'),
- (7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc');
-select count(*) from t1 where b < 10;
-select count(*) from t1 where b >= 10 and c >= 'bbb';
-select count(*) from t1 where b > 10;
-select count(*) from t1 where b <= 20 and c < 'ccc';
-select count(*) from t1 where b = 20 and c = 'ccc';
-select count(*) from t1 where b > 20;
-select count(*) from t1 where b = 30 and c > 'aaa';
-select count(*) from t1 where b <= 20;
-select count(*) from t1 where b >= 20 and c > 'aaa';
-drop table t1;
-
-set ndb_index_stat_enable = @@global.ndb_index_stat_enable;
-set ndb_index_stat_cache_entries = @@global.ndb_index_stat_cache_entries;
-set ndb_index_stat_update_freq = @@global.ndb_index_stat_update_freq;
-show session variables like 'ndb_index_stat_%';
-
-# End of 4.1 tests
-
-# bug#24039
-
-create table t1 (a int primary key) engine = ndb;
-insert into t1 values (1), (2), (3);
-begin;
-delete from t1 where a > 1;
-rollback;
-select * from t1 order by a;
-begin;
-delete from t1 where a > 1;
-rollback;
-
-begin;
-select * from t1 order by a;
-delete from t1 where a > 2;
-select * from t1 order by a;
-delete from t1 where a > 1;
-select * from t1 order by a;
-delete from t1 where a > 0;
-select * from t1 order by a;
-rollback;
-select * from t1 order by a;
-delete from t1;
-drop table t1;
-
-# bug#24820 CREATE INDEX ....USING HASH on NDB table creates ordered index, not HASH index
-
---error ER_CANT_CREATE_TABLE
-create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT,
- CountryCode char(3) NOT NULL,
- DishTitle varchar(64) NOT NULL,
- calories smallint(5) unsigned DEFAULT NULL,
- PRIMARY KEY (DishID),
- INDEX i USING HASH (countrycode,calories)
- ) ENGINE=ndbcluster;
-
-create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT,
- CountryCode char(3) NOT NULL,
- DishTitle varchar(64) NOT NULL,
- calories smallint(5) unsigned DEFAULT NULL,
- PRIMARY KEY (DishID)
- ) ENGINE=ndbcluster;
-
---error ER_UNSUPPORTED_EXTENSION
-create index i on nationaldish(countrycode,calories) using hash;
-
-drop table nationaldish;
diff --git a/mysql-test/suite/ndb/t/ndb_index_unique.test b/mysql-test/suite/ndb/t/ndb_index_unique.test
deleted file mode 100644
index 9178ace1ad0..00000000000
--- a/mysql-test/suite/ndb/t/ndb_index_unique.test
+++ /dev/null
@@ -1,361 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-drop table if exists t1, t2, t3, t4, t5, t6, t7, t8;
---enable_warnings
-
-#
-# Simple test to show use of UNIQUE indexes
-#
-
-CREATE TABLE t1 (
- a int NOT NULL PRIMARY KEY,
- b int not null,
- c int,
- UNIQUE ib(b)
-) engine=ndbcluster;
-
-insert t1 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2);
-select * from t1 order by b;
-select * from t1 where b = 4 order by b;
-insert into t1 values(7,8,3);
-select * from t1 where b = 4 order by a;
-
--- error ER_DUP_ENTRY
-insert into t1 values(8, 2, 3);
-select * from t1 order by a;
-delete from t1 where a = 1;
-insert into t1 values(8, 2, 3);
-select * from t1 order by a;
-
-alter table t1 drop index ib;
-insert into t1 values(1, 2, 3);
-# Bug# #18129
---error 1169
-create unique index ib on t1(b);
-
-drop table t1;
-
-#
-# Indexing NULL values
-#
-
-CREATE TABLE t1 (
- a int unsigned NOT NULL PRIMARY KEY,
- b int unsigned,
- c int unsigned,
- UNIQUE bc(b,c)
-) engine = ndb;
-
-insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL);
-select * from t1 use index (bc) where b IS NULL order by a;
-
-select * from t1 use index (bc)order by a;
-select * from t1 use index (bc) order by a;
-select * from t1 use index (PRIMARY) where b IS NULL order by a;
-select * from t1 use index (bc) where b IS NULL order by a;
-select * from t1 use index (bc) where b IS NULL and c IS NULL order by a;
-select * from t1 use index (bc) where b IS NULL and c = 2 order by a;
-select * from t1 use index (bc) where b < 4 order by a;
-select * from t1 use index (bc) where b IS NOT NULL order by a;
--- error ER_DUP_ENTRY
-insert into t1 values(5,1,1);
-drop table t1;
-
-
-#
-# Show use of UNIQUE USING HASH indexes
-#
-
-CREATE TABLE t2 (
- a int unsigned NOT NULL PRIMARY KEY,
- b int unsigned not null,
- c int unsigned not null,
- UNIQUE (b, c) USING HASH
-) engine=ndbcluster;
-
-insert t2 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2);
-select * from t2 where a = 3;
-select * from t2 where b = 4;
-select * from t2 where c = 6;
-insert into t2 values(7,8,3);
-select * from t2 where b = 4 order by a;
-
--- error ER_DUP_ENTRY
-insert into t2 values(8, 2, 3);
-select * from t2 order by a;
-delete from t2 where a = 1;
-insert into t2 values(8, 2, 3);
-select * from t2 order by a;
-
-# Bug #24818 CREATE UNIQUE INDEX (...) USING HASH on a NDB table crashes mysqld
-create unique index bi using hash on t2(b);
--- error ER_DUP_ENTRY
-insert into t2 values(9, 3, 1);
-alter table t2 drop index bi;
-insert into t2 values(9, 3, 1);
-select * from t2 order by a;
-
-drop table t2;
-
-CREATE TABLE t2 (
- a int unsigned NOT NULL PRIMARY KEY,
- b int unsigned not null,
- c int unsigned,
- UNIQUE (b, c) USING HASH
-) engine=ndbcluster;
-
-
-insert t2 values(1,1,NULL),(2,2,2),(3,3,NULL),(4,4,4),(5,5,NULL),(6,6,6),(7,7,NULL),(8,3,NULL),(9,3,NULL);
-
-select * from t2 where c IS NULL order by a;
-select * from t2 where b = 3 AND c IS NULL order by a;
-select * from t2 where (b = 3 OR b = 5) AND c IS NULL order by a;
-set @old_optimizer_switch = @@session.optimizer_switch;
-set optimizer_switch = "engine_condition_pushdown=on";
-explain select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a;
-select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a;
-set optimizer_switch = @old_optimizer_switch;
-
-drop table t2;
-
-#
-# Show use of PRIMARY KEY USING HASH indexes
-#
-
-CREATE TABLE t3 (
- a int unsigned NOT NULL,
- b int unsigned not null,
- c int unsigned,
- PRIMARY KEY (a, b) USING HASH
-) engine=ndbcluster;
-
-insert t3 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2);
-select * from t3 where a = 3;
-select * from t3 where b = 4;
-select * from t3 where c = 6;
-insert into t3 values(7,8,3);
-select * from t3 where b = 4 order by a;
-
-drop table t3;
-
-#
-# Indexes on NULL-able columns
-#
-
-CREATE TABLE t1 (
- pk int NOT NULL PRIMARY KEY,
- a int unsigned,
- UNIQUE KEY (a)
-) engine=ndbcluster;
-
-insert into t1 values (-1,NULL), (0,0), (1,NULL),(2,2),(3,NULL),(4,4);
-
-select * from t1 order by pk;
-
---error ER_DUP_ENTRY
-insert into t1 values (5,0);
-select * from t1 order by pk;
-delete from t1 where a = 0;
-insert into t1 values (5,0);
-select * from t1 order by pk;
-
-CREATE TABLE t2 (
- pk int NOT NULL PRIMARY KEY,
- a int unsigned,
- b tinyint NOT NULL,
- c VARCHAR(10),
- UNIQUE KEY si(a, c)
-) engine=ndbcluster;
-
-insert into t2 values (-1,1,17,NULL),(0,NULL,18,NULL),(1,3,19,'abc');
-
-select * from t2 order by pk;
-
---error ER_DUP_ENTRY
-insert into t2 values(2,3,19,'abc');
-select * from t2 order by pk;
-delete from t2 where c IS NOT NULL;
-insert into t2 values(2,3,19,'abc');
-select * from t2 order by pk;
-
-drop table t1, t2;
-
-#
-# More complex tables
-#
-
-CREATE TABLE t1 (
- cid smallint(5) unsigned NOT NULL default '0',
- cv varchar(250) NOT NULL default '',
- PRIMARY KEY (cid),
- UNIQUE KEY cv (cv)
-) engine=ndbcluster;
-INSERT INTO t1 VALUES (8,'dummy');
-CREATE TABLE t2 (
- cid bigint(20) unsigned NOT NULL auto_increment,
- cap varchar(255) NOT NULL default '',
- PRIMARY KEY (cid),
- UNIQUE KEY (cid, cap)
-) engine=ndbcluster;
-INSERT INTO t2 VALUES (NULL,'another dummy');
-CREATE TABLE t3 (
- gid bigint(20) unsigned NOT NULL auto_increment,
- gn varchar(255) NOT NULL default '',
- must tinyint(4) default NULL,
- PRIMARY KEY (gid)
-) engine=ndbcluster;
-INSERT INTO t3 VALUES (1,'V1',NULL);
-CREATE TABLE t4 (
- uid bigint(20) unsigned NOT NULL default '0',
- gid bigint(20) unsigned NOT NULL,
- rid bigint(20) unsigned NOT NULL,
- cid bigint(20) unsigned NOT NULL,
- UNIQUE KEY m (uid,gid,rid,cid)
-) engine=ndbcluster;
-INSERT INTO t4 VALUES (1,1,2,4);
-INSERT INTO t4 VALUES (1,1,2,3);
-INSERT INTO t4 VALUES (1,1,5,7);
-INSERT INTO t4 VALUES (1,1,10,8);
-CREATE TABLE t5 (
- rid bigint(20) unsigned NOT NULL auto_increment,
- rl varchar(255) NOT NULL default '',
- PRIMARY KEY (rid)
-) engine=ndbcluster;
-CREATE TABLE t6 (
- uid bigint(20) unsigned NOT NULL auto_increment,
- un varchar(250) NOT NULL default '',
- uc smallint(5) unsigned NOT NULL default '0',
- PRIMARY KEY (uid),
- UNIQUE KEY nc (un,uc)
-) engine=ndbcluster;
-INSERT INTO t6 VALUES (1,'test',8);
-INSERT INTO t6 VALUES (2,'test2',9);
-INSERT INTO t6 VALUES (3,'tre',3);
-CREATE TABLE t7 (
- mid bigint(20) unsigned NOT NULL PRIMARY KEY,
- uid bigint(20) unsigned NOT NULL default '0',
- gid bigint(20) unsigned NOT NULL,
- rid bigint(20) unsigned NOT NULL,
- cid bigint(20) unsigned NOT NULL,
- UNIQUE KEY m (uid,gid,rid,cid)
-) engine=ndbcluster;
-INSERT INTO t7 VALUES(1, 1, 1, 1, 1);
-INSERT INTO t7 VALUES(2, 2, 1, 1, 1);
-INSERT INTO t7 VALUES(3, 3, 1, 1, 1);
-INSERT INTO t7 VALUES(4, 4, 1, 1, 1);
-INSERT INTO t7 VALUES(5, 5, 1, 1, 1);
-INSERT INTO t7 VALUES(6, 1, 1, 1, 6);
-INSERT INTO t7 VALUES(7, 2, 1, 1, 7);
-INSERT INTO t7 VALUES(8, 3, 1, 1, 8);
-INSERT INTO t7 VALUES(9, 4, 1, 1, 9);
-INSERT INTO t7 VALUES(10, 5, 1, 1, 10);
-
-select * from t1 where cv = 'dummy';
-select * from t1 where cv = 'test';
-select * from t2 where cap = 'another dummy';
-select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4;
-select * from t4 where uid = 1 and gid=1 and rid=1 and cid=4;
-select * from t4 where uid = 1 order by cid;
-select * from t4 where rid = 2 order by cid;
-select * from t6 where un='test' and uc=8;
-select * from t6 where un='test' and uc=7;
-select * from t6 where un='test';
-select * from t7 where mid = 8;
-select * from t7 where uid = 8;
-select * from t7 where uid = 1 order by mid;
-select * from t7 where uid = 4 order by mid;
-select * from t7 where gid = 4;
-select * from t7 where gid = 1 order by mid;
-select * from t7 where cid = 4;
-select * from t7 where cid = 8;
-
-#
-# insert more records into t4
-#
-let $1=100;
-disable_query_log;
-while ($1)
-{
- eval insert into t4 values(1, $1, 5, 12);
- eval insert into t4 values($1, 3, 9, 11);
- dec $1;
-}
-enable_query_log;
-
-select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4;
-select * from t4 where uid = 1 and gid=1 and rid=1 and cid=4;
-select * from t4 where uid = 1 order by gid,cid;
-select * from t4 where uid = 1 order by gid,cid;
-select * from t4 where rid = 2 order by cid;
-
-
-drop table t1,t2,t3,t4,t5,t6,t7;
-
-# test null in indexes
-CREATE TABLE t1 (
- a int unsigned NOT NULL PRIMARY KEY,
- b int unsigned,
- c int unsigned,
- UNIQUE bc(b,c) ) engine = ndb;
-
-insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL);
-select * from t1 where b=1 and c=1;
-select * from t1 where b is null and c is null;
-select * from t1 where b is null and c = 2;
-select * from t1 where b = 4 and c is null;
-create table t8 as
-select * from t1 where (b = 1 and c = 1)
- or (b is null and c is null)
- or (b is null and c = 2)
- or (b = 4 and c is null);
-select * from t8 order by a;
-select * from t1 order by a;
-drop table t1, t8;
-
-###############################
-# Bug 8101
-#
-# Unique index not specified in the same order as in table
-#
-
-create table t1(
- id integer not null auto_increment,
- month integer not null,
- year integer not null,
- code varchar( 2) not null,
- primary key ( id),
- unique idx_t1( month, code, year)
-) engine=ndb;
-
-INSERT INTO t1 (month, year, code) VALUES (4,2004,'12');
-INSERT INTO t1 (month, year, code) VALUES (5,2004,'12');
-
-select * from t1 where code = '12' and month = 4 and year = 2004 ;
-
-drop table t1;
-
-# bug#15918 Unique Key Limit in NDB Engine
-
-create table t1 (a int primary key, b varchar(1000) not null, unique key (b))
-engine=ndb charset=utf8;
-
-insert into t1 values (1, repeat(_utf8 0xe288ab6474, 200));
---error ER_DUP_ENTRY
-insert into t1 values (2, repeat(_utf8 0xe288ab6474, 200));
-select a, sha1(b) from t1;
-
-# perl -e 'print pack("H2000","e288ab6474"x200)' | sha1sum
-
-drop table t1;
-
-# bug#21873 MySQLD Crash on ALTER...ADD..UNIQUE..USING HASH statement for NDB backed table
-
-create table t1(id int not null) engine = NDB;
-
-alter table t1 add constraint uk_test unique (id) using hash;
-
-drop table t1;
-
-# End of 4.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_insert.test b/mysql-test/suite/ndb/t/ndb_insert.test
deleted file mode 100644
index d659f8357f2..00000000000
--- a/mysql-test/suite/ndb/t/ndb_insert.test
+++ /dev/null
@@ -1,641 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-#
-# Basic test of INSERT in NDB
-#
-
-#
-# Create a normal table with primary key
-#
-CREATE TABLE t1 (
- pk1 INT NOT NULL PRIMARY KEY,
- b INT NOT NULL,
- c INT NOT NULL
-) ENGINE=ndbcluster;
-
-INSERT INTO t1 VALUES (0, 0, 0);
-SELECT * FROM t1;
-
-INSERT INTO t1 VALUES
-(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
-(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10),
-(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15),
-(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20),
-(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25),
-(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30),
-(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35),
-(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40),
-(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45),
-(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50),
-(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55),
-(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60),
-(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65),
-(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70),
-(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75),
-(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80),
-(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85),
-(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90),
-(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95),
-(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100),
-(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105),
-(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110),
-(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115),
-(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120),
-(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125),
-(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130),
-(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135),
-(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140),
-(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145),
-(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150),
-(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155),
-(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160),
-(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165),
-(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170),
-(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175),
-(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180),
-(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185),
-(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190),
-(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195),
-(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200),
-(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205),
-(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210),
-(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215),
-(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220),
-(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225),
-(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230),
-(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235),
-(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240),
-(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245),
-(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250),
-(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255),
-(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260),
-(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265),
-(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270),
-(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275),
-(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280),
-(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285),
-(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290),
-(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295),
-(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300),
-(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305),
-(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310),
-(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315),
-(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320),
-(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325),
-(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330),
-(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335),
-(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340),
-(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345),
-(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350),
-(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355),
-(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360),
-(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365),
-(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370),
-(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375),
-(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380),
-(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385),
-(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390),
-(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395),
-(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400),
-(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405),
-(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410),
-(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415),
-(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420),
-(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425),
-(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430),
-(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435),
-(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440),
-(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445),
-(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450),
-(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455),
-(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460),
-(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465),
-(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470),
-(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475),
-(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480),
-(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485),
-(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490),
-(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495),
-(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500);
-
-SELECT COUNT(*) FROM t1;
-
-INSERT INTO t1 VALUES
-(501,501,501),(502,502,502),(503,503,503),(504,504,504),(505,505,505),
-(506,506,506),(507,507,507),(508,508,508),(509,509,509),(510,510,510),
-(511,511,511),(512,512,512),(513,513,513),(514,514,514),(515,515,515),
-(516,516,516),(517,517,517),(518,518,518),(519,519,519),(520,520,520),
-(521,521,521),(522,522,522),(523,523,523),(524,524,524),(525,525,525),
-(526,526,526),(527,527,527),(528,528,528),(529,529,529),(530,530,530),
-(531,531,531),(532,532,532),(533,533,533),(534,534,534),(535,535,535),
-(536,536,536),(537,537,537),(538,538,538),(539,539,539),(540,540,540),
-(541,541,541),(542,542,542),(543,543,543),(544,544,544),(545,545,545),
-(546,546,546),(547,547,547),(548,548,548),(549,549,549),(550,550,550),
-(551,551,551),(552,552,552),(553,553,553),(554,554,554),(555,555,555),
-(556,556,556),(557,557,557),(558,558,558),(559,559,559),(560,560,560),
-(561,561,561),(562,562,562),(563,563,563),(564,564,564),(565,565,565),
-(566,566,566),(567,567,567),(568,568,568),(569,569,569),(570,570,570),
-(571,571,571),(572,572,572),(573,573,573),(574,574,574),(575,575,575),
-(576,576,576),(577,577,577),(578,578,578),(579,579,579),(580,580,580),
-(581,581,581),(582,582,582),(583,583,583),(584,584,584),(585,585,585),
-(586,586,586),(587,587,587),(588,588,588),(589,589,589),(590,590,590),
-(591,591,591),(592,592,592),(593,593,593),(594,594,594),(595,595,595),
-(596,596,596),(597,597,597),(598,598,598),(599,599,599),(600,600,600),
-(601,601,601),(602,602,602),(603,603,603),(604,604,604),(605,605,605),
-(606,606,606),(607,607,607),(608,608,608),(609,609,609),(610,610,610),
-(611,611,611),(612,612,612),(613,613,613),(614,614,614),(615,615,615),
-(616,616,616),(617,617,617),(618,618,618),(619,619,619),(620,620,620),
-(621,621,621),(622,622,622),(623,623,623),(624,624,624),(625,625,625),
-(626,626,626),(627,627,627),(628,628,628),(629,629,629),(630,630,630),
-(631,631,631),(632,632,632),(633,633,633),(634,634,634),(635,635,635),
-(636,636,636),(637,637,637),(638,638,638),(639,639,639),(640,640,640),
-(641,641,641),(642,642,642),(643,643,643),(644,644,644),(645,645,645),
-(646,646,646),(647,647,647),(648,648,648),(649,649,649),(650,650,650),
-(651,651,651),(652,652,652),(653,653,653),(654,654,654),(655,655,655),
-(656,656,656),(657,657,657),(658,658,658),(659,659,659),(660,660,660),
-(661,661,661),(662,662,662),(663,663,663),(664,664,664),(665,665,665),
-(666,666,666),(667,667,667),(668,668,668),(669,669,669),(670,670,670),
-(671,671,671),(672,672,672),(673,673,673),(674,674,674),(675,675,675),
-(676,676,676),(677,677,677),(678,678,678),(679,679,679),(680,680,680),
-(681,681,681),(682,682,682),(683,683,683),(684,684,684),(685,685,685),
-(686,686,686),(687,687,687),(688,688,688),(689,689,689),(690,690,690),
-(691,691,691),(692,692,692),(693,693,693),(694,694,694),(695,695,695),
-(696,696,696),(697,697,697),(698,698,698),(699,699,699),(700,700,700),
-(701,701,701),(702,702,702),(703,703,703),(704,704,704),(705,705,705),
-(706,706,706),(707,707,707),(708,708,708),(709,709,709),(710,710,710),
-(711,711,711),(712,712,712),(713,713,713),(714,714,714),(715,715,715),
-(716,716,716),(717,717,717),(718,718,718),(719,719,719),(720,720,720),
-(721,721,721),(722,722,722),(723,723,723),(724,724,724),(725,725,725),
-(726,726,726),(727,727,727),(728,728,728),(729,729,729),(730,730,730),
-(731,731,731),(732,732,732),(733,733,733),(734,734,734),(735,735,735),
-(736,736,736),(737,737,737),(738,738,738),(739,739,739),(740,740,740),
-(741,741,741),(742,742,742),(743,743,743),(744,744,744),(745,745,745),
-(746,746,746),(747,747,747),(748,748,748),(749,749,749),(750,750,750),
-(751,751,751),(752,752,752),(753,753,753),(754,754,754),(755,755,755),
-(756,756,756),(757,757,757),(758,758,758),(759,759,759),(760,760,760),
-(761,761,761),(762,762,762),(763,763,763),(764,764,764),(765,765,765),
-(766,766,766),(767,767,767),(768,768,768),(769,769,769),(770,770,770),
-(771,771,771),(772,772,772),(773,773,773),(774,774,774),(775,775,775),
-(776,776,776),(777,777,777),(778,778,778),(779,779,779),(780,780,780),
-(781,781,781),(782,782,782),(783,783,783),(784,784,784),(785,785,785),
-(786,786,786),(787,787,787),(788,788,788),(789,789,789),(790,790,790),
-(791,791,791),(792,792,792),(793,793,793),(794,794,794),(795,795,795),
-(796,796,796),(797,797,797),(798,798,798),(799,799,799),(800,800,800),
-(801,801,801),(802,802,802),(803,803,803),(804,804,804),(805,805,805),
-(806,806,806),(807,807,807),(808,808,808),(809,809,809),(810,810,810),
-(811,811,811),(812,812,812),(813,813,813),(814,814,814),(815,815,815),
-(816,816,816),(817,817,817),(818,818,818),(819,819,819),(820,820,820),
-(821,821,821),(822,822,822),(823,823,823),(824,824,824),(825,825,825),
-(826,826,826),(827,827,827),(828,828,828),(829,829,829),(830,830,830),
-(831,831,831),(832,832,832),(833,833,833),(834,834,834),(835,835,835),
-(836,836,836),(837,837,837),(838,838,838),(839,839,839),(840,840,840),
-(841,841,841),(842,842,842),(843,843,843),(844,844,844),(845,845,845),
-(846,846,846),(847,847,847),(848,848,848),(849,849,849),(850,850,850),
-(851,851,851),(852,852,852),(853,853,853),(854,854,854),(855,855,855),
-(856,856,856),(857,857,857),(858,858,858),(859,859,859),(860,860,860),
-(861,861,861),(862,862,862),(863,863,863),(864,864,864),(865,865,865),
-(866,866,866),(867,867,867),(868,868,868),(869,869,869),(870,870,870),
-(871,871,871),(872,872,872),(873,873,873),(874,874,874),(875,875,875),
-(876,876,876),(877,877,877),(878,878,878),(879,879,879),(880,880,880),
-(881,881,881),(882,882,882),(883,883,883),(884,884,884),(885,885,885),
-(886,886,886),(887,887,887),(888,888,888),(889,889,889),(890,890,890),
-(891,891,891),(892,892,892),(893,893,893),(894,894,894),(895,895,895),
-(896,896,896),(897,897,897),(898,898,898),(899,899,899),(900,900,900),
-(901,901,901),(902,902,902),(903,903,903),(904,904,904),(905,905,905),
-(906,906,906),(907,907,907),(908,908,908),(909,909,909),(910,910,910),
-(911,911,911),(912,912,912),(913,913,913),(914,914,914),(915,915,915),
-(916,916,916),(917,917,917),(918,918,918),(919,919,919),(920,920,920),
-(921,921,921),(922,922,922),(923,923,923),(924,924,924),(925,925,925),
-(926,926,926),(927,927,927),(928,928,928),(929,929,929),(930,930,930),
-(931,931,931),(932,932,932),(933,933,933),(934,934,934),(935,935,935),
-(936,936,936),(937,937,937),(938,938,938),(939,939,939),(940,940,940),
-(941,941,941),(942,942,942),(943,943,943),(944,944,944),(945,945,945),
-(946,946,946),(947,947,947),(948,948,948),(949,949,949),(950,950,950),
-(951,951,951),(952,952,952),(953,953,953),(954,954,954),(955,955,955),
-(956,956,956),(957,957,957),(958,958,958),(959,959,959),(960,960,960),
-(961,961,961),(962,962,962),(963,963,963),(964,964,964),(965,965,965),
-(966,966,966),(967,967,967),(968,968,968),(969,969,969),(970,970,970),
-(971,971,971),(972,972,972),(973,973,973),(974,974,974),(975,975,975),
-(976,976,976),(977,977,977),(978,978,978),(979,979,979),(980,980,980),
-(981,981,981),(982,982,982),(983,983,983),(984,984,984),(985,985,985),
-(986,986,986),(987,987,987),(988,988,988),(989,989,989),(990,990,990),
-(991,991,991),(992,992,992),(993,993,993),(994,994,994),(995,995,995),
-(996,996,996),(997,997,997),(998,998,998),(999,999,999),(1000,1000,1000),
-(1001,1001,1001),(1002,1002,1002),(1003,1003,1003),(1004,1004,1004),(1005,1005,1005),
-(1006,1006,1006),(1007,1007,1007),(1008,1008,1008),(1009,1009,1009),(1010,1010,1010),
-(1011,1011,1011),(1012,1012,1012),(1013,1013,1013),(1014,1014,1014),(1015,1015,1015),
-(1016,1016,1016),(1017,1017,1017),(1018,1018,1018),(1019,1019,1019),(1020,1020,1020),
-(1021,1021,1021),(1022,1022,1022),(1023,1023,1023),(1024,1024,1024),(1025,1025,1025),
-(1026,1026,1026),(1027,1027,1027),(1028,1028,1028),(1029,1029,1029),(1030,1030,1030),
-(1031,1031,1031),(1032,1032,1032),(1033,1033,1033),(1034,1034,1034),(1035,1035,1035),
-(1036,1036,1036),(1037,1037,1037),(1038,1038,1038),(1039,1039,1039),(1040,1040,1040),
-(1041,1041,1041),(1042,1042,1042),(1043,1043,1043),(1044,1044,1044),(1045,1045,1045),
-(1046,1046,1046),(1047,1047,1047),(1048,1048,1048),(1049,1049,1049),(1050,1050,1050),
-(1051,1051,1051),(1052,1052,1052),(1053,1053,1053),(1054,1054,1054),(1055,1055,1055),
-(1056,1056,1056),(1057,1057,1057),(1058,1058,1058),(1059,1059,1059),(1060,1060,1060),
-(1061,1061,1061),(1062,1062,1062),(1063,1063,1063),(1064,1064,1064),(1065,1065,1065),
-(1066,1066,1066),(1067,1067,1067),(1068,1068,1068),(1069,1069,1069),(1070,1070,1070),
-(1071,1071,1071),(1072,1072,1072),(1073,1073,1073),(1074,1074,1074),(1075,1075,1075),
-(1076,1076,1076),(1077,1077,1077),(1078,1078,1078),(1079,1079,1079),(1080,1080,1080),
-(1081,1081,1081),(1082,1082,1082),(1083,1083,1083),(1084,1084,1084),(1085,1085,1085),
-(1086,1086,1086),(1087,1087,1087),(1088,1088,1088),(1089,1089,1089),(1090,1090,1090),
-(1091,1091,1091),(1092,1092,1092),(1093,1093,1093),(1094,1094,1094),(1095,1095,1095),
-(1096,1096,1096),(1097,1097,1097),(1098,1098,1098),(1099,1099,1099),(1100,1100,1100),
-(1101,1101,1101),(1102,1102,1102),(1103,1103,1103),(1104,1104,1104),(1105,1105,1105),
-(1106,1106,1106),(1107,1107,1107),(1108,1108,1108),(1109,1109,1109),(1110,1110,1110),
-(1111,1111,1111),(1112,1112,1112),(1113,1113,1113),(1114,1114,1114),(1115,1115,1115),
-(1116,1116,1116),(1117,1117,1117),(1118,1118,1118),(1119,1119,1119),(1120,1120,1120),
-(1121,1121,1121),(1122,1122,1122),(1123,1123,1123),(1124,1124,1124),(1125,1125,1125),
-(1126,1126,1126),(1127,1127,1127),(1128,1128,1128),(1129,1129,1129),(1130,1130,1130),
-(1131,1131,1131),(1132,1132,1132),(1133,1133,1133),(1134,1134,1134),(1135,1135,1135),
-(1136,1136,1136),(1137,1137,1137),(1138,1138,1138),(1139,1139,1139),(1140,1140,1140),
-(1141,1141,1141),(1142,1142,1142),(1143,1143,1143),(1144,1144,1144),(1145,1145,1145),
-(1146,1146,1146),(1147,1147,1147),(1148,1148,1148),(1149,1149,1149),(1150,1150,1150),
-(1151,1151,1151),(1152,1152,1152),(1153,1153,1153),(1154,1154,1154),(1155,1155,1155),
-(1156,1156,1156),(1157,1157,1157),(1158,1158,1158),(1159,1159,1159),(1160,1160,1160),
-(1161,1161,1161),(1162,1162,1162),(1163,1163,1163),(1164,1164,1164),(1165,1165,1165),
-(1166,1166,1166),(1167,1167,1167),(1168,1168,1168),(1169,1169,1169),(1170,1170,1170),
-(1171,1171,1171),(1172,1172,1172),(1173,1173,1173),(1174,1174,1174),(1175,1175,1175),
-(1176,1176,1176),(1177,1177,1177),(1178,1178,1178),(1179,1179,1179),(1180,1180,1180),
-(1181,1181,1181),(1182,1182,1182),(1183,1183,1183),(1184,1184,1184),(1185,1185,1185),
-(1186,1186,1186),(1187,1187,1187),(1188,1188,1188),(1189,1189,1189),(1190,1190,1190),
-(1191,1191,1191),(1192,1192,1192),(1193,1193,1193),(1194,1194,1194),(1195,1195,1195),
-(1196,1196,1196),(1197,1197,1197),(1198,1198,1198),(1199,1199,1199),(1200,1200,1200),
-(1201,1201,1201),(1202,1202,1202),(1203,1203,1203),(1204,1204,1204),(1205,1205,1205),
-(1206,1206,1206),(1207,1207,1207),(1208,1208,1208),(1209,1209,1209),(1210,1210,1210),
-(1211,1211,1211),(1212,1212,1212),(1213,1213,1213),(1214,1214,1214),(1215,1215,1215),
-(1216,1216,1216),(1217,1217,1217),(1218,1218,1218),(1219,1219,1219),(1220,1220,1220),
-(1221,1221,1221),(1222,1222,1222),(1223,1223,1223),(1224,1224,1224),(1225,1225,1225),
-(1226,1226,1226),(1227,1227,1227),(1228,1228,1228),(1229,1229,1229),(1230,1230,1230),
-(1231,1231,1231),(1232,1232,1232),(1233,1233,1233),(1234,1234,1234),(1235,1235,1235),
-(1236,1236,1236),(1237,1237,1237),(1238,1238,1238),(1239,1239,1239),(1240,1240,1240),
-(1241,1241,1241),(1242,1242,1242),(1243,1243,1243),(1244,1244,1244),(1245,1245,1245),
-(1246,1246,1246),(1247,1247,1247),(1248,1248,1248),(1249,1249,1249),(1250,1250,1250),
-(1251,1251,1251),(1252,1252,1252),(1253,1253,1253),(1254,1254,1254),(1255,1255,1255),
-(1256,1256,1256),(1257,1257,1257),(1258,1258,1258),(1259,1259,1259),(1260,1260,1260),
-(1261,1261,1261),(1262,1262,1262),(1263,1263,1263),(1264,1264,1264),(1265,1265,1265),
-(1266,1266,1266),(1267,1267,1267),(1268,1268,1268),(1269,1269,1269),(1270,1270,1270),
-(1271,1271,1271),(1272,1272,1272),(1273,1273,1273),(1274,1274,1274),(1275,1275,1275),
-(1276,1276,1276),(1277,1277,1277),(1278,1278,1278),(1279,1279,1279),(1280,1280,1280),
-(1281,1281,1281),(1282,1282,1282),(1283,1283,1283),(1284,1284,1284),(1285,1285,1285),
-(1286,1286,1286),(1287,1287,1287),(1288,1288,1288),(1289,1289,1289),(1290,1290,1290),
-(1291,1291,1291),(1292,1292,1292),(1293,1293,1293),(1294,1294,1294),(1295,1295,1295),
-(1296,1296,1296),(1297,1297,1297),(1298,1298,1298),(1299,1299,1299),(1300,1300,1300),
-(1301,1301,1301),(1302,1302,1302),(1303,1303,1303),(1304,1304,1304),(1305,1305,1305),
-(1306,1306,1306),(1307,1307,1307),(1308,1308,1308),(1309,1309,1309),(1310,1310,1310),
-(1311,1311,1311),(1312,1312,1312),(1313,1313,1313),(1314,1314,1314),(1315,1315,1315),
-(1316,1316,1316),(1317,1317,1317),(1318,1318,1318),(1319,1319,1319),(1320,1320,1320),
-(1321,1321,1321),(1322,1322,1322),(1323,1323,1323),(1324,1324,1324),(1325,1325,1325),
-(1326,1326,1326),(1327,1327,1327),(1328,1328,1328),(1329,1329,1329),(1330,1330,1330),
-(1331,1331,1331),(1332,1332,1332),(1333,1333,1333),(1334,1334,1334),(1335,1335,1335),
-(1336,1336,1336),(1337,1337,1337),(1338,1338,1338),(1339,1339,1339),(1340,1340,1340),
-(1341,1341,1341),(1342,1342,1342),(1343,1343,1343),(1344,1344,1344),(1345,1345,1345),
-(1346,1346,1346),(1347,1347,1347),(1348,1348,1348),(1349,1349,1349),(1350,1350,1350),
-(1351,1351,1351),(1352,1352,1352),(1353,1353,1353),(1354,1354,1354),(1355,1355,1355),
-(1356,1356,1356),(1357,1357,1357),(1358,1358,1358),(1359,1359,1359),(1360,1360,1360),
-(1361,1361,1361),(1362,1362,1362),(1363,1363,1363),(1364,1364,1364),(1365,1365,1365),
-(1366,1366,1366),(1367,1367,1367),(1368,1368,1368),(1369,1369,1369),(1370,1370,1370),
-(1371,1371,1371),(1372,1372,1372),(1373,1373,1373),(1374,1374,1374),(1375,1375,1375),
-(1376,1376,1376),(1377,1377,1377),(1378,1378,1378),(1379,1379,1379),(1380,1380,1380),
-(1381,1381,1381),(1382,1382,1382),(1383,1383,1383),(1384,1384,1384),(1385,1385,1385),
-(1386,1386,1386),(1387,1387,1387),(1388,1388,1388),(1389,1389,1389),(1390,1390,1390),
-(1391,1391,1391),(1392,1392,1392),(1393,1393,1393),(1394,1394,1394),(1395,1395,1395),
-(1396,1396,1396),(1397,1397,1397),(1398,1398,1398),(1399,1399,1399),(1400,1400,1400),
-(1401,1401,1401),(1402,1402,1402),(1403,1403,1403),(1404,1404,1404),(1405,1405,1405),
-(1406,1406,1406),(1407,1407,1407),(1408,1408,1408),(1409,1409,1409),(1410,1410,1410),
-(1411,1411,1411),(1412,1412,1412),(1413,1413,1413),(1414,1414,1414),(1415,1415,1415),
-(1416,1416,1416),(1417,1417,1417),(1418,1418,1418),(1419,1419,1419),(1420,1420,1420),
-(1421,1421,1421),(1422,1422,1422),(1423,1423,1423),(1424,1424,1424),(1425,1425,1425),
-(1426,1426,1426),(1427,1427,1427),(1428,1428,1428),(1429,1429,1429),(1430,1430,1430),
-(1431,1431,1431),(1432,1432,1432),(1433,1433,1433),(1434,1434,1434),(1435,1435,1435),
-(1436,1436,1436),(1437,1437,1437),(1438,1438,1438),(1439,1439,1439),(1440,1440,1440),
-(1441,1441,1441),(1442,1442,1442),(1443,1443,1443),(1444,1444,1444),(1445,1445,1445),
-(1446,1446,1446),(1447,1447,1447),(1448,1448,1448),(1449,1449,1449),(1450,1450,1450),
-(1451,1451,1451),(1452,1452,1452),(1453,1453,1453),(1454,1454,1454),(1455,1455,1455),
-(1456,1456,1456),(1457,1457,1457),(1458,1458,1458),(1459,1459,1459),(1460,1460,1460),
-(1461,1461,1461),(1462,1462,1462),(1463,1463,1463),(1464,1464,1464),(1465,1465,1465),
-(1466,1466,1466),(1467,1467,1467),(1468,1468,1468),(1469,1469,1469),(1470,1470,1470),
-(1471,1471,1471),(1472,1472,1472),(1473,1473,1473),(1474,1474,1474),(1475,1475,1475),
-(1476,1476,1476),(1477,1477,1477),(1478,1478,1478),(1479,1479,1479),(1480,1480,1480),
-(1481,1481,1481),(1482,1482,1482),(1483,1483,1483),(1484,1484,1484),(1485,1485,1485),
-(1486,1486,1486),(1487,1487,1487),(1488,1488,1488),(1489,1489,1489),(1490,1490,1490),
-(1491,1491,1491),(1492,1492,1492),(1493,1493,1493),(1494,1494,1494),(1495,1495,1495),
-(1496,1496,1496),(1497,1497,1497),(1498,1498,1498),(1499,1499,1499),(1500,1500,1500),
-(1501,1501,1501),(1502,1502,1502),(1503,1503,1503),(1504,1504,1504),(1505,1505,1505),
-(1506,1506,1506),(1507,1507,1507),(1508,1508,1508),(1509,1509,1509),(1510,1510,1510),
-(1511,1511,1511),(1512,1512,1512),(1513,1513,1513),(1514,1514,1514),(1515,1515,1515),
-(1516,1516,1516),(1517,1517,1517),(1518,1518,1518),(1519,1519,1519),(1520,1520,1520),
-(1521,1521,1521),(1522,1522,1522),(1523,1523,1523),(1524,1524,1524),(1525,1525,1525),
-(1526,1526,1526),(1527,1527,1527),(1528,1528,1528),(1529,1529,1529),(1530,1530,1530),
-(1531,1531,1531),(1532,1532,1532),(1533,1533,1533),(1534,1534,1534),(1535,1535,1535),
-(1536,1536,1536),(1537,1537,1537),(1538,1538,1538),(1539,1539,1539),(1540,1540,1540),
-(1541,1541,1541),(1542,1542,1542),(1543,1543,1543),(1544,1544,1544),(1545,1545,1545),
-(1546,1546,1546),(1547,1547,1547),(1548,1548,1548),(1549,1549,1549),(1550,1550,1550),
-(1551,1551,1551),(1552,1552,1552),(1553,1553,1553),(1554,1554,1554),(1555,1555,1555),
-(1556,1556,1556),(1557,1557,1557),(1558,1558,1558),(1559,1559,1559),(1560,1560,1560),
-(1561,1561,1561),(1562,1562,1562),(1563,1563,1563),(1564,1564,1564),(1565,1565,1565),
-(1566,1566,1566),(1567,1567,1567),(1568,1568,1568),(1569,1569,1569),(1570,1570,1570),
-(1571,1571,1571),(1572,1572,1572),(1573,1573,1573),(1574,1574,1574),(1575,1575,1575),
-(1576,1576,1576),(1577,1577,1577),(1578,1578,1578),(1579,1579,1579),(1580,1580,1580),
-(1581,1581,1581),(1582,1582,1582),(1583,1583,1583),(1584,1584,1584),(1585,1585,1585),
-(1586,1586,1586),(1587,1587,1587),(1588,1588,1588),(1589,1589,1589),(1590,1590,1590),
-(1591,1591,1591),(1592,1592,1592),(1593,1593,1593),(1594,1594,1594),(1595,1595,1595),
-(1596,1596,1596),(1597,1597,1597),(1598,1598,1598),(1599,1599,1599),(1600,1600,1600),
-(1601,1601,1601),(1602,1602,1602),(1603,1603,1603),(1604,1604,1604),(1605,1605,1605),
-(1606,1606,1606),(1607,1607,1607),(1608,1608,1608),(1609,1609,1609),(1610,1610,1610),
-(1611,1611,1611),(1612,1612,1612),(1613,1613,1613),(1614,1614,1614),(1615,1615,1615),
-(1616,1616,1616),(1617,1617,1617),(1618,1618,1618),(1619,1619,1619),(1620,1620,1620),
-(1621,1621,1621),(1622,1622,1622),(1623,1623,1623),(1624,1624,1624),(1625,1625,1625),
-(1626,1626,1626),(1627,1627,1627),(1628,1628,1628),(1629,1629,1629),(1630,1630,1630),
-(1631,1631,1631),(1632,1632,1632),(1633,1633,1633),(1634,1634,1634),(1635,1635,1635),
-(1636,1636,1636),(1637,1637,1637),(1638,1638,1638),(1639,1639,1639),(1640,1640,1640),
-(1641,1641,1641),(1642,1642,1642),(1643,1643,1643),(1644,1644,1644),(1645,1645,1645),
-(1646,1646,1646),(1647,1647,1647),(1648,1648,1648),(1649,1649,1649),(1650,1650,1650),
-(1651,1651,1651),(1652,1652,1652),(1653,1653,1653),(1654,1654,1654),(1655,1655,1655),
-(1656,1656,1656),(1657,1657,1657),(1658,1658,1658),(1659,1659,1659),(1660,1660,1660),
-(1661,1661,1661),(1662,1662,1662),(1663,1663,1663),(1664,1664,1664),(1665,1665,1665),
-(1666,1666,1666),(1667,1667,1667),(1668,1668,1668),(1669,1669,1669),(1670,1670,1670),
-(1671,1671,1671),(1672,1672,1672),(1673,1673,1673),(1674,1674,1674),(1675,1675,1675),
-(1676,1676,1676),(1677,1677,1677),(1678,1678,1678),(1679,1679,1679),(1680,1680,1680),
-(1681,1681,1681),(1682,1682,1682),(1683,1683,1683),(1684,1684,1684),(1685,1685,1685),
-(1686,1686,1686),(1687,1687,1687),(1688,1688,1688),(1689,1689,1689),(1690,1690,1690),
-(1691,1691,1691),(1692,1692,1692),(1693,1693,1693),(1694,1694,1694),(1695,1695,1695),
-(1696,1696,1696),(1697,1697,1697),(1698,1698,1698),(1699,1699,1699),(1700,1700,1700),
-(1701,1701,1701),(1702,1702,1702),(1703,1703,1703),(1704,1704,1704),(1705,1705,1705),
-(1706,1706,1706),(1707,1707,1707),(1708,1708,1708),(1709,1709,1709),(1710,1710,1710),
-(1711,1711,1711),(1712,1712,1712),(1713,1713,1713),(1714,1714,1714),(1715,1715,1715),
-(1716,1716,1716),(1717,1717,1717),(1718,1718,1718),(1719,1719,1719),(1720,1720,1720),
-(1721,1721,1721),(1722,1722,1722),(1723,1723,1723),(1724,1724,1724),(1725,1725,1725),
-(1726,1726,1726),(1727,1727,1727),(1728,1728,1728),(1729,1729,1729),(1730,1730,1730),
-(1731,1731,1731),(1732,1732,1732),(1733,1733,1733),(1734,1734,1734),(1735,1735,1735),
-(1736,1736,1736),(1737,1737,1737),(1738,1738,1738),(1739,1739,1739),(1740,1740,1740),
-(1741,1741,1741),(1742,1742,1742),(1743,1743,1743),(1744,1744,1744),(1745,1745,1745),
-(1746,1746,1746),(1747,1747,1747),(1748,1748,1748),(1749,1749,1749),(1750,1750,1750),
-(1751,1751,1751),(1752,1752,1752),(1753,1753,1753),(1754,1754,1754),(1755,1755,1755),
-(1756,1756,1756),(1757,1757,1757),(1758,1758,1758),(1759,1759,1759),(1760,1760,1760),
-(1761,1761,1761),(1762,1762,1762),(1763,1763,1763),(1764,1764,1764),(1765,1765,1765),
-(1766,1766,1766),(1767,1767,1767),(1768,1768,1768),(1769,1769,1769),(1770,1770,1770),
-(1771,1771,1771),(1772,1772,1772),(1773,1773,1773),(1774,1774,1774),(1775,1775,1775),
-(1776,1776,1776),(1777,1777,1777),(1778,1778,1778),(1779,1779,1779),(1780,1780,1780),
-(1781,1781,1781),(1782,1782,1782),(1783,1783,1783),(1784,1784,1784),(1785,1785,1785),
-(1786,1786,1786),(1787,1787,1787),(1788,1788,1788),(1789,1789,1789),(1790,1790,1790),
-(1791,1791,1791),(1792,1792,1792),(1793,1793,1793),(1794,1794,1794),(1795,1795,1795),
-(1796,1796,1796),(1797,1797,1797),(1798,1798,1798),(1799,1799,1799),(1800,1800,1800),
-(1801,1801,1801),(1802,1802,1802),(1803,1803,1803),(1804,1804,1804),(1805,1805,1805),
-(1806,1806,1806),(1807,1807,1807),(1808,1808,1808),(1809,1809,1809),(1810,1810,1810),
-(1811,1811,1811),(1812,1812,1812),(1813,1813,1813),(1814,1814,1814),(1815,1815,1815),
-(1816,1816,1816),(1817,1817,1817),(1818,1818,1818),(1819,1819,1819),(1820,1820,1820),
-(1821,1821,1821),(1822,1822,1822),(1823,1823,1823),(1824,1824,1824),(1825,1825,1825),
-(1826,1826,1826),(1827,1827,1827),(1828,1828,1828),(1829,1829,1829),(1830,1830,1830),
-(1831,1831,1831),(1832,1832,1832),(1833,1833,1833),(1834,1834,1834),(1835,1835,1835),
-(1836,1836,1836),(1837,1837,1837),(1838,1838,1838),(1839,1839,1839),(1840,1840,1840),
-(1841,1841,1841),(1842,1842,1842),(1843,1843,1843),(1844,1844,1844),(1845,1845,1845),
-(1846,1846,1846),(1847,1847,1847),(1848,1848,1848),(1849,1849,1849),(1850,1850,1850),
-(1851,1851,1851),(1852,1852,1852),(1853,1853,1853),(1854,1854,1854),(1855,1855,1855),
-(1856,1856,1856),(1857,1857,1857),(1858,1858,1858),(1859,1859,1859),(1860,1860,1860),
-(1861,1861,1861),(1862,1862,1862),(1863,1863,1863),(1864,1864,1864),(1865,1865,1865),
-(1866,1866,1866),(1867,1867,1867),(1868,1868,1868),(1869,1869,1869),(1870,1870,1870),
-(1871,1871,1871),(1872,1872,1872),(1873,1873,1873),(1874,1874,1874),(1875,1875,1875),
-(1876,1876,1876),(1877,1877,1877),(1878,1878,1878),(1879,1879,1879),(1880,1880,1880),
-(1881,1881,1881),(1882,1882,1882),(1883,1883,1883),(1884,1884,1884),(1885,1885,1885),
-(1886,1886,1886),(1887,1887,1887),(1888,1888,1888),(1889,1889,1889),(1890,1890,1890),
-(1891,1891,1891),(1892,1892,1892),(1893,1893,1893),(1894,1894,1894),(1895,1895,1895),
-(1896,1896,1896),(1897,1897,1897),(1898,1898,1898),(1899,1899,1899),(1900,1900,1900),
-(1901,1901,1901),(1902,1902,1902),(1903,1903,1903),(1904,1904,1904),(1905,1905,1905),
-(1906,1906,1906),(1907,1907,1907),(1908,1908,1908),(1909,1909,1909),(1910,1910,1910),
-(1911,1911,1911),(1912,1912,1912),(1913,1913,1913),(1914,1914,1914),(1915,1915,1915),
-(1916,1916,1916),(1917,1917,1917),(1918,1918,1918),(1919,1919,1919),(1920,1920,1920),
-(1921,1921,1921),(1922,1922,1922),(1923,1923,1923),(1924,1924,1924),(1925,1925,1925),
-(1926,1926,1926),(1927,1927,1927),(1928,1928,1928),(1929,1929,1929),(1930,1930,1930),
-(1931,1931,1931),(1932,1932,1932),(1933,1933,1933),(1934,1934,1934),(1935,1935,1935),
-(1936,1936,1936),(1937,1937,1937),(1938,1938,1938),(1939,1939,1939),(1940,1940,1940),
-(1941,1941,1941),(1942,1942,1942),(1943,1943,1943),(1944,1944,1944),(1945,1945,1945),
-(1946,1946,1946),(1947,1947,1947),(1948,1948,1948),(1949,1949,1949),(1950,1950,1950),
-(1951,1951,1951),(1952,1952,1952),(1953,1953,1953),(1954,1954,1954),(1955,1955,1955),
-(1956,1956,1956),(1957,1957,1957),(1958,1958,1958),(1959,1959,1959),(1960,1960,1960),
-(1961,1961,1961),(1962,1962,1962),(1963,1963,1963),(1964,1964,1964),(1965,1965,1965),
-(1966,1966,1966),(1967,1967,1967),(1968,1968,1968),(1969,1969,1969),(1970,1970,1970),
-(1971,1971,1971),(1972,1972,1972),(1973,1973,1973),(1974,1974,1974),(1975,1975,1975),
-(1976,1976,1976),(1977,1977,1977),(1978,1978,1978),(1979,1979,1979),(1980,1980,1980),
-(1981,1981,1981),(1982,1982,1982),(1983,1983,1983),(1984,1984,1984),(1985,1985,1985),
-(1986,1986,1986),(1987,1987,1987),(1988,1988,1988),(1989,1989,1989),(1990,1990,1990),
-(1991,1991,1991),(1992,1992,1992),(1993,1993,1993),(1994,1994,1994),(1995,1995,1995),
-(1996,1996,1996),(1997,1997,1997),(1998,1998,1998),(1999,1999,1999);
-
-SELECT COUNT(*) FROM t1;
-
-
-#
-# Insert duplicate rows
-#
---error ER_DUP_ENTRY
-INSERT INTO t1 VALUES (1,1,1);
-
---error 1022
-INSERT INTO t1 VALUES
-(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
-(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10);
-
-select count(*) from t1;
-
-
-#
-# Test that select count(*) can see inserts made in the same transaction
-#
-begin;
-SELECT COUNT(*) FROM t1;
-INSERT INTO t1 VALUES
-(2001,2001,2001),(2002,2002,2002),(2003,2003,2003),(2004,2004,2004),(2005,2005,2005);
-SELECT COUNT(*) FROM t1;
-rollback;
-
-#
-# Insert duplicate rows, inside transaction
-# try to commit
-#
-begin;
-
---error 1022
-INSERT INTO t1 VALUES
-(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
-(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10);
-
---error 1296
-commit;
-
-select * from t1 where pk1=1;
-select * from t1 where pk1=10;
-select count(*) from t1 where pk1 <= 10 order by pk1;
-select count(*) from t1;
-
-
-#
-# Insert duplicate rows, inside transaction
-# rollback
-#
-begin;
-
---error 1022
-INSERT INTO t1 VALUES
-(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
-(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10);
-
-rollback;
-
-select * from t1 where pk1=1;
-select * from t1 where pk1=10;
-select count(*) from t1 where pk1 <= 10 order by pk1;
-select count(*) from t1;
-
-
-#
-# Insert duplicate rows, inside transaction
-# then try to select, finally rollback
-#
-begin;
-
---error 1022
-INSERT INTO t1 VALUES
-(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
-(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10);
---error 1296
-SELECT * FROM t1 WHERE pk1=10;
-
-rollback;
-
-select * from t1 where pk1=1;
-select * from t1 where pk1=10;
-select count(*) from t1 where pk1 <= 10 order by pk1;
-select count(*) from t1;
-
-
-#
-# Insert duplicate rows, inside transaction
-# then try to select, finally commit
-#
-begin;
-
---error 1022
-INSERT INTO t1 VALUES
-(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
-(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10);
-
---error 1296
-SELECT * FROM t1 WHERE pk1=10;
-
---error 1296
-SELECT * FROM t1 WHERE pk1=10;
-
---error 1296
-commit;
-
-select * from t1 where pk1=1;
-select * from t1 where pk1=10;
-select count(*) from t1 where pk1 <= 10 order by pk1;
-select count(*) from t1;
-
-
-#
-# Insert duplicate rows, inside transaction
-# then try to do another insert
-#
-begin;
-
---error 1022
-INSERT INTO t1 VALUES
-(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
-(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10);
-
---error 1296
-INSERT INTO t1 values (4000, 40, 44);
-
-rollback;
-
-select * from t1 where pk1=1;
-select * from t1 where pk1=10;
-select count(*) from t1 where pk1 <= 10 order by pk1;
-select count(*) from t1;
-
-#
-# Insert duplicate rows using "insert .. select"
-
-#
---error 1022
-insert into t1 select * from t1 where b < 10 order by pk1;
-
-DELETE FROM t1 WHERE pk1=2;
-
-begin;
-INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4);
-select * from t1 where pk1 < 3 order by pk1;
-rollback;
-
-INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4);
-select * from t1 where pk1 < 3 order by pk1;
-
-REPLACE INTO t1 values(1, 78, 3);
-select * from t1 where pk1=1;
-
-INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=79;
-select * from t1 where pk1 < 4 order by pk1;
-
-INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=pk1+c;
-select * from t1 where pk1 < 4 order by pk1;
-
-DELETE FROM t1 WHERE pk1 = 2 OR pk1 = 4 OR pk1 = 6;
-INSERT INTO t1 VALUES(1,1,1),(2,2,17),(3,4,5) ON DUPLICATE KEY UPDATE pk1=b;
-select * from t1 where pk1 = b and b != c order by pk1;
-
-# Test handling of duplicate unique
-DELETE FROM t1;
-CREATE UNIQUE INDEX bi ON t1(b);
-INSERT INTO t1 VALUES
-(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
-(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10);
-INSERT INTO t1 VALUES(0,1,0),(21,21,21) ON DUPLICATE KEY UPDATE pk1=b+10,b=b+10;
-select * from t1 order by pk1;
-
-DROP TABLE t1;
-
-#
-# Bug #6331: problem with 'insert ignore'
-#
-
-CREATE TABLE t1(a INT) ENGINE=ndb;
-INSERT IGNORE INTO t1 VALUES (1);
-INSERT IGNORE INTO t1 VALUES (1);
-INSERT IGNORE INTO t1 SELECT a FROM t1;
-INSERT IGNORE INTO t1 SELECT a FROM t1;
-INSERT IGNORE INTO t1 SELECT a FROM t1;
-INSERT IGNORE INTO t1 VALUES (1);
-INSERT IGNORE INTO t1 VALUES (1);
-SELECT * FROM t1 ORDER BY a;
-DELETE FROM t1;
-CREATE UNIQUE INDEX ai ON t1(a);
-INSERT IGNORE INTO t1 VALUES (1);
-INSERT IGNORE INTO t1 VALUES (1);
-INSERT IGNORE INTO t1 VALUES (NULL),(2);
-SELECT * FROM t1 ORDER BY a;
-DROP TABLE t1;
-
-# Ignore and NULL values
-CREATE TABLE t1(pk INT NOT NULL PRIMARY KEY, a INT, UNIQUE (a)) ENGINE=ndb;
-INSERT IGNORE INTO t1 VALUES (1,1),(2,2),(3,3);
-INSERT IGNORE INTO t1 VALUES (4,NULL),(5,NULL),(6,NULL),(7,4);
-SELECT * FROM t1 ORDER BY pk;
-DROP TABLE t1;
-
-#
-# Bug #27980 INSERT IGNORE wrongly ignores NULLs in unique index
-#
-
-create table t1(a int primary key, b int, unique key(b)) engine=ndb;
-insert ignore into t1 values (1,0), (2,0), (2,null), (3,null);
-select * from t1 order by a;
-drop table t1;
-# End of 4.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_limit.test b/mysql-test/suite/ndb/t/ndb_limit.test
deleted file mode 100644
index 01613606d66..00000000000
--- a/mysql-test/suite/ndb/t/ndb_limit.test
+++ /dev/null
@@ -1,85 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t2;
---enable_warnings
-
-
-CREATE TABLE t2 (
- a bigint unsigned NOT NULL PRIMARY KEY,
- b int unsigned not null,
- c int unsigned
-) engine=ndbcluster;
-
-
-#
-# insert records into table
-#
-let $1=1000;
-disable_query_log;
-while ($1)
-{
- eval insert into t2 values($1*10, $1+9, 5*$1), ($1*10+1, $1+10, 7),($1*10+2, $1+10, 7*$1), ($1*10+3, $1+10, 10+$1), ($1*10+4, $1+10, 70*$1), ($1*10+5, $1+10, 7), ($1*10+6, $1+10, 9), ($1*10+7, $1+299, 899), ($1*10+8, $1+10, 12), ($1*10+9, $1+10, 14*$1);
- dec $1;
-}
-enable_query_log;
-
-select count(*) from t2;
-
-delete from t2 limit 1;
-select count(*) from t2;
-
-delete from t2 limit 100;
-select count(*) from t2;
-
-delete from t2 limit 1000;
-select count(*) from t2;
-
-update t2 set c=12345678 limit 100;
-select count(*) from t2 where c=12345678;
-select count(*) from t2 where c=12345678 limit 1000;
-
-select * from t2 limit 0;
-
-drop table t2;
-
-CREATE TABLE `t2` (
- `views` int(11) NOT NULL default '0',
- `clicks` int(11) NOT NULL default '0',
- `day` date NOT NULL default '0000-00-00',
- `hour` tinyint(4) NOT NULL default '0',
- `bannerid` smallint(6) NOT NULL default '0',
- `zoneid` smallint(6) NOT NULL default '0',
- `source` varchar(50) NOT NULL default '',
- PRIMARY KEY (`day`,`hour`,`bannerid`,`zoneid`,`source`),
- KEY `bannerid_day` (`bannerid`,`day`),
- KEY `zoneid` (`zoneid`)
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
-
-INSERT INTO `t2` VALUES
-( 1,0,'2004-09-17', 5,100,100,''),
-( 1,0,'2004-09-18', 7,100,100,''),
-( 17,0,'2004-09-27',20,132,100,''),
-( 4,0,'2004-09-16',23,132,100,''),
-( 86,0,'2004-09-18', 7,196,196,''),
-( 11,0,'2004-09-16',16,132,100,''),
-(140,0,'2004-09-18', 0,100,164,''),
-( 2,0,'2004-09-17', 7,132,100,''),
-(846,0,'2004-09-27',11,132,164,''),
-( 1,0,'2004-09-18', 8,132,100,''),
-( 22,0,'2004-09-27', 9,164,132,''),
-(711,0,'2004-09-27', 9,100,164,''),
-( 11,0,'2004-09-18', 0,196,132,''),
-( 41,0,'2004-09-27',15,196,132,''),
-( 57,0,'2004-09-18', 2,164,196,'');
-
-SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y')
-as date_formatted FROM t2 GROUP BY day ORDER BY day DESC;
-
-SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y')
-as date_formatted FROM t2 GROUP BY day ORDER BY day DESC LIMIT 2;
-
-drop table t2;
-
-# End of 4.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_load.test b/mysql-test/suite/ndb/t/ndb_load.test
deleted file mode 100644
index aa48b3dfdcf..00000000000
--- a/mysql-test/suite/ndb/t/ndb_load.test
+++ /dev/null
@@ -1,24 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-#
-# Basic test for different types of loading data
-#
-
-# should give duplicate key
-CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=NDB;
---error 1022
-LOAD DATA INFILE '../../../std_data/words.dat' INTO TABLE t1 ;
-DROP TABLE t1;
-
-# now without a primary key we should be ok
-CREATE TABLE t1 (word CHAR(20) NOT NULL) ENGINE=NDB;
-LOAD DATA INFILE '../../../std_data/words.dat' INTO TABLE t1 ;
-SELECT * FROM t1 ORDER BY word;
-DROP TABLE t1;
-
-# End of 4.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_loaddatalocal.test b/mysql-test/suite/ndb/t/ndb_loaddatalocal.test
deleted file mode 100644
index 257a26087b7..00000000000
--- a/mysql-test/suite/ndb/t/ndb_loaddatalocal.test
+++ /dev/null
@@ -1,71 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-create table t1(a int) engine=myisam;
-let $1=10000;
-disable_query_log;
-set SQL_LOG_BIN=0;
-while ($1)
-{
- insert into t1 values(1);
- dec $1;
-}
-set SQL_LOG_BIN=1;
-let $MYSQLD_DATADIR= `select @@datadir`;
-enable_query_log;
---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
-eval select * into outfile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1;
-#This will generate a 20KB file, now test LOAD DATA LOCAL
-drop table t1;
-
-create table t1(a int) engine=ndb;
---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
-eval load data local infile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1;
-select count(*) from t1;
---remove_file $MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile
-drop table t1;
-
-create table t1(a int) engine=myisam;
-insert into t1 values (1), (2), (2), (3);
---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
-eval select * into outfile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1;
-drop table t1;
-
-create table t1(a int primary key) engine=ndb;
---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
-eval load data local infile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1;
---remove_file $MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile
-select * from t1 order by a;
-drop table t1;
-
-create table t1(a int) engine=myisam;
-insert into t1 values (1), (1), (2), (3);
---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
-eval select * into outfile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1;
-drop table t1;
-
-create table t1(a int primary key) engine=ndb;
---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
-eval load data local infile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1;
---remove_file $MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile
-select * from t1 order by a;
-drop table t1;
-
-create table t1(a int) engine=myisam;
-insert into t1 values (1), (2), (3), (3);
---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
-eval select * into outfile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1;
-drop table t1;
-
-create table t1(a int primary key) engine=ndb;
---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
-eval load data local infile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1;
---remove_file $MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile
-select * from t1 order by a;
-drop table t1;
-
-# End of 4.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_lock.test b/mysql-test/suite/ndb/t/ndb_lock.test
deleted file mode 100644
index b6cd1ca7eb4..00000000000
--- a/mysql-test/suite/ndb/t/ndb_lock.test
+++ /dev/null
@@ -1,269 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
-connect (con1,localhost,root,,);
-connect (con2,localhost,root,,);
-
---disable_warnings
-DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
---enable_warnings
-
-#
-# Transaction lock test to show that the NDB
-# table handler is working properly with
-# transaction locks
-#
-
-#
-# Testing of scan isolation
-#
-connection con1;
-create table t1 (x integer not null primary key, y varchar(32)) engine = ndb;
-insert into t1 values (1,'one'), (2,'two');
-select * from t1 order by x;
-
-connection con2;
-select * from t1 order by x;
-
-connection con1;
-start transaction;
-insert into t1 values (3,'three');
-select * from t1 order by x;
-
-connection con2;
-start transaction;
-select * from t1 order by x;
-
-connection con1;
-commit;
-
-connection con2;
-select * from t1 order by x;
-commit;
-
-drop table t1;
-
-###
-# Bug#6020
-create table t1 (pk integer not null primary key, u int not null, o int not null,
- unique(u), key(o)) engine = ndb;
-insert into t1 values (1,1,1), (2,2,2), (3,3,3), (4,4,4), (5,5,5);
-
-lock tables t1 write;
-delete from t1 where pk = 1;
-unlock tables;
-select * from t1 order by pk;
-insert into t1 values (1,1,1);
-
-lock tables t1 write;
-delete from t1 where u = 1;
-unlock tables;
-select * from t1 order by pk;
-insert into t1 values (1,1,1);
-
-lock tables t1 write;
-delete from t1 where o = 1;
-unlock tables;
-select * from t1 order by pk;
-insert into t1 values (1,1,1);
-
-drop table t1;
-
-# Lock for update
-
-create table t1 (x integer not null primary key, y varchar(32), z integer, key(z)) engine = ndb;
-
-insert into t1 values (1,'one',1);
-
-# PK access
-connection con1;
-begin;
-select * from t1 where x = 1 for update;
-
-connection con2;
-begin;
---error 1205
-select * from t1 where x = 1 for update;
-rollback;
-
-connection con1;
-rollback;
-insert into t1 values (2,'two',2),(3,"three",3);
-begin;
-select * from t1 where x = 1 for update;
-
-connection con2;
---error 1205
-select * from t1 where x = 1 for update;
-select * from t1 where x = 2 for update;
-rollback;
-
-connection con1;
-commit;
-
-# table scan
-#
-# Note that there are two distinct execution paths in which we unlock
-# non-matching rows inspected during table scan - one that is used in
-# case of filesort and one that used in rest of cases. Below we cover
-# the latter (Bug #20390 "SELECT FOR UPDATE does not release locks of
-# untouched rows in full table scans").
-connection con1;
-begin;
-# We can't use "order by x" here as it will cause filesort
---replace_column 1 # 2 # 3 #
-select * from t1 where y = 'one' or y = 'three' for update;
-
-connection con2;
-begin;
-# Have to check with pk access here since scans take locks on
-# all rows and then release them in chunks
-select * from t1 where x = 2 for update;
---error 1205
-select * from t1 where x = 1 for update;
-rollback;
-
-connection con1;
-commit;
-
-# And now the test for case with filesort
-begin;
-select * from t1 where y = 'one' or y = 'three' order by x for update;
-connection con2;
-begin;
-select * from t1 where x = 2 for update;
---error 1205
-select * from t1 where x = 1 for update;
-rollback;
-
-connection con1;
-commit;
-
-# index scan
-connection con1;
-begin;
-select * from t1 where z > 1 and z < 3 for update;
-
-connection con2;
-begin;
-# Have to check with pk access here since scans take locks on
-# all rows and then release them in chunks
-select * from t1 where x = 1 for update;
---error 1105,1205
-select * from t1 where x = 2 for update;
-rollback;
-
-connection con1;
-commit;
-
-# share locking
-
-# PK access
-connection con1;
-begin;
-select * from t1 where x = 1 lock in share mode;
-
-connection con2;
-begin;
-select * from t1 where x = 1 lock in share mode;
-select * from t1 where x = 2 for update;
---error 1205
-select * from t1 where x = 1 for update;
-rollback;
-
-connection con1;
-commit;
-
-# table scan
-connection con1;
-begin;
-# We can't use "order by x" here as it will cause filesort
---replace_column 1 # 2 # 3 #
-select * from t1 where y = 'one' or y = 'three' lock in share mode;
-
-connection con2;
-begin;
-select * from t1 where y = 'one' lock in share mode;
-# Have to check with pk access here since scans take locks on
-# all rows and then release them in chunks
-select * from t1 where x = 2 for update;
---error 1205
-select * from t1 where x = 1 for update;
-rollback;
-
-connection con1;
-commit;
-
-# And the same test for case with filesort
-connection con1;
-begin;
-select * from t1 where y = 'one' or y = 'three' order by x lock in share mode;
-
-connection con2;
-begin;
-select * from t1 where y = 'one' lock in share mode;
-select * from t1 where x = 2 for update;
---error 1205
-select * from t1 where x = 1 for update;
-rollback;
-
-connection con1;
-commit;
-
-# index scan
-connection con1;
-begin;
-select * from t1 where z > 1 and z < 3 lock in share mode;
-
-connection con2;
-begin;
-select * from t1 where z = 1 lock in share mode;
-# Have to check with pk access here since scans take locks on
-# all rows and then release them in chunks
-select * from t1 where x = 1 for update;
---error 1205
-select * from t1 where x = 2 for update;
-rollback;
-
-connection con1;
-commit;
-
-drop table t1;
-
-# End of 4.1 tests
-
-#
-# Bug #17812 Previous lock table for write causes "stray" lock
-# although table is recreated
-#
-# this creating, locking, and dropping causes a subsequent hang
-# on the delete below waiting for table t2 the locking in the
-# "other" connection is relevant, as without it there is no problem
-#
-connection con1;
-create table t3 (id2 int) engine=ndb;
-
-connection con2;
-lock tables t3 write;
-unlock tables;
-
-connection con1;
-drop table t3;
-
-connection con1;
-create table t2 (id int, j int) engine=ndb;
-insert into t2 values (2, 2);
-create table t3 (id int) engine=ndb;
-
-connection con2;
-lock tables t3 read;
-
-connection con1;
-# here we get a hang before bugfix although we shouldn't
-delete t2 from t2, t3 where t2.id = t3.id;
-
-connection con2;
-unlock tables;
-
-connection con1;
-drop table t2, t3;
diff --git a/mysql-test/suite/ndb/t/ndb_lock_table.test b/mysql-test/suite/ndb/t/ndb_lock_table.test
deleted file mode 100644
index 6c21e8e8232..00000000000
--- a/mysql-test/suite/ndb/t/ndb_lock_table.test
+++ /dev/null
@@ -1,15 +0,0 @@
--- source include/have_ndb.inc
-
-# BUG 30996
---disable_warnings
-drop table if exists t1;
---enable_warnings
-create table t1 (a int) engine ndb;
-set autocommit=1;
-lock table t1 write;
-set autocommit=0;
-insert into t1 values (0);
-rollback;
-select * from t1;
-unlock tables;
-drop table t1;
diff --git a/mysql-test/suite/ndb/t/ndb_minmax.test b/mysql-test/suite/ndb/t/ndb_minmax.test
deleted file mode 100644
index a3ac677cd2a..00000000000
--- a/mysql-test/suite/ndb/t/ndb_minmax.test
+++ /dev/null
@@ -1,65 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-drop table if exists t1, t2;
---enable_warnings
-
-CREATE TABLE t1 (
- a int PRIMARY KEY
-) engine = ndb;
-
-INSERT INTO t1 VALUES (1);
-INSERT INTO t1 VALUES (2);
-INSERT INTO t1 VALUES (3);
-INSERT INTO t1 VALUES (4);
-INSERT INTO t1 VALUES (5);
-INSERT INTO t1 VALUES (6);
-
-select MAX(a) from t1;
-select MAX(a) from t1;
-select MAX(a) from t1;
-select MAX(a) from t1;
-select MIN(a) from t1;
-select MIN(a) from t1;
-select MIN(a) from t1;
-select * from t1 order by a;
-select MIN(a) from t1;
-select MAX(a) from t1;
-select MAX(a) from t1;
-select * from t1 order by a;
-drop table t1;
-
-
-CREATE TABLE t2 (
- a int PRIMARY KEY,
- b int not null,
- c int not null,
- KEY(b),
- UNIQUE(c)
-) engine = ndb;
-
-INSERT INTO t2 VALUES (1, 5, 1);
-INSERT INTO t2 VALUES (2, 2, 7);
-INSERT INTO t2 VALUES (3, 3, 3);
-INSERT INTO t2 VALUES (4, 4, 4);
-INSERT INTO t2 VALUES (5, 5, 5);
-INSERT INTO t2 VALUES (6, 6, 6);
-INSERT INTO t2 VALUES (7, 2, 10);
-INSERT INTO t2 VALUES (8, 10, 2);
-
-
-select MAX(a) from t2;
-select MAX(b) from t2;
-select MAX(c) from t2;
-select MIN(a) from t2;
-select MIN(b) from t2;
-select MIN(c) from t2;
-select * from t2 order by a;
-select MIN(b) from t2;
-select MAX(a) from t2;
-select MAX(c) from t2;
-select * from t2 order by a;
-drop table t2;
-
-# End of 4.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_multi.test b/mysql-test/suite/ndb/t/ndb_multi.test
deleted file mode 100644
index e033ad1e479..00000000000
--- a/mysql-test/suite/ndb/t/ndb_multi.test
+++ /dev/null
@@ -1,154 +0,0 @@
--- source include/have_multi_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-connection server2;
-drop table if exists t1, t2, t3, t4;
-flush status;
-connection server1;
-drop table if exists t1, t2, t3, t4;
-flush status;
---enable_warnings
-
-# Create test tables on server1
-create table t1 (a int) engine=ndbcluster;
-create table t2 (a int) engine=ndbcluster;
-insert into t1 value (2);
-insert into t2 value (3);
-select * from t1;
-select * from t2;
-show status like 'handler_discover%';
-
-# Check dropping and recreating table on same server
-connect (con1,localhost,root,,test);
-connect (con2,localhost,root,,test);
-connection con1;
-select * from t1;
-connection con2;
-drop table t1;
-create table t1 (a int) engine=ndbcluster;
-insert into t1 value (2);
-connection con1;
-select * from t1;
-
-# Check dropping and recreating table on different server
-connection server2;
-show status like 'handler_discover%';
-drop table t1;
-create table t1 (a int) engine=ndbcluster;
-insert into t1 value (2);
-connection server1;
-select * from t1;
-select * from t1;
-
-# Connect to server2 and use the tables from there
-connection server2;
-flush status;
-select * from t1;
-update t1 set a=3 where a=2;
-show status like 'handler_discover%';
-
-# Create a new table on server2
-create table t3 (a int not null primary key, b varchar(22),
-c int, last_col text) engine=ndb;
-insert into t3 values(1, 'Hi!', 89, 'Longtext column');
-create table t4 (pk int primary key, b int) engine=ndb;
-
-# Check that the tables are accessible from server1
-connection server1;
-select * from t1;
-select * from t3;
-show tables like 't4';
-show tables;
-
-drop table t1, t2, t3, t4;
-# bug#21378
-connection server1;
-create table t1(c1 int key)ENGINE=MyISAM;
-insert into t1 values(1),(3),(5);
-select * from t1 order by c1;
-
-connection server2;
-show tables;
-create table t1(c1 int key)ENGINE=MyISAM;
-insert into t1 values(100),(344),(533);
-select * from t1 order by c1;
-
-connection server1;
-alter table t1 engine=ndb;
-
-connection server2;
-show tables;
-select * from t1 order by c1;
-drop table t1;
-
-connection server1;
-select * from t1 order by c1;
-drop table t1;
-# End of 4.1 tests
-
-# Check distributed drop of database in 5.1
-create database db;
-use db;
-create table t1(x int) engine=ndb;
-
-connection server2;
-use db;
-show tables;
-
-connection server1;
-drop database db;
-
-connection server2;
---error 1049
-show tables;
-
-connection server1;
-
-# bug#21495
-create database db;
-use db;
-create table t1(x int) engine=ndb;
-
-connection server2;
-use db;
-create table t2(x int) engine=myisam;
-show tables;
-
-connection server1;
-drop database db;
-
-connection server2;
-show tables;
-drop database db;
-
-
-#
-# bug#31470, ndb table with special characters in name
-# are not discovered correctly
-connection server1;
-use test;
-create table `test`.`t1$EX`
- (server_id int unsigned,
- master_server_id int unsigned,
- master_epoch bigint unsigned,
- count int unsigned,
- primary key(server_id, master_server_id,
- master_epoch, count))
- engine ndb;
-
-# check that table shows up ok on both servers
-# before bugfix table would not show up on server2
---replace_regex /EX/ex/
-show tables like '%$%';
-connection server2;
-use test;
---replace_regex /EX/ex/
-show tables like '%$%';
-
-# check cleanup
-drop table `test`.`t1$EX`;
-show tables like '%$%';
-
-connection server1;
-show tables like '%$%';
diff --git a/mysql-test/suite/ndb/t/ndb_multi_row.test b/mysql-test/suite/ndb/t/ndb_multi_row.test
deleted file mode 100644
index 26953093ed0..00000000000
--- a/mysql-test/suite/ndb/t/ndb_multi_row.test
+++ /dev/null
@@ -1,76 +0,0 @@
--- source include/have_multi_ndb.inc
--- source include/not_embedded.inc
--- source include/have_binlog_format_mixed_or_row.inc
-
-
---disable_warnings
-connection server2;
-drop table if exists t1, t2, t3, t4;
-flush status;
-connection server1;
-drop table if exists t1, t2, t3, t4;
-flush status;
---enable_warnings
-
-
-# Create test tables on server1
-create table t1 (a int) engine=ndbcluster;
-create table t2 (a int) engine=ndbcluster;
-insert into t1 value (2);
-insert into t2 value (3);
-select * from t1;
-select * from t2;
-show status like 'handler_discover%';
-
-# Check dropping and recreating table on same server
-connect (con1,localhost,root,,test);
-connect (con2,localhost,root,,test);
-connection con1;
-select * from t1;
-connection con2;
-drop table t1;
-create table t1 (a int) engine=ndbcluster;
-insert into t1 value (2);
-connection con1;
-select * from t1;
-
-# Check dropping and recreating table on different server
-connection server2;
-show status like 'handler_discover%';
-drop table t1;
-create table t1 (a int) engine=ndbcluster;
-insert into t1 value (2);
-connection server1;
-## Currently a retry is required remotely
-#--error 1412
-#select * from t1;
-#show warnings;
-#flush table t1;
-# Table definition change should be propagated automatically
-select * from t1;
-
-# Connect to server2 and use the tables from there
-connection server2;
-flush status;
-select * from t1;
-update t1 set a=3 where a=2;
-show status like 'handler_discover%';
-
-# Create a new table on server2
-create table t3 (a int not null primary key, b varchar(22),
-c int, last_col text) engine=ndb;
-insert into t3 values(1, 'Hi!', 89, 'Longtext column');
-create table t4 (pk int primary key, b int) engine=ndb;
-
-# Check that the tables are accessible from server1
-connection server1;
-select * from t1;
-select * from t3;
-show tables like 't4';
-show tables;
-
-drop table t1, t2, t3, t4;
-connection server2;
-drop table if exists t1, t3, t4;
-
-# End of 4.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_partition_error.test b/mysql-test/suite/ndb/t/ndb_partition_error.test
deleted file mode 100644
index 9db2a6a6f6d..00000000000
--- a/mysql-test/suite/ndb/t/ndb_partition_error.test
+++ /dev/null
@@ -1,74 +0,0 @@
--- source include/have_ndb.inc
-#--disable_abort_on_error
-#
-# Simple test for the partition storage engine
-# Focuses on range partitioning tests
-#
-#-- source include/have_partition.inc
-
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
---disable_query_log
-set new=on;
---enable_query_log
-#
-# Partition by range, generate node group error
-#
---error 1005
-CREATE TABLE t1 (
-a int not null,
-b int not null,
-c int not null,
-primary key(a,b),
-index (a))
-engine = ndb
-partition by range (a)
-partitions 3
-(partition x1 values less than (5) nodegroup 12,
- partition x2 values less than (10) nodegroup 13,
- partition x3 values less than (20) nodegroup 14);
-show warnings;
-
-#
-# Partition by range, create normal valid table
-#
-CREATE TABLE t1 (
-a int not null,
-b int not null,
-c int not null,
-primary key(a))
-engine = ndb
-partition by range (a)
-partitions 3
-(partition x1 values less than (5),
- partition x2 values less than (10),
- partition x3 values less than (20));
-
-drop table t1;
-
-#
-# Bug #17763 mysqld cores with list partitioning if update to missing partition
-#
-CREATE TABLE t1 (id INT) ENGINE=NDB
- PARTITION BY LIST(id)
- (PARTITION p0 VALUES IN (2, 4),
- PARTITION p1 VALUES IN (42, 142));
-INSERT INTO t1 VALUES (2);
---error ER_NO_PARTITION_FOR_GIVEN_VALUE
-UPDATE t1 SET id=5 WHERE id=2;
-DROP TABLE t1;
-
-#
-# NULL for LIST partition
-#
-create table t1 (a int,b int, c int)
-engine = ndb
-partition by list(a)
-partitions 2
-(partition x123 values in (11, 12),
- partition x234 values in (5, 1));
---error ER_NO_PARTITION_FOR_GIVEN_VALUE
-insert into t1 values (NULL,1,1);
-drop table t1;
diff --git a/mysql-test/suite/ndb/t/ndb_partition_error2-master.opt b/mysql-test/suite/ndb/t/ndb_partition_error2-master.opt
deleted file mode 100644
index 955f7692c8b..00000000000
--- a/mysql-test/suite/ndb/t/ndb_partition_error2-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---ndbcluster
diff --git a/mysql-test/suite/ndb/t/ndb_partition_error2.test b/mysql-test/suite/ndb/t/ndb_partition_error2.test
deleted file mode 100644
index afedd0e3c5c..00000000000
--- a/mysql-test/suite/ndb/t/ndb_partition_error2.test
+++ /dev/null
@@ -1,14 +0,0 @@
-disable_query_log;
---require r/true.require
-select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster';
-enable_query_log;
-
---disable_warnings
-drop table if exists t1;
---enable_warnings
-#
-# Bug #27359 Partitions: memory allocation error message
-#
---error ER_PARTITION_NOT_DEFINED_ERROR
-create table t1 (s1 int) engine=ndbcluster;
-
diff --git a/mysql-test/suite/ndb/t/ndb_partition_key.test b/mysql-test/suite/ndb/t/ndb_partition_key.test
deleted file mode 100644
index a3898407445..00000000000
--- a/mysql-test/suite/ndb/t/ndb_partition_key.test
+++ /dev/null
@@ -1,244 +0,0 @@
--- source include/have_ndb.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-#
-# Basic syntax test
-#
-
-# Support for partition key verified
-CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b,c))
- ENGINE = NDB
- PARTITION BY KEY (a,b);
-
-insert into t1 values (1,1,1,1);
-select * from t1;
-update t1 set d = 2 where a = 1 and b = 1 and c = 1;
-select * from t1;
-delete from t1;
-select * from t1;
-
-drop table t1;
-
-# only support for partition key on primary key
---error ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF
-CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b))
- ENGINE = NDB
- PARTITION BY KEY (c);
-
-CREATE TABLE t1 (a int, b int, c int, PRIMARY KEY(a,b))
- ENGINE = NDB
- PARTITION BY KEY (a);
-
-insert into t1 values
- (1,1,3),(1,2,3),(1,3,3),(1,4,3),(1,5,3),(1,6,3),
- (1,7,3),(1,8,3),(1,9,3),(1,10,3),(1,11,3),(1,12,3);
-
-select * from t1 order by b;
-
-# BUG#33061: ORDER BY DESC becomes ASC in NDB partition pruning to one partition
-select max(b) from t1 where a = 1;
-select b from t1 where a = 1 order by b desc;
-
-DROP TABLE t1;
-
-#
-# Test partition and char support
-#
-
-CREATE TABLE t1 (a INT, b CHAR(10) COLLATE latin1_bin, c INT, d INT,
- PRIMARY KEY (a,b,c) USING HASH)
- ENGINE=NDB
- DEFAULT CHARSET=latin1
- PARTITION BY KEY (b);
-
-insert into t1 values (1,"a",1,1),(2,"a",1,1),(3,"a",1,1);
-
-# should show only one attribute with DISTRIBUTION KEY
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | sed 's/Version: [0-9]*//' | sed 's/\(Length of frm data: \)[0-9]*/\1#/'
-
-#
-# Test that explicit partition info is not shown in show create table
-# result should not contain (PARTITION P0 ... etc) since this is what shows up in
-# mysqldump, and we don't want that info there
-#
-show create table t1;
-
-DROP TABLE t1;
-
-#
-# Bug #13155: Problem in Create Table using SHOW CREATE TABLE syntax
-#
-CREATE TABLE t1 (a int not null primary key)
-PARTITION BY KEY(a)
-(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB);
-
-drop table t1;
-
-CREATE TABLE t1 (a int not null primary key);
-ALTER TABLE t1
-ENGINE = NDB
-PARTITION BY KEY(a)
-(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB);
-
-drop table t1;
-
-CREATE TABLE t1 (a int not null primary key) ENGINE = NDB;
-ALTER TABLE t1
-PARTITION BY KEY(a)
-(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB);
-
-drop table t1;
-
-#
-# Bug #17754 Improper handling of removal of partitioning in ALTER TABLE
-# Also added a number of general test cases in the same area
-#
-create table t1 (a int)
-engine=ndb
-partition by key(a)
-(partition p0, partition p1);
-show create table t1;
-
-alter table t1 engine=heap;
-show create table t1;
-
-alter table t1 engine=ndb;
-show create table t1;
-
-alter table t1 engine=heap remove partitioning;
-show create table t1;
-
-alter table t1 engine=ndb
-partition by key(a)
-(partition p0, partition p1 engine = ndb);
-show create table t1;
-
-alter table t1
-partition by key (a)
-(partition p0 engine=ndb, partition p1 engine=ndb);
-show create table t1;
-
-alter table t1 remove partitioning;
-show create table t1;
-
-# after bug#31931 was fixed
-# this is OK, since the storage engine is specified
-# on table level before.
-#--error ER_MIX_HANDLER_ERROR
-alter table t1
-partition by key(a)
-(partition p0 engine=ndb, partition p1);
-
-alter table t1
-engine=ndb
-partition by key(a)
-(partition p0 engine=ndb, partition p1 engine = ndb);
-show create table t1;
-
-drop table t1;
-
-#
-# BUG 16810 Out of memory when coalesce partition
-#
-CREATE TABLE t1 (
- c1 MEDIUMINT NOT NULL AUTO_INCREMENT,
- c2 TEXT NOT NULL,
- c3 INT NOT NULL,
- c4 BIT NOT NULL,
- c5 FLOAT,
- c6 VARCHAR(255),
- c7 TIMESTAMP,
- PRIMARY KEY(c1,c3))
- ENGINE=NDB
- PARTITION BY KEY(c3) PARTITIONS 5;
-
-let $j= 11;
---disable_query_log
-while ($j)
-{
- eval INSERT INTO t1 VALUES (NULL, "Tested Remotely from Texas, USA", $j,
-b'0',
- $j.00,"By JBM $j","2006-01-26");
- dec $j;
-}
---enable_query_log
-ALTER TABLE t1 COALESCE PARTITION 4;
-
-DROP TABLE t1;
-
-#
-# Bug 16822: OPTIMIZE TABLE hangs test
-#
-CREATE TABLE t1 (a int primary key)
-ENGINE=NDB
-PARTITION BY KEY(a);
-ANALYZE TABLE t1;
-CHECK TABLE t1;
-OPTIMIZE TABLE t1;
-REPAIR TABLE t1;
-ALTER TABLE t1 OPTIMIZE PARTITION p0;
-ALTER TABLE t1 CHECK PARTITION p0;
-ALTER TABLE t1 REPAIR PARTITION p0;
-ALTER TABLE t1 ANALYZE PARTITION p0;
---error ER_ILLEGAL_HA
-ALTER TABLE t1 REBUILD PARTITION p0;
-DROP TABLE t1;
-
-#
-# BUG 16806: ALTER TABLE fails
-#
-CREATE TABLE t1 (
- c1 MEDIUMINT NOT NULL AUTO_INCREMENT,
- c2 TEXT NOT NULL,
- c3 INT NOT NULL,
- PRIMARY KEY(c1,c3))
- ENGINE=NDB
- PARTITION BY KEY(c3) PARTITIONS 5;
-
-ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1;
-DROP TABLE t1;
-
-CREATE TABLE t1 (
- c1 MEDIUMINT NOT NULL AUTO_INCREMENT,
- c2 TEXT NOT NULL,
- c3 INT NOT NULL,
- PRIMARY KEY(c1,c3))
- ENGINE=NDB
- PARTITION BY KEY(c3)
- (PARTITION p0 NODEGROUP 0, PARTITION p1 NODEGROUP 0);
-
-ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1;
-SELECT NODEGROUP,PARTITION_NAME FROM information_schema.partitions WHERE
-table_name = "t1";
-DROP TABLE t1;
-
-# bug#25587
-
-CREATE TABLE t1 (
-a tinyint unsigned NOT NULL,
-b bigint(20) unsigned NOT NULL,
-c char(12),
-PRIMARY KEY (a,b)
-) ENGINE ndb DEFAULT CHARSET=latin1 PARTITION BY KEY (a);
-
-insert into t1 values(1,1,'1'), (2,2,'2'), (3,3,'3'), (4,4,'4'), (5,5,'5');
-select * from t1 where a = 1;
-select * from t1 where a = 2;
-select * from t1 where a = 3;
-select * from t1 where a = 4;
-select * from t1 where a = 5;
-delete from t1 where a = 1;
-select * from t1 order by 1;
-delete from t1 where a = 2;
-select * from t1 order by 1;
-delete from t1 where a = 3;
-select * from t1 order by 1;
-delete from t1 where a = 4;
-select * from t1 order by 1;
-delete from t1 where a = 5;
-select * from t1 order by 1;
-
-drop table t1;
diff --git a/mysql-test/suite/ndb/t/ndb_partition_list.test b/mysql-test/suite/ndb/t/ndb_partition_list.test
deleted file mode 100644
index ccfcdbc84f4..00000000000
--- a/mysql-test/suite/ndb/t/ndb_partition_list.test
+++ /dev/null
@@ -1,68 +0,0 @@
---source include/have_ndb.inc
-#
-# Simple test for the partition storage engine
-# Focuses on range partitioning tests
-#
-#-- source include/have_partition.inc
-
---disable_query_log
-set new=on;
---enable_query_log
-
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-#
-# Partition by list, basic
-#
-
-CREATE TABLE t1 ( f_int1 INTEGER NOT NULL, f_int2 INTEGER NOT NULL,
- f_char1 CHAR(10),
- f_char2 CHAR(10), f_charbig VARCHAR(1000),
-PRIMARY KEY (f_int1,f_int2))
-ENGINE = NDB
-PARTITION BY LIST(MOD(f_int1 + f_int2,4))
-(PARTITION part_3 VALUES IN (-3),
- PARTITION part_2 VALUES IN (-2),
- PARTITION part_1 VALUES IN (-1),
- PARTITION part0 VALUES IN (0),
- PARTITION part1 VALUES IN (1),
- PARTITION part2 VALUES IN (2),
- PARTITION part3 VALUES IN (3,4,5));
-
-INSERT INTO t1 SET f_int1 = -2, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20===';
-INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
-INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
-INSERT INTO t1 SET f_int1 = 3, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
-INSERT INTO t1 SET f_int1 = 4, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
-INSERT INTO t1 SET f_int1 = 5, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
-INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
-
-SELECT * FROM t1 ORDER BY f_int1;
-
-DROP TABLE t1;
-
-#
-# Partition by list, no pk
-#
-
-CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, f_char1 CHAR(10),
- f_char2 CHAR(10), f_charbig VARCHAR(1000))
-ENGINE = NDB
-PARTITION BY LIST(f_int1)
-(PARTITION part_1 VALUES IN (-1),
- PARTITION part0 VALUES IN (0,1),
- PARTITION part1 VALUES IN (2));
-
-INSERT INTO t1 SET f_int1 = -1, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20===';
-INSERT INTO t1 SET f_int1 = 0, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20===';
-INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
-INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
---error ER_NO_PARTITION_FOR_GIVEN_VALUE
-INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
-
-SELECT * FROM t1 ORDER BY f_int1;
-
-DROP TABLE t1;
-
diff --git a/mysql-test/suite/ndb/t/ndb_partition_range.test b/mysql-test/suite/ndb/t/ndb_partition_range.test
deleted file mode 100644
index 778e552c6d8..00000000000
--- a/mysql-test/suite/ndb/t/ndb_partition_range.test
+++ /dev/null
@@ -1,269 +0,0 @@
--- source include/have_ndb.inc
-#--disable_abort_on_error
-#
-# Simple test for the partition storage engine
-# Focuses on range partitioning tests
-#
-#-- source include/have_partition.inc
-
---disable_query_log
-set new=on;
---enable_query_log
-
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-#
-# Partition by range, basic
-#
-CREATE TABLE t1 (
-a int not null,
-b int not null,
-c int not null,
-primary key(a,b),
-index (a))
-engine = ndb
-partition by range (a)
-partitions 3
-(partition x1 values less than (5),
- partition x2 values less than (10),
- partition x3 values less than (20));
-
-# Simple insert and verify test
-INSERT into t1 values (1, 1, 1);
-INSERT into t1 values (6, 1, 1);
-INSERT into t1 values (10, 1, 1);
-INSERT into t1 values (15, 1, 1);
-
---replace_column 16 # 19 # 20 #
-select * from information_schema.partitions where table_name= 't1';
-
-select * from t1 order by a;
-
-select * from t1 where a=1 order by a;
-select * from t1 where a=15 and b=1 order by a;
-select * from t1 where a=21 and b=1 order by a;
-select * from t1 where a=21 order by a;
-select * from t1 where a in (1,6,10,21) order by a;
-select * from t1 where b=1 and a in (1,6,10,21) order by a;
-
-# BUG#33061: ORDER BY DESC becomes ASC in NDB partition pruning to one partition
-INSERT into t1 values (1, 2, 2);
-select max(b) from t1 where a = 1;
-select b from t1 where a = 1 order by b desc;
-
-drop table t1;
-
-#
-# Partition by range, basic
-#
-CREATE TABLE t1 (
-a int not null,
-b int not null,
-c int not null,
-primary key(b),
-unique (a))
-engine = ndb
-partition by range (b)
-partitions 3
-(partition x1 values less than (5),
- partition x2 values less than (10),
- partition x3 values less than (20));
-
-# Simple insert and verify test
-INSERT into t1 values (1, 1, 1);
-INSERT into t1 values (2, 6, 1);
-INSERT into t1 values (3, 10, 1);
-INSERT into t1 values (4, 15, 1);
-
-select * from t1 order by a;
-UPDATE t1 set a = 5 WHERE b = 15;
-select * from t1 order by a;
-UPDATE t1 set a = 6 WHERE a = 5;
-select * from t1 order by a;
-
-select * from t1 where b=1 order by b;
-select * from t1 where b=15 and a=1 order by b;
-select * from t1 where b=21 and a=1 order by b;
-select * from t1 where b=21 order by b;
-select * from t1 where b in (1,6,10,21) order by b;
-select * from t1 where a in (1,2,5,6) order by b;
-select * from t1 where a=1 and b in (1,6,10,21) order by b;
-
-DELETE from t1 WHERE b = 6;
-DELETE from t1 WHERE a = 6;
-
-#
-# Test that explicit partition info _is_ shown in show create table
-# result _should_ contain (PARTITION x1 ... etc)
-#
-show create table t1;
-
-drop table t1;
-
-#
-# Bug #17499, #17687
-# Alter partitioned NDB table causes mysqld to core
-#
-
-CREATE TABLE t1
- (id MEDIUMINT NOT NULL,
- b1 BIT(8),
- vc VARCHAR(255),
- bc CHAR(255),
- d DECIMAL(10,4) DEFAULT 0,
- f FLOAT DEFAULT 0,
- total BIGINT UNSIGNED,
- y YEAR,
- t DATE) ENGINE=NDB
- PARTITION BY RANGE (YEAR(t))
- (PARTITION p0 VALUES LESS THAN (1901),
- PARTITION p1 VALUES LESS THAN (1946),
- PARTITION p2 VALUES LESS THAN (1966),
- PARTITION p3 VALUES LESS THAN (1986),
- PARTITION p4 VALUES LESS THAN (2005),
- PARTITION p5 VALUES LESS THAN MAXVALUE);
-
-INSERT INTO t1 VALUES (0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-SELECT * FROM t1;
-ALTER TABLE t1 ENGINE=MYISAM;
-SELECT * FROM t1;
-DROP TABLE t1;
-
-CREATE LOGFILE GROUP lg1
- ADD UNDOFILE 'undofile.dat'
- INITIAL_SIZE 16M
- UNDO_BUFFER_SIZE=1M
- ENGINE=NDB;
-
-CREATE TABLESPACE ts1
- ADD DATAFILE 'datafile.dat'
- USE LOGFILE GROUP lg1
- INITIAL_SIZE 12M
- ENGINE NDB;
-
-CREATE TABLE test.t1 (
- a1 INT,
- a2 TEXT NOT NULL,
- a3 BIT NOT NULL,
- a4 DECIMAL(8,3),
- a5 INT NOT NULL,
- a6 INT,
- PRIMARY KEY(a1))
- TABLESPACE ts1 STORAGE DISK ENGINE=NDB
- PARTITION BY LIST (a1)
- (PARTITION p0 VALUES IN (1,2,3,4,5),
- PARTITION p1 VALUES IN (6,7,8,9, 10),
- PARTITION p2 VALUES IN (11, 12, 13, 14, 15));
-
-# Alter table directly without any statements inbetween
-ALTER TABLE test.t1 DROP COLUMN a6;
-ALTER TABLE test.t1 ADD COLUMN a6 VARCHAR(255);
-
-let $j= 15;
---disable_query_log
-while ($j)
-{
-eval INSERT INTO test.t1 VALUES ($j, "Tested Remotely from Texas, USA",
-b'1',$j.00,$j+1,"By NIK $j");
-dec $j;
-}
---enable_query_log
-SELECT COUNT(*) FROM test.t1;
-
-ALTER TABLE test.t1 DROP COLUMN a4;
-SELECT COUNT(*) FROM test.t1;
-
-DROP TABLE t1;
-
-CREATE TABLE test.t1 (
- a1 INT,
- a2 TEXT NOT NULL,
- a3 BIT NOT NULL,
- a4 DECIMAL(8,3),
- a5 INT NOT NULL,
- a6 VARCHAR(255),
- PRIMARY KEY(a1))
- TABLESPACE ts1 STORAGE DISK ENGINE=NDB
- PARTITION BY HASH(a1)
- PARTITIONS 4;
-
-let $j= 15;
---disable_query_log
-while ($j)
-{
-eval INSERT INTO test.t1 VALUES ($j, "Tested Remotely from Texas, USA",
-b'1',$j.00,$j+1,"By NIK $j");
-dec $j;
-}
---enable_query_log
-SELECT COUNT(*) FROM test.t1;
-
-ALTER TABLE test.t1 DROP COLUMN a4;
-SELECT COUNT(*) FROM test.t1;
-
-DROP TABLE t1;
-
-ALTER TABLESPACE ts1
- DROP DATAFILE 'datafile.dat'
- ENGINE=NDB;
-DROP TABLESPACE ts1 ENGINE=NDB;
-DROP LOGFILE GROUP lg1 ENGINE=NDB;
-
-
-#
-# Bug #17701 ALTER TABLE t1 ADD PARTITION for PARTITION BY LIST hangs test
-#
-
-CREATE TABLE t1
- (id MEDIUMINT NOT NULL,
- b1 BIT(8),
- vc VARCHAR(255),
- bc CHAR(255),
- d DECIMAL(10,4) DEFAULT 0,
- f FLOAT DEFAULT 0,
- total BIGINT UNSIGNED,
- y YEAR,
- t DATE) ENGINE=NDB
- PARTITION BY LIST(id)
- (PARTITION p0 VALUES IN (2, 4),
- PARTITION p1 VALUES IN (42, 142));
-
-INSERT INTO t1 VALUES (2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-SELECT * FROM t1;
-ALTER TABLE t1 ADD PARTITION
- (PARTITION p2 VALUES IN (412));
-SELECT * FROM t1;
-DROP TABLE t1;
-
-#
-# Bug #17806 Update on NDB table with list partition causes mysqld to core
-# Bug #16385 Partitions: crash when updating a range partitioned NDB table
-#
-CREATE TABLE t1 (
-a int not null,
-b int not null,
-c int not null)
-partition by list(a)
-partitions 2
-(partition x123 values in (1,5,6),
- partition x234 values in (4,7,8));
-INSERT into t1 VALUES (5,1,1);
-select * from t1;
-UPDATE t1 SET a=8 WHERE a=5 AND b=1;
-select * from t1;
-drop table t1;
-
-CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) engine=ndb
-PARTITION BY RANGE(f1)
-( PARTITION part1 VALUES LESS THAN (2),
-PARTITION part2 VALUES LESS THAN (1000));
-INSERT INTO t1 VALUES(1, '---1---');
-INSERT INTO t1 VALUES(2, '---2---');
-select * from t1 order by f1;
-UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 2;
-select * from t1 order by f1;
-UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 1;
-select * from t1 order by f1;
-drop table t1;
diff --git a/mysql-test/suite/ndb/t/ndb_read_multi_range.test b/mysql-test/suite/ndb/t/ndb_read_multi_range.test
deleted file mode 100644
index 1c439e65099..00000000000
--- a/mysql-test/suite/ndb/t/ndb_read_multi_range.test
+++ /dev/null
@@ -1,340 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1, t2, r1;
---enable_warnings
-
-#
-# Basic test to see that batching is working
-#
-
-create table t1 (
- a int primary key,
- b int not null,
- c int not null,
- index(b), unique index using hash(c)
-) engine = ndb;
-insert into t1 values
- (1,2,1),(2,3,2),(3,4,3),(4,5,4),
- (5,2,12),(6,3,11),(7,4,10),(8,5,9),
- (9,2,8),(10,3,7),(11,4,6),(12,5,5);
-
-# batch on primary key
-create table r1 as select * from t1 where a in (2,8,12);
-select * from r1 order by a;
-drop table r1;
-
-# batch on ordered index
-create table r1 as select * from t1 where b in (1,2,5);
-select * from r1 order by a;
-drop table r1;
-
-# batch on unique hash index
-create table r1 as select * from t1 where c in (2,8,12);
-select * from r1 order by a;
-drop table r1;
-
-# batch mixed
-create table r1 as select * from t1 where a in (2,8) or (a > 11) or (a <= 1);
-select * from r1 order by a;
-drop table r1;
-
-# batch on primary key, missing values
-create table r1 as select * from t1 where a in (33,8,12);
-select * from r1 order by a;
-drop table r1;
-create table r1 as select * from t1 where a in (2,33,8,12,34);
-select * from r1 order by a;
-drop table r1;
-
-# batch on ordered index, missing values
-create table r1 as select * from t1 where b in (1,33,5);
-select * from r1 order by a;
-drop table r1;
-select * from t1 where b in (1,33,5) order by a;
-create table r1 as select * from t1 where b in (45,1,33,5,44);
-select * from r1 order by a;
-drop table r1;
-select * from t1 where b in (45,22) order by a;
-
-# batch on unique hash index, missing values
-create table r1 as select * from t1 where c in (2,8,33);
-select * from r1 order by a;
-drop table r1;
-create table r1 as select * from t1 where c in (13,2,8,33,12);
-select * from r1 order by a;
-drop table r1;
-
-select * from t1 where a in (33,8,12) order by a;
-select * from t1 where a in (33,34,35) order by a;
-select * from t1 where a in (2,8) or (a > 11) or (a <= 1) order by a;
-select * from t1 where b in (6,7) or (b <= 5) or (b >= 10) order by b,a;
-select * from t1 where c in (13,2,8,33,12) order by c,a;
-drop table t1;
-
-#
-# Somewhat more complicated
-#
-
-create table t1 (
- a int not null,
- b int not null,
- c int not null,
- d int not null,
- e int not null,
- primary key (a,b,c,d), index (d)
-) engine = ndb;
-
-insert into t1 values
- (1,2,1,1,1),(2,3,2,3,1),(3,4,3,1,1),(4,5,4,7,1),
- (5,2,12,12,1),(6,3,11,1,1),(7,4,10,3,1),(8,5,9,5,1),
- (9,2,8,6,1),(10,3,7,5,1),(11,4,6,3,1),(12,5,5,2,1),
- (1,2,1,2,1),
- (1,2,1,3,1),
- (1,2,1,4,1),
- (1,2,1,5,1);
-
-# batch on primary key
-create table r1 as select * from t1
- where a=1 and b=2 and c=1 and d in (1,4,3,2);
-select * from r1 order by a,b,c,d;
-drop table r1;
-
-# batched update ordered index, one value for all
-update t1 set e = 100
- where d in (12,6,7);
-select * from t1 where d in (12,6,7) order by a,b,c,d;
-select * from t1 where d not in (12,6,7) and e = 100;
-
-# batched update primary key, one value for all
-update t1
- set e = 101
- where a=1 and
- b=2 and
- c=1 and
- d in (1,4,3,2);
-select *
- from t1
- where a=1 and b=2 and c=1 and d in (1,4,3,2)
- order by a,b,c,d;
-select *
- from t1
- where not (a=1 and b=2 and c=1 and d in (1,4,3,2))
- and e=101;
-
-
-# batched update ordered index, different values
-update t1
- set e =
- (case d
- when 12 then 112
- when 6 then 106
- when 7 then 107
- end)
- where d in (12,6,7);
-select * from t1 where d in (12,6,7) order by a,b,c,d;
-
-# batched update primary key, different values
-update t1
- set e =
- (case d
- when 1 then 111
- when 4 then 444
- when 3 then 333
- when 2 then 222
- end)
- where a=1 and
- b=2 and
- c=1 and
- d in (1,4,3,2);
-select *
- from t1
- where a=1 and b=2 and c=1 and d in (1,4,3,2)
- order by a,b,c,d;
-
-# batched delete
-delete from t1 where d in (12,6,7);
-select * from t1 where d in (12,6,7);
-
-drop table t1;
-
-# null handling
-create table t1 (
- a int not null primary key,
- b int,
- c int,
- d int,
- unique index (b),
- index(c)
-) engine = ndb;
-
-insert into t1 values
- (1,null,1,1),
- (2,2,2,2),
- (3,null,null,3),
- (4,4,null,4),
- (5,null,5,null),
- (6,6,6,null),
- (7,null,null,null),
- (8,8,null,null),
- (9,null,9,9),
- (10,10,10,10),
- (11,null,null,11),
- (12,12,null,12),
- (13,null,13,null),
- (14,14,14,null),
- (15,null,null,null),
- (16,16,null,null);
-
-create table t2 as select * from t1 where a in (5,6,7,8,9,10);
-select * from t2 order by a;
-drop table t2;
-
-create table t2 as select * from t1 where b in (5,6,7,8,9,10);
-select * from t2 order by a;
-drop table t2;
-
-create table t2 as select * from t1 where c in (5,6,7,8,9,10);
-select * from t2 order by a;
-drop table t2;
-
-drop table t1;
-
-# bug17729
-
-CREATE TABLE t1 (
- a int(11) NOT NULL,
- b int(11) NOT NULL,
- c datetime default NULL,
- PRIMARY KEY (a),
- KEY idx_bc (b,c)
-) ENGINE=ndbcluster;
-
-INSERT INTO t1 VALUES
-(406989,67,'2006-02-23 17:08:46'), (150078,67,'2005-10-26 11:17:45'),
-(406993,67,'2006-02-27 11:20:57'), (245655,67,'2005-12-08 15:59:08'),
-(406994,67,'2006-02-27 11:26:46'), (256,67,NULL),
-(398341,67,'2006-02-20 04:48:44'), (254,67,NULL),(1120,67,NULL),
-(406988,67,'2006-02-23 17:07:22'), (255,67,NULL),
-(398340,67,'2006-02-20 04:38:53'),(406631,67,'2006-02-23 10:49:42'),
-(245653,67,'2005-12-08 15:59:07'),(406992,67,'2006-02-24 16:47:18'),
-(245654,67,'2005-12-08 15:59:08'),(406995,67,'2006-02-28 11:55:00'),
-(127261,67,'2005-10-13 12:17:58'),(406991,67,'2006-02-24 16:42:32'),
-(245652,67,'2005-12-08 15:58:27'),(398545,67,'2006-02-20 04:53:13'),
-(154504,67,'2005-10-28 11:53:01'),(9199,67,NULL),(1,67,'2006-02-23 15:01:35'),
-(223456,67,NULL),(4101,67,NULL),(1133,67,NULL),
-(406990,67,'2006-02-23 18:01:45'),(148815,67,'2005-10-25 15:34:17'),
-(148812,67,'2005-10-25 15:30:01'),(245651,67,'2005-12-08 15:58:27'),
-(154503,67,'2005-10-28 11:52:38');
-
-create table t11 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 asc;
-create table t12 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 desc;
-create table t21 select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 asc;
-create table t22 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 desc;
-
-select * from t11 order by 1,2,3;
-select * from t12 order by 1,2,3;
-select * from t21 order by 1,2,3;
-select * from t22 order by 1,2,3;
-
-# join tests
-select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null order by t12.a;
-
-update t22 set c = '2005-12-08 15:58:27' where a = 255;
-select * from t22 order by 1,2,3;
-select t21.* from t21,t22 where t21.a = t22.a and
-t22.a in (select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null) and t22.c is null order by t21.a;
-
-delete from t22 where a > 245651;
-update t22 set b = a + 1;
-select * from t22 order by 1,2,3;
-select t21.c, count(*)
-from t21
-inner join t22 using (a)
-where t22.b in (2,256,257,1121,1134,4102,9200,223457,245652)
-group by t21.c
-order by t21.c;
-
-DROP TABLE t1, t11, t12, t21, t22;
-
-# bug#19956
-CREATE TABLE t1 (id varchar(255) NOT NULL,
- tag int(11) NOT NULL,
- doc text NOT NULL,
- type varchar(150) NOT NULL,
- modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (id)
- ) ENGINE=ndbcluster;
-
-INSERT INTO t1 VALUES ('sakila',1,'Some text goes here','text',CURRENT_TIMESTAMP);
-SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','orka');
-SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','sakila');
-
-DROP TABLE t1;
-
-#bug#25522
-CREATE TABLE t1 (
- var1 int(2) NOT NULL,
- var2 int(2) NOT NULL,
- PRIMARY KEY (var1)
- ) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1;
-
-
-CREATE TABLE t2 (
- var1 int(2) NOT NULL,
- var2 int(2) NOT NULL,
- PRIMARY KEY (var1)
- ) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1;
-
-
-DELIMITER |;
-CREATE TRIGGER testtrigger
- AFTER UPDATE ON t1 FOR EACH ROW BEGIN
- REPLACE INTO t2 SELECT * FROM t1 WHERE t1.var1 = NEW.var1;END|
-DELIMITER ;|
-
-INSERT INTO t1 VALUES (1,1),(2,2),(3,3);
-
-UPDATE t1 SET var2 = 9 WHERE var1 IN(1,2,3);
-
-DROP TRIGGER testtrigger;
-
-DROP TABLE t1, t2;
-
-#bug#25821
-create table t1 (a int, b int, primary key (a), key ab (a,b)) engine=ndbcluster;
-
-insert into t1 values (1,1), (10,10);
-
-select * from t1 use index (ab) where a in(1,10) order by a;
-
-create table t2 (a int, b int, primary key (a,b)) engine=ndbcluster
-partition by key(a);
-
-insert into t2 values (1,1), (10,10);
-
-select * from t2 where a in (1,10) order by a;
-drop table t1, t2;
-
-#bug#30337
-
-create table t1 (id int primary key) engine ndb;
-insert into t1 values (1), (2), (3);
-
-create table t2 (id int primary key) engine ndb;
-insert into t2 select id from t1;
-
-delimiter |;
-create trigger kaboom after delete on t1
-for each row begin
- delete from t2 where id=old.id;
-end|
-delimiter ;|
-
-select * from t1 order by id;
-delete from t1 where id in (1,2);
-select * from t2 order by id;
-
-drop trigger kaboom;
-drop table t1, t2;
diff --git a/mysql-test/suite/ndb/t/ndb_rename.test b/mysql-test/suite/ndb/t/ndb_rename.test
deleted file mode 100644
index 7f9fd0e6984..00000000000
--- a/mysql-test/suite/ndb/t/ndb_rename.test
+++ /dev/null
@@ -1,36 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1,t2;
-drop database if exists mysqltest;
---enable_warnings
-
-#
-# Table rename tests
-#
-
-#
-# Create a normal table with primary key
-#
-CREATE TABLE t1 (
- pk1 INT NOT NULL PRIMARY KEY,
- attr1 INT NOT NULL,
- attr2 INT,
- attr3 VARCHAR(10),
- INDEX i1(attr1)
-) ENGINE=ndbcluster;
-
-INSERT INTO t1 VALUES (0,0,0,"zero"),(1,1,1,"one"),(2,2,2,"two");
-SELECT * FROM t1 WHERE attr1 = 1;
-alter table t1 rename t2;
-SELECT * FROM t2 WHERE attr1 = 1;
-
-create database ndbtest;
-alter table t2 rename ndbtest.t2;
-SELECT * FROM ndbtest.t2 WHERE attr1 = 1;
-
-drop table ndbtest.t2;
-drop database ndbtest;
-
-# End of 4.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_replace.test b/mysql-test/suite/ndb/t/ndb_replace.test
deleted file mode 100644
index 432cf7f2dcd..00000000000
--- a/mysql-test/suite/ndb/t/ndb_replace.test
+++ /dev/null
@@ -1,104 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
-#
-# Test of REPLACE with NDB
-#
-
---disable_warnings
-drop table if exists t1,t2;
---enable_warnings
-
-CREATE TABLE t1 (
- gesuchnr int(11) DEFAULT '0' NOT NULL,
- benutzer_id int(11) DEFAULT '0' NOT NULL,
- PRIMARY KEY (gesuchnr,benutzer_id)
-) engine=ndbcluster;
-
-replace into t1 (gesuchnr,benutzer_id) values (2,1);
-replace into t1 (gesuchnr,benutzer_id) values (1,1);
-replace into t1 (gesuchnr,benutzer_id) values (1,1);
-insert into t1 (gesuchnr, benutzer_id) value (3,2);
-replace into t1 (gesuchnr,benutzer_id) values (1,1);
-replace into t1 (gesuchnr,benutzer_id) values (1,1);
---error ER_DUP_ENTRY
-insert into t1 (gesuchnr,benutzer_id) values (1,1);
-replace into t1 (gesuchnr,benutzer_id) values (1,1);
-select * from t1 order by gesuchnr;
-drop table t1;
-
-# End of 4.1 tests
-
-# bug#17431
-CREATE TABLE t1(i INT PRIMARY KEY AUTO_INCREMENT,
- j INT,
- k INT,
- UNIQUE INDEX(j)
- ) ENGINE = ndb;
-INSERT INTO t1 VALUES (1,1,23),(2,2,24);
-REPLACE INTO t1 (j,k) VALUES (1,42);
-REPLACE INTO t1 (i,j) VALUES (17,2);
-SELECT * from t1 ORDER BY i;
-DROP TABLE t1;
-
-# bug#19906
-CREATE TABLE t2 (a INT(11) NOT NULL,
- b INT(11) NOT NULL,
- c INT(11) NOT NULL,
- x TEXT,
- y TEXT,
- z TEXT,
- id INT(10) unsigned NOT NULL AUTO_INCREMENT,
- i INT(11) DEFAULT NULL,
- PRIMARY KEY (id),
- UNIQUE KEY a (a,b,c)
-) ENGINE=ndbcluster;
-
-REPLACE INTO t2 (a,b,c,x,y,z,i) VALUES (1,1,1,'a','a','a',1),(1,1,1,'b','b','b',2), (1,1,1,'c','c','c',3);
-
-SELECT * FROM t2 ORDER BY id;
-
-REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'a','a','a',1);
-REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'b','b','b',2);
-
-SELECT * FROM t2 ORDER BY id;
-
-DROP TABLE t2;
-
-#
-# Bug #20728 "REPLACE does not work correctly for NDB table with PK and
-# unique index"
-#
---disable_warnings
-drop table if exists t1;
---enable_warnings
-create table t1 (pk int primary key, apk int unique, data int) engine=ndbcluster;
-# Test for plain replace which updates pk
-insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3);
-replace into t1 (pk, apk) values (4, 1), (5, 2);
-select * from t1 order by pk;
-delete from t1;
-# Another test for plain replace which doesn't touch pk
-insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3);
-replace into t1 (pk, apk) values (1, 4), (2, 5);
-select * from t1 order by pk;
-delete from t1;
-# Test for load data replace which updates pk
-insert into t1 values (1, 1, 1), (4, 4, 4), (6, 6, 6);
-load data infile '../../../std_data/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk);
-select * from t1 order by pk;
-delete from t1;
-# Now test for load data replace which doesn't touch pk
-insert into t1 values (1, 1, 1), (3, 3, 3), (5, 5, 5);
-load data infile '../../../std_data/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk);
-select * from t1 order by pk;
-delete from t1;
-# Finally test for both types of replace ... select
-insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3);
-replace into t1 (pk, apk) select 4, 1;
-replace into t1 (pk, apk) select 2, 4;
-select * from t1 order by pk;
-# Clean-up
-drop table t1;
-
---echo End of 5.0 tests.
diff --git a/mysql-test/suite/ndb/t/ndb_restore.test b/mysql-test/suite/ndb/t/ndb_restore.test
deleted file mode 100644
index c8b07fd351a..00000000000
--- a/mysql-test/suite/ndb/t/ndb_restore.test
+++ /dev/null
@@ -1,413 +0,0 @@
--- source include/have_ndb.inc
--- source include/ndb_default_cluster.inc
--- source include/not_embedded.inc
-
---disable_warnings
-use test;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
-drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c;
---enable_warnings
-
-# Bug #27775 - mediumint auto inc not restored correctly
-# - check mediumint
-CREATE TABLE `t1_c` (
- `capgoaledatta` mediumint(5) unsigned NOT NULL auto_increment,
- `goaledatta` char(2) NOT NULL default '',
- `maturegarbagefa` varchar(32) NOT NULL default '',
- PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`)
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
-INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(400,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3000,'20','threetrees.qt');
-#
-# Bug #27758 Restoring NDB backups makes table usable in SQL nodes
-# - space in key made table unusable after restore
-#
-# Bug #27775 - mediumint auto inc not restored correctly
-# - check smallint
-CREATE TABLE `t2_c` (
- `capgotod` smallint(5) unsigned NOT NULL auto_increment,
- `gotod` smallint(5) unsigned NOT NULL default '0',
- `goaledatta` char(2) default NULL,
- `maturegarbagefa` varchar(32) default NULL,
- `descrpooppo` varchar(64) default NULL,
- `svcutonsa` varchar(64) NOT NULL default '',
- PRIMARY KEY (`capgotod`),
- KEY `i quadaddsvr` (`gotod`)
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
-INSERT INTO `t2_c` VALUES (500,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST'),(5,0,'',NULL,NULL,'');
-
-# Added ROW_FORMAT=FIXED to use below to see that setting is preserved
-# by restore
-CREATE TABLE `t3_c` (
- `CapGoaledatta` smallint(5) unsigned NOT NULL default '0',
- `capgotod` smallint(5) unsigned NOT NULL default '0',
- PRIMARY KEY (`capgotod`,`CapGoaledatta`)
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED;
-INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3);
-
-# Bug #27775 - mediumint auto inc not restored correctly
-# - check bigint
-CREATE TABLE `t4_c` (
- `capfa` bigint(20) unsigned NOT NULL auto_increment,
- `realm` varchar(32) NOT NULL default '',
- `authpwchap` varchar(32) default NULL,
- `fa` varchar(32) NOT NULL default '',
- `payyingatta` tinyint(4) NOT NULL default '0',
- `status` char(1) default NULL,
- PRIMARY KEY (`fa`,`realm`),
- KEY `capfa` (`capfa`),
- KEY `i_quadentity` (`fa`,`realm`)
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
-INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(2200,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32000,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(290000000,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL);
-
-CREATE TABLE `t5_c` (
- `capfa` bigint(20) unsigned NOT NULL default '0',
- `gotod` smallint(5) unsigned NOT NULL default '0',
- `orderutonsa` varchar(64) NOT NULL default '',
- PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`)
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
-INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,'');
-
-CREATE TABLE `t6_c` (
- `capfa_parent` bigint(20) unsigned NOT NULL default '0',
- `capfa_child` bigint(20) unsigned NOT NULL default '0',
- `relatta` smallint(5) unsigned NOT NULL default '0',
- PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`)
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
-INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0);
-
-# Bug #27775 - mediumint auto inc not restored correctly
-# - check tinyint
-CREATE TABLE `t7_c` (
- `dardpo` char(15) NOT NULL default '',
- `dardtestard` tinyint(3) unsigned NOT NULL auto_increment,
- `FastFA` char(5) NOT NULL default '',
- `FastCode` char(6) NOT NULL default '',
- `Fastca` char(1) NOT NULL default '',
- `Fastmag` char(1) NOT NULL default '',
- `Beareratta` char(2) NOT NULL default '',
- PRIMARY KEY (`dardpo`,`dardtestard`)
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
-INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3');
-
-CREATE TABLE `t8_c` (
- `kattjame` varchar(32) NOT NULL default '',
- `realm` varchar(32) NOT NULL default '',
- `realm_entered` varchar(32) NOT NULL default '',
- `maturegarbagefa` varchar(32) NOT NULL default '',
- `hunderaaarbagefa_parent` varchar(32) NOT NULL default '',
- `kattjame_entered` varchar(32) NOT NULL default '',
- `hunderaaarbagefa` varchar(32) NOT NULL default '',
- `gest` varchar(16) default NULL,
- `hassetino` varchar(16) NOT NULL default '',
- `aaaproxysessfa` varchar(255) default NULL,
- `autologonallowed` char(1) default NULL,
- `squardporoot` varchar(15) NOT NULL default '',
- `naspo` varchar(15) default NULL,
- `beareratta` char(2) default NULL,
- `fastCode` varchar(6) default NULL,
- `fastFA` varchar(5) default NULL,
- `fastca` char(1) default NULL,
- `fastmag` char(1) default NULL,
- `lastupdate` datetime default NULL,
- `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00',
- `accthassetitime` int(10) unsigned default NULL,
- `acctoutputoctets` bigint(20) unsigned default NULL,
- `acctinputoctets` bigint(20) unsigned default NULL,
- PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`),
- KEY `squardporoot` (`squardporoot`)
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
-INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565);
-
-CREATE TABLE `t9_c` (
- `kattjame` varchar(32) NOT NULL default '',
- `kattjame_entered` varchar(32) NOT NULL default '',
- `realm` varchar(32) NOT NULL default '',
- `realm_entered` varchar(32) NOT NULL default '',
- `maturegarbagefa` varchar(32) NOT NULL default '',
- `hunderaaarbagefa` varchar(32) NOT NULL default '',
- `hunderaaarbagefa_parent` varchar(32) NOT NULL default '',
- `gest` varchar(16) default NULL,
- `hassetino` varchar(16) NOT NULL default '',
- `squardporoot` varchar(15) NOT NULL default '',
- `naspo` varchar(15) default NULL,
- `beareratta` char(2) default NULL,
- `fastCode` varchar(6) default NULL,
- `fastFA` varchar(5) default NULL,
- `fastca` char(1) default NULL,
- `fastmag` char(1) default NULL,
- `lastupdate` datetime default NULL,
- `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00',
- `accthassetitime` int(10) unsigned default NULL,
- `actcoutpuocttets` bigint(20) unsigned default NULL,
- `actinputocctets` bigint(20) unsigned default NULL,
- `terminateraste` tinyint(3) unsigned default NULL,
- PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`)
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
-INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3);
-
-# Bug #20820
-# auto inc table not handled correctly when restored from cluster backup
-# - before fix ndb_restore would not set auto inc value correct,
-# seen by select below
-CREATE TABLE t10_c (a INT AUTO_INCREMENT KEY) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
-INSERT INTO t10_c VALUES (1),(2),(3);
-# Bug #27775 - mediumint auto inc not restored correctly
-# - check int
-insert into t10_c values (10000),(2000),(3000);
-
-create table t1 engine=myisam as select * from t1_c;
-create table t2 engine=myisam as select * from t2_c;
-create table t3 engine=myisam as select * from t3_c;
-create table t4 engine=myisam as select * from t4_c;
-create table t5 engine=myisam as select * from t5_c;
-create table t6 engine=myisam as select * from t6_c;
-create table t7 engine=myisam as select * from t7_c;
-create table t8 engine=myisam as select * from t8_c;
-create table t9 engine=myisam as select * from t9_c;
-create table t10 engine=myisam as select * from t10_c;
-
-# check that force varpart is preserved by ndb_restore
-# t3_c has ROW_FORMAT=FIXED i.e. ForceVarPart=0
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t3_c | grep ForceVarPart
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t2_c | grep ForceVarPart
-
---source include/ndb_backup.inc
-drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c;
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
-# check that force varpart is preserved by ndb_restore
-# t3_c has ROW_FORMAT=FIXED i.e. ForceVarPart=0
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t3_c | grep ForceVarPart
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t2_c | grep ForceVarPart
-
-# Bug #30667
-# ndb table discovery does not work correcly with information schema
-# - prior to bug fix this would yeild no output and a warning
-select * from information_schema.columns where table_name = "t1_c";
-
-# random output order??
-#show tables;
-
-select count(*) from t1;
-select count(*) from t1_c;
-select count(*)
- from (select * from t1 union
- select * from t1_c) a;
-
-select count(*) from t2;
-select count(*) from t2_c;
-select count(*)
- from (select * from t2 union
- select * from t2_c) a;
-
-select count(*) from t3;
-select count(*) from t3_c;
-select count(*)
- from (select * from t3 union
- select * from t3_c) a;
-
-select count(*) from t4;
-select count(*) from t4_c;
-select count(*)
- from (select * from t4 union
- select * from t4_c) a;
-
-select count(*) from t5;
-select count(*) from t5_c;
-select count(*)
- from (select * from t5 union
- select * from t5_c) a;
-
-select count(*) from t6;
-select count(*) from t6_c;
-select count(*)
- from (select * from t6 union
- select * from t6_c) a;
-
-select count(*) from t7;
-select count(*) from t7_c;
-select count(*)
- from (select * from t7 union
- select * from t7_c) a;
-
-select count(*) from t8;
-select count(*) from t8_c;
-select count(*)
- from (select * from t8 union
- select * from t8_c) a;
-
-select count(*) from t9;
-select count(*) from t9_c;
-select count(*)
- from (select * from t9 union
- select * from t9_c) a;
-
-# Bug #20820 cont'd
-select * from t10_c order by a;
-# Bug #27775 cont'd
-# - auto inc info should be correct
-select max(capgoaledatta) from t1_c;
-select auto_increment from information_schema.tables
-where table_name = 't1_c';
-select max(capgotod) from t2_c;
-select auto_increment from information_schema.tables
-where table_name = 't2_c';
-select max(capfa) from t4_c;
-select auto_increment from information_schema.tables
-where table_name = 't4_c';
-select max(dardtestard) from t7_c;
-select auto_increment from information_schema.tables
-where table_name = 't7_c';
-select max(a) from t10_c;
-select auto_increment from information_schema.tables
-where table_name = 't10_c';
-
-#
-# Try Partitioned tables as well
-#
-ALTER TABLE t7_c
-PARTITION BY LINEAR KEY (`dardtestard`);
-
---source include/ndb_backup.inc
-drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c;
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
-
-select count(*) from t1;
-select count(*) from t1_c;
-select count(*)
- from (select * from t1 union
- select * from t1_c) a;
-
-select count(*) from t2;
-select count(*) from t2_c;
-select count(*)
- from (select * from t2 union
- select * from t2_c) a;
-
-select count(*) from t3;
-select count(*) from t3_c;
-select count(*)
- from (select * from t3 union
- select * from t3_c) a;
-
-select count(*) from t4;
-select count(*) from t4_c;
-select count(*)
- from (select * from t4 union
- select * from t4_c) a;
-
-select count(*) from t5;
-select count(*) from t5_c;
-select count(*)
- from (select * from t5 union
- select * from t5_c) a;
-
-select count(*) from t6;
-select count(*) from t6_c;
-select count(*)
- from (select * from t6 union
- select * from t6_c) a;
-
-select count(*) from t7;
-select count(*) from t7_c;
-select count(*)
- from (select * from t7 union
- select * from t7_c) a;
-
-select count(*) from t8;
-select count(*) from t8_c;
-select count(*)
- from (select * from t8 union
- select * from t8_c) a;
-
-select count(*) from t9;
-select count(*) from t9_c;
-select count(*)
- from (select * from t9 union
- select * from t9_c) a;
-
-drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c;
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,0)' --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
-
-select count(*) from t1;
-select count(*) from t1_c;
-select count(*)
- from (select * from t1 union
- select * from t1_c) a;
-
-select count(*) from t2;
-select count(*) from t2_c;
-select count(*)
- from (select * from t2 union
- select * from t2_c) a;
-
-select count(*) from t3;
-select count(*) from t3_c;
-select count(*)
- from (select * from t3 union
- select * from t3_c) a;
-
-select count(*) from t4;
-select count(*) from t4_c;
-select count(*)
- from (select * from t4 union
- select * from t4_c) a;
-
-select count(*) from t5;
-select count(*) from t5_c;
-select count(*)
- from (select * from t5 union
- select * from t5_c) a;
-
-select count(*) from t6;
-select count(*) from t6_c;
-select count(*)
- from (select * from t6 union
- select * from t6_c) a;
-
-select count(*) from t7;
-select count(*) from t7_c;
-select count(*)
- from (select * from t7 union
- select * from t7_c) a;
-
-select count(*) from t8;
-select count(*) from t8_c;
-select count(*)
- from (select * from t8 union
- select * from t8_c) a;
-
-select count(*) from t9;
-select count(*) from t9_c;
-select count(*)
- from (select * from t9 union
- select * from t9_c) a;
-
-#
-# Drop all table except t2_c
-# This to make sure that error returned from ndb_restore above is
-# guaranteed to be from t2_c, this since order of tables in backup
-# is none deterministic
-#
-drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c;
---source include/ndb_backup.inc
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --core=0 -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,1)' $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id 2>&1 | grep Translate || true
-
-#
-# Cleanup
-#
-
---disable_warnings
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
-drop table if exists t2_c;
---enable_warnings
-
-#
-# Test BUG#10287
-#
-
---exec $NDB_TOOLS_DIR/ndb_select_all --no-defaults -d sys -D , SYSTAB_0 | grep 520093696, | sed "s/,$the_backup_id/,<the_backup_id>/"
-
-# End of 5.0 tests (4.1 test intermixed to save test time)
diff --git a/mysql-test/suite/ndb/t/ndb_restore_compat.test b/mysql-test/suite/ndb/t/ndb_restore_compat.test
deleted file mode 100644
index 8e5b30aa6fd..00000000000
--- a/mysql-test/suite/ndb/t/ndb_restore_compat.test
+++ /dev/null
@@ -1,67 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
--- source include/have_case_sensitive_file_system.inc
-
-# This test currently requires case sensitive file system as the tables
-# are originally stored with uppercase
-
-#
-# Bug #18594 ndb_restore log boken in 5.1
-#
-
---disable_warnings
-DROP DATABASE IF EXISTS BANK;
---enable_warnings
-CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin;
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -p 1 -m -r $MYSQL_TEST_DIR/std_data/ndb_backup51 >> $NDB_TOOLS_OUTPUT
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -e -b 1 -n 2 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup51 >> $NDB_TOOLS_OUTPUT
-USE BANK;
-SHOW TABLES;
-SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE;
-SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID;
-SELECT COUNT(*) FROM TRANSACTION;
-SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID;
-SELECT * FROM mysql.ndb_apply_status WHERE server_id=0;
-
-# Check that force varpart is set by ndb_restore
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK GL | grep ForceVarPart
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT | grep ForceVarPart
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK TRANSACTION | grep ForceVarPart
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK SYSTEM_VALUES | grep ForceVarPart
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT_TYPE | grep ForceVarPart
-
-#
-# verify restore of 5.0 backup
-# here we must use the already created tables as restoring the old
-# table definitions will not work
-#
-TRUNCATE GL;
-TRUNCATE ACCOUNT;
-TRUNCATE TRANSACTION;
-TRUNCATE SYSTEM_VALUES;
-TRUNCATE ACCOUNT_TYPE;
-
-# Check that force varpart is not changed by truncate
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK GL | grep ForceVarPart
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT | grep ForceVarPart
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK TRANSACTION | grep ForceVarPart
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK SYSTEM_VALUES | grep ForceVarPart
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT_TYPE | grep ForceVarPart
-
-# Restore data
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -e -b 1 -n 2 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT
-
-# Check data
-SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE;
-SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID;
-SELECT COUNT(*) FROM TRANSACTION;
-SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID;
-SELECT * FROM mysql.ndb_apply_status WHERE server_id=0;
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 2 -n 1 -m -p 1 -s -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 2 -n 2 -p 1 -s -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT
-SELECT * FROM DESCRIPTION ORDER BY USERNAME;
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK DESCRIPTION | grep SHORT_VAR
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK DESCRIPTION | grep MEDIUM_VAR
-
-DROP DATABASE BANK;
diff --git a/mysql-test/suite/ndb/t/ndb_restore_different_endian_data.test b/mysql-test/suite/ndb/t/ndb_restore_different_endian_data.test
deleted file mode 100644
index 069796f43c4..00000000000
--- a/mysql-test/suite/ndb/t/ndb_restore_different_endian_data.test
+++ /dev/null
@@ -1,185 +0,0 @@
--- source include/have_ndb.inc
--- source include/ndb_default_cluster.inc
--- source include/not_embedded.inc
-
-#
-# Bug #27543 restore of backup from different endian does not work for blob column
-# Bug #30024 restore of backup from different endian does not work for datetime column
-# Bug #28674 backup will run forever if disk full and later write succes will kill ndb node
-#
-# The table structure and data list below
-#
-# CREATE TABLE t_num (
-# t_pk INT PRIMARY KEY,
-# t_bit BIT(64),
-# t_tinyint TINYINT,
-# t_bool BOOL,
-# t_smallint SMALLINT,
-# t_mediumint MEDIUMINT,
-# t_int INT,
-# t_bigint BIGINT,
-# t_float FLOAT,
-# t_double DOUBLE,
-# t_decimal DECIMAL (37, 16)
-# ) ENGINE=NDBCLUSTER;
-#
-# INSERT INTO t_num VALUE (
-# 1,
-# b'1010101010101010101010101010101010101010101010101010101010101010',
-# 125,
-# 1,
-# 32765,
-# 8388606,
-# 2147483647,
-# 9223372036854775807,
-# 1e+20,
-# 1e+150,
-# '331.0000000000'
-# );
-#
-# CREATE TABLE t_datetime (
-# t_pk INT PRIMARY KEY,
-# t_date DATE,
-# t_datetime DATETIME,
-# t_timestamp TIMESTAMP,
-# t_time TIME,
-# t_year YEAR
-# ) ENGINE=NDBCLUSTER;
-#
-# INSERT INTO t_datetime VALUE (
-# 1,
-# '1998-01-01',
-# '2006-08-10 10:11:12',
-# 20021029165106,
-# '19:38:34',
-# 2155
-# );
-#
-# CREATE TABLE t_string_1 (
-# t_pk INT PRIMARY KEY,
-# t_char CHAR(255),
-# t_varchar VARCHAR(655),
-# t_binary BINARY(255),
-# t_varbinary VARBINARY(6553)
-# ) ENGINE=NDBCLUSTER;
-#
-# CREATE TABLE t_string_2 (
-# t_pk INT PRIMARY KEY,
-# t_tinyblob TINYBLOB,
-# t_tinytext TINYTEXT,
-# t_blob BLOB,
-# t_text TEXT,
-# t_mediumblob MEDIUMBLOB,
-# t_mediumtext MEDIUMTEXT,
-# t_longblob LONGBLOB,
-# t_longtext LONGTEXT,
-# t_enum ENUM('001001','001004','001010','001018','001019','001020','001021','001027','001028','001029','001030','001031','001100','002003','002004','002005','002007')DEFAULT '001001' NOT NULL,
-# t_set SET('a','B')
-# ) ENGINE=NDBCLUSTER;
-#
-# INSERT INTO t_string_1 VALUE (
-# 1,
-# 'abcdefghijklmn',
-# 'abcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmn',
-# 0x612020,
-# 0x4100
-# );
-#
-# INSERT INTO t_string_2 VALUE (
-# 1,
-# 'abcdefghijklmnabcdefghijklmn',
-# 'abcdefghijklmnabcdefghijklmn',
-# 'a123456789b123456789c123456789d123456789e123456789f123456789g123456789',
-# 'a123456789b123456789c123456789d123456789e123456789f123456789g123456789',
-# 'a123456789b123456789c123456789d123456789e123456789f123456789g123456789',
-# 'a123456789b123456789c123456789d123456789e123456789f123456789g123456789',
-# 'a123456789b123456789c123456789d123456789e123456789f123456789g123456789',
-# 'a123456789b123456789c123456789d123456789e123456789f123456789g123456789',
-# '001001',
-# 'a'
-# );
-#
-# CREATE TABLE t_gis (
-# t_pk INT PRIMARY KEY,
-# t_point POINT,
-# t_linestring LINESTRING,
-# t_polygon POLYGON,
-# t_multipoint MULTIPOINT,
-# t_multilinestring MULTILINESTRING,
-# t_multipolygon MULTIPOLYGON,
-# t_geometrycollection GEOMETRYCOLLECTION,
-# t_geometry GEOMETRY
-# ) ENGINE=NDBCLUSTER;
-#
-# INSERT INTO t_gis VALUE (
-# 1,
-# PointFromText('POINT(10 10)'),
-# LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10 10)'),
-# PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))'),
-# MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)'),
-# MLineFromText('MULTILINESTRING((10 48,10 21,10 0))'),
-# MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))'),
-# GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))'),
-# MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')
-# );
-#
-# INSERT INTO t_gis VALUE (
-# 2,
-# PointFromWKB(AsWKB(PointFromText('POINT(10 20)'))),
-# LineStringFromWKB(LineString(Point(10, 10), Point(40, 10))),
-# PolyFromWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0)))),
-# MPointFromWKB(MultiPoint(Point(3, 6), Point(4, 10))),
-# MLineFromWKB(MultiLineString(LineString(Point(1, 2), Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21, 7)))),
-# MPolyFromWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3))))),
-# GeometryFromWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9)))),
-# GeometryFromWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9))))
-# );
-
-
-
-#
-# Restore backup files (from little endian)
-#
-
---disable_warnings
-USE test;
-DROP TABLE IF EXISTS t_num,t_datetime,t_string_1,t_string_2,t_gis;
---enable_warnings
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -m -r $MYSQL_TEST_DIR/std_data/ndb_backup51_data_le >> $NDB_TOOLS_OUTPUT
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 2 -r $MYSQL_TEST_DIR/std_data/ndb_backup51_data_le >> $NDB_TOOLS_OUTPUT
-SHOW TABLES;
-SHOW CREATE TABLE t_num;
-SHOW CREATE TABLE t_datetime;
-SHOW CREATE TABLE t_string_1;
-SHOW CREATE TABLE t_string_2;
-SHOW CREATE TABLE t_gis;
-SELECT * FROM t_datetime;
-SELECT t_pk,hex(t_bit),t_tinyint,t_bool,t_smallint,t_mediumint,t_int,t_bigint,t_float,t_double,t_decimal FROM t_num;
-SELECT t_pk,t_char,t_varchar,hex(t_binary),hex(t_varbinary) FROM t_string_1;
-SELECT * FROM t_string_2;
-SELECT AsText(t_point), AsText(t_linestring),AsText(t_polygon) FROM t_gis ORDER by t_pk;
-SELECT AsText(t_multipoint), AsText(t_multilinestring),AsText(t_multipolygon) FROM t_gis ORDER by t_pk;
-SELECT AsText(t_geometrycollection), AsText(t_geometry) FROM t_gis ORDER by t_pk;
-
-#
-# Restore backup files (from big endian)
-#
-
-DROP TABLE t_num,t_datetime,t_string_1,t_string_2,t_gis;
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -m -r $MYSQL_TEST_DIR/std_data/ndb_backup51_data_be >> $NDB_TOOLS_OUTPUT
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 2 -r $MYSQL_TEST_DIR/std_data/ndb_backup51_data_be >> $NDB_TOOLS_OUTPUT
-SHOW TABLES;
-SHOW CREATE TABLE t_num;
-SHOW CREATE TABLE t_datetime;
-SHOW CREATE TABLE t_string_1;
-SHOW CREATE TABLE t_string_2;
-SHOW CREATE TABLE t_gis;
-SELECT * FROM t_datetime;
-SELECT t_pk,hex(t_bit),t_tinyint,t_bool,t_smallint,t_mediumint,t_int,t_bigint,t_float,t_double,t_decimal FROM t_num;
-SELECT t_pk,t_char,t_varchar,hex(t_binary),hex(t_varbinary) FROM t_string_1;
-SELECT * FROM t_string_2;
-SELECT AsText(t_point), AsText(t_linestring),AsText(t_polygon) FROM t_gis ORDER by t_pk;
-SELECT AsText(t_multipoint), AsText(t_multilinestring),AsText(t_multipolygon) FROM t_gis ORDER by t_pk;
-SELECT AsText(t_geometrycollection), AsText(t_geometry) FROM t_gis ORDER by t_pk;
-
-DROP TABLE t_num,t_datetime,t_string_1,t_string_2,t_gis;
diff --git a/mysql-test/suite/ndb/t/ndb_restore_partition-master.opt b/mysql-test/suite/ndb/t/ndb_restore_partition-master.opt
deleted file mode 100644
index 075c6392dde..00000000000
--- a/mysql-test/suite/ndb/t/ndb_restore_partition-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---new
diff --git a/mysql-test/suite/ndb/t/ndb_restore_partition.test b/mysql-test/suite/ndb/t/ndb_restore_partition.test
deleted file mode 100644
index f11324492c2..00000000000
--- a/mysql-test/suite/ndb/t/ndb_restore_partition.test
+++ /dev/null
@@ -1,375 +0,0 @@
--- source include/have_ndb.inc
--- source include/ndb_default_cluster.inc
--- source include/not_embedded.inc
-
---disable_warnings
-use test;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
---enable_warnings
-
-CREATE TABLE `t1_c` (
- `capgoaledatta` smallint(5) unsigned NOT NULL auto_increment,
- `goaledatta` char(2) NOT NULL default '',
- `maturegarbagefa` varchar(32) NOT NULL default '',
- PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`)
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
-INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(4,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3,'20','threetrees.qt');
-
-CREATE TABLE `t2_c` (
- `capgotod` smallint(5) unsigned NOT NULL auto_increment,
- `gotod` smallint(5) unsigned NOT NULL default '0',
- `goaledatta` char(2) default NULL,
- `maturegarbagefa` varchar(32) default NULL,
- `descrpooppo` varchar(64) default NULL,
- `svcutonsa` varchar(64) NOT NULL default '',
- PRIMARY KEY (`capgotod`),
- KEY `i_quadaddsvr` (`gotod`)
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
-INSERT INTO `t2_c` VALUES (5,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST');
-
-CREATE TABLE `t3_c` (
- `CapGoaledatta` smallint(5) unsigned NOT NULL default '0',
- `capgotod` smallint(5) unsigned NOT NULL default '0',
- PRIMARY KEY (`capgotod`,`CapGoaledatta`)
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
-INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3);
-
-CREATE TABLE `t4_c` (
- `capfa` bigint(20) unsigned NOT NULL auto_increment,
- `realm` varchar(32) NOT NULL default '',
- `authpwchap` varchar(32) default NULL,
- `fa` varchar(32) NOT NULL default '',
- `payyingatta` tinyint(4) NOT NULL default '0',
- `status` char(1) default NULL,
- PRIMARY KEY (`fa`,`realm`),
- KEY `capfa` (`capfa`),
- KEY `i_quadentity` (`fa`,`realm`)
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
-INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(22,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(29,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL);
-
-CREATE TABLE `t5_c` (
- `capfa` bigint(20) unsigned NOT NULL default '0',
- `gotod` smallint(5) unsigned NOT NULL default '0',
- `orderutonsa` varchar(64) NOT NULL default '',
- PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`)
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
-INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,'');
-
-CREATE TABLE `t6_c` (
- `capfa_parent` bigint(20) unsigned NOT NULL default '0',
- `capfa_child` bigint(20) unsigned NOT NULL default '0',
- `relatta` smallint(5) unsigned NOT NULL default '0',
- PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`)
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
-INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0);
-
-CREATE TABLE `t7_c` (
- `dardpo` char(15) NOT NULL default '',
- `dardtestard` tinyint(3) unsigned NOT NULL default '0',
- `FastFA` char(5) NOT NULL default '',
- `FastCode` char(6) NOT NULL default '',
- `Fastca` char(1) NOT NULL default '',
- `Fastmag` char(1) NOT NULL default '',
- `Beareratta` char(2) NOT NULL default '',
- PRIMARY KEY (`dardpo`,`dardtestard`)
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
-INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3');
-
-CREATE TABLE `t8_c` (
- `kattjame` varchar(32) NOT NULL default '',
- `realm` varchar(32) NOT NULL default '',
- `realm_entered` varchar(32) NOT NULL default '',
- `maturegarbagefa` varchar(32) NOT NULL default '',
- `hunderaaarbagefa_parent` varchar(32) NOT NULL default '',
- `kattjame_entered` varchar(32) NOT NULL default '',
- `hunderaaarbagefa` varchar(32) NOT NULL default '',
- `gest` varchar(16) default NULL,
- `hassetino` varchar(16) NOT NULL default '',
- `aaaproxysessfa` varchar(255) default NULL,
- `autologonallowed` char(1) default NULL,
- `squardporoot` varchar(15) NOT NULL default '',
- `naspo` varchar(15) default NULL,
- `beareratta` char(2) default NULL,
- `fastCode` varchar(6) default NULL,
- `fastFA` varchar(5) default NULL,
- `fastca` char(1) default NULL,
- `fastmag` char(1) default NULL,
- `lastupdate` datetime default NULL,
- `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00',
- `accthassetitime` int(10) unsigned default NULL,
- `acctoutputoctets` bigint(20) unsigned default NULL,
- `acctinputoctets` bigint(20) unsigned default NULL,
- PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`),
- KEY `squardporoot` (`squardporoot`)
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
-INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565);
-
-CREATE TABLE `t9_c` (
- `kattjame` varchar(32) NOT NULL default '',
- `kattjame_entered` varchar(32) NOT NULL default '',
- `realm` varchar(32) NOT NULL default '',
- `realm_entered` varchar(32) NOT NULL default '',
- `maturegarbagefa` varchar(32) NOT NULL default '',
- `hunderaaarbagefa` varchar(32) NOT NULL default '',
- `hunderaaarbagefa_parent` varchar(32) NOT NULL default '',
- `gest` varchar(16) default NULL,
- `hassetino` varchar(16) NOT NULL default '',
- `squardporoot` varchar(15) NOT NULL default '',
- `naspo` varchar(15) default NULL,
- `beareratta` char(2) default NULL,
- `fastCode` varchar(6) default NULL,
- `fastFA` varchar(5) default NULL,
- `fastca` char(1) default NULL,
- `fastmag` char(1) default NULL,
- `lastupdate` datetime default NULL,
- `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00',
- `accthassetitime` int(10) unsigned default NULL,
- `actcoutpuocttets` bigint(20) unsigned default NULL,
- `actinputocctets` bigint(20) unsigned default NULL,
- `terminateraste` tinyint(3) unsigned default NULL,
- PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`)
-) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
-INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3);
-
-create table t1 engine=myisam as select * from t1_c;
-create table t2 engine=myisam as select * from t2_c;
-create table t3 engine=myisam as select * from t3_c;
-create table t4 engine=myisam as select * from t4_c;
-create table t5 engine=myisam as select * from t5_c;
-create table t6 engine=myisam as select * from t6_c;
-create table t7 engine=myisam as select * from t7_c;
-create table t8 engine=myisam as select * from t8_c;
-create table t9 engine=myisam as select * from t9_c;
-
-
---source include/ndb_backup.inc
-drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
-
-# random output order??
-#show tables;
-
-select count(*) from t1;
-select count(*) from t1_c;
-select count(*)
- from (select * from t1 union
- select * from t1_c) a;
-
-select count(*) from t2;
-select count(*) from t2_c;
-select count(*)
- from (select * from t2 union
- select * from t2_c) a;
-
-select count(*) from t3;
-select count(*) from t3_c;
-select count(*)
- from (select * from t3 union
- select * from t3_c) a;
-
-select count(*) from t4;
-select count(*) from t4_c;
-select count(*)
- from (select * from t4 union
- select * from t4_c) a;
-
-select count(*) from t5;
-select count(*) from t5_c;
-select count(*)
- from (select * from t5 union
- select * from t5_c) a;
-
-select count(*) from t6;
-select count(*) from t6_c;
-select count(*)
- from (select * from t6 union
- select * from t6_c) a;
-
-select count(*) from t7;
-select count(*) from t7_c;
-select count(*)
- from (select * from t7 union
- select * from t7_c) a;
-
-select count(*) from t8;
-select count(*) from t8_c;
-select count(*)
- from (select * from t8 union
- select * from t8_c) a;
-
-select count(*) from t9;
-select count(*) from t9_c;
-select count(*)
- from (select * from t9 union
- select * from t9_c) a;
-
-#
-# Try Partitioned tables as well
-#
-ALTER TABLE t1_c
-PARTITION BY RANGE (`capgoaledatta`)
-(PARTITION p0 VALUES LESS THAN MAXVALUE);
-
-ALTER TABLE t2_c
-PARTITION BY LIST(`capgotod`)
-(PARTITION p0 VALUES IN (0,1,2,3,4,5,6));
-
-ALTER TABLE t3_c
-PARTITION BY HASH (`CapGoaledatta`);
-
-ALTER TABLE t5_c
-PARTITION BY HASH (`capfa`)
-PARTITIONS 4;
-
-ALTER TABLE t6_c
-PARTITION BY LINEAR HASH (`relatta`)
-PARTITIONS 4;
-
-ALTER TABLE t7_c
-PARTITION BY LINEAR KEY (`dardtestard`);
-
---source include/ndb_backup.inc
-drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
-
-select count(*) from t1;
-select count(*) from t1_c;
-select count(*)
- from (select * from t1 union
- select * from t1_c) a;
-
-select count(*) from t2;
-select count(*) from t2_c;
-select count(*)
- from (select * from t2 union
- select * from t2_c) a;
-
-select count(*) from t3;
-select count(*) from t3_c;
-select count(*)
- from (select * from t3 union
- select * from t3_c) a;
-
-select count(*) from t4;
-select count(*) from t4_c;
-select count(*)
- from (select * from t4 union
- select * from t4_c) a;
-
-select count(*) from t5;
-select count(*) from t5_c;
-select count(*)
- from (select * from t5 union
- select * from t5_c) a;
-
-select count(*) from t6;
-select count(*) from t6_c;
-select count(*)
- from (select * from t6 union
- select * from t6_c) a;
-
-select count(*) from t7;
-select count(*) from t7_c;
-select count(*)
- from (select * from t7 union
- select * from t7_c) a;
-
-select count(*) from t8;
-select count(*) from t8_c;
-select count(*)
- from (select * from t8 union
- select * from t8_c) a;
-
-select count(*) from t9;
-select count(*) from t9_c;
-select count(*)
- from (select * from t9 union
- select * from t9_c) a;
-
-drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,0)' --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
-
-select count(*) from t1;
-select count(*) from t1_c;
-select count(*)
- from (select * from t1 union
- select * from t1_c) a;
-
-select count(*) from t2;
-select count(*) from t2_c;
-select count(*)
- from (select * from t2 union
- select * from t2_c) a;
-
-select count(*) from t3;
-select count(*) from t3_c;
-select count(*)
- from (select * from t3 union
- select * from t3_c) a;
-
-select count(*) from t4;
-select count(*) from t4_c;
-select count(*)
- from (select * from t4 union
- select * from t4_c) a;
-
-select count(*) from t5;
-select count(*) from t5_c;
-select count(*)
- from (select * from t5 union
- select * from t5_c) a;
-
-select count(*) from t6;
-select count(*) from t6_c;
-select count(*)
- from (select * from t6 union
- select * from t6_c) a;
-
-select count(*) from t7;
-select count(*) from t7_c;
-select count(*)
- from (select * from t7 union
- select * from t7_c) a;
-
-select count(*) from t8;
-select count(*) from t8_c;
-select count(*)
- from (select * from t8 union
- select * from t8_c) a;
-
-select count(*) from t9;
-select count(*) from t9_c;
-select count(*)
- from (select * from t9 union
- select * from t9_c) a;
-
-#
-# Drop all table except t2_c
-# This to make sure that error returned from ndb_restore above is
-# guaranteed to be from t2_c, this since order of tables in backup
-# is none deterministic
-#
-drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
---source include/ndb_backup.inc
---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --core=0 -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,1)' $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id 2>&1 | grep Translate || true
-
-#
-# Cleanup
-#
-
---disable_warnings
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-drop table if exists t2_c;
---enable_warnings
-
-#
-# Test BUG#10287
-#
-
---exec $NDB_TOOLS_DIR/ndb_select_all --no-defaults -d sys -D , SYSTAB_0 | grep 520093696, | sed "s/,$the_backup_id/,<the_backup_id>/"
-
-# End of 4.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_restore_print.test b/mysql-test/suite/ndb/t/ndb_restore_print.test
deleted file mode 100644
index 9a880f8968c..00000000000
--- a/mysql-test/suite/ndb/t/ndb_restore_print.test
+++ /dev/null
@@ -1,193 +0,0 @@
--- source include/have_ndb.inc
--- source include/ndb_default_cluster.inc
--- source include/not_embedded.inc
-
---disable_warnings
-use test;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
---enable_warnings
-
-# basic datatypes
-create table t1
- (pk int key
- ,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64)
- ,b1 TINYINT, b2 TINYINT UNSIGNED
- ,c1 SMALLINT, c2 SMALLINT UNSIGNED
- ,d1 INT, d2 INT UNSIGNED
- ,e1 BIGINT, e2 BIGINT UNSIGNED
- ,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY
- ,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY
- ,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255)
- ,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000)
- ) engine myisam;
-
-# max values
-insert into t1 values
- (1
- ,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001
- ,127, 255
- ,32767, 65535
- ,2147483647, 4294967295
- ,9223372036854775807, 18446744073709551615
- ,'1','12345678901234567890123456789012','123456789'
- ,'1','12345678901234567890123456789012','123456789'
- ,0x12,0x123456789abcdef0, 0x012345
- ,0x12,0x123456789abcdef0, 0x00123450
- );
-
-# min values
-insert into t1 values
- (2
- ,0, 0, 0, 0, 0
- ,-128, 0
- ,-32768, 0
- ,-2147483648, 0
- ,-9223372036854775808, 0
- ,'','',''
- ,'','',''
- ,0x0,0x0,0x0
- ,0x0,0x0,0x0
- );
-
-# null values
-insert into t1 values
- (3
- ,NULL,NULL,NULL,NULL,NULL
- ,NULL,NULL
- ,NULL,NULL
- ,NULL,NULL
- ,NULL,NULL
- ,NULL,NULL,NULL
- ,NULL,NULL,NULL
- ,NULL,NULL,NULL
- ,NULL,NULL,NULL
- );
-
---vertical_results
-select pk
- ,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5)
- ,b1, b2
- ,c1 , c2
- ,d1 , d2
- ,e1 , e2
- ,f1 , f2, f3
- ,g1 , g2, g3
- ,hex(h1), hex(h2), hex(h3)
- ,hex(i1), hex(i2), hex(i3)
- from t1 order by pk;
-
-alter table t1 engine ndb;
-
-select pk
- ,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5)
- ,b1, b2
- ,c1 , c2
- ,d1 , d2
- ,e1 , e2
- ,f1 , f2, f3
- ,g1 , g2, g3
- ,hex(h1), hex(h2), hex(h3)
- ,hex(i1), hex(i2), hex(i3)
- from t1 order by pk;
---horizontal_results
-
---source include/ndb_backup.inc
-
---let ndb_restore_filter=test t1
---let ndb_restore_opts=--verbose=0 --print_data --hex --fields-terminated-by=";"
---source include/ndb_backup_print.inc
-
---let ndb_restore_filter=test t1
---let ndb_restore_opts=--verbose=0 --print_data --hex --fields-terminated-by="," --fields-optionally-enclosed-by="'"
---source include/ndb_backup_print.inc
-
-
-drop table t1;
-
-# some binary char tests with trailing spaces
-create table t1
- (pk int key
- ,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY
- ,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY
- ,h1 BINARY(1), h2 BINARY(9), h3 BINARY(255)
- ,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000)
- ) engine ndb;
-
-insert into t1 values
- (1
- ,'1','12345678901234567890123456789012','123456789 '
- ,'1 ','12345678901234567890123456789012 ','123456789 '
- ,0x20,0x123456789abcdef020, 0x012345000020
- ,0x1200000020,0x123456789abcdef000000020, 0x00123450000020
- );
-
-create table t2 (pk int key, a int) engine ndb;
-create table t3 (pk int key, a int) engine ndb;
-create table t4 (pk int key, a int) engine ndb;
-
-insert into t2 values (1,11),(2,12),(3,13),(4,14),(5,15);
-insert into t3 values (1,21),(2,22),(3,23),(4,24),(5,25);
-insert into t4 values (1,31),(2,32),(3,33),(4,34),(5,35);
-
---source include/ndb_backup.inc
---let ndb_restore_opts=--verbose=0 --print_data --hex --fields-enclosed-by="'" --fields-optionally-enclosed-by="X"
---let ndb_restore_filter=test t1
---source include/ndb_backup_print.inc
-
---error 0,1
---remove_file $MYSQLTEST_VARDIR/tmp/t1.txt
---error 0,1
---remove_file $MYSQLTEST_VARDIR/tmp/t2.txt
---error 0,1
---remove_file $MYSQLTEST_VARDIR/tmp/t3.txt
---error 0,1
---remove_file $MYSQLTEST_VARDIR/tmp/t4.txt
-
---let ndb_restore_opts=--verbose=0 --print_data --hex --tab $MYSQLTEST_VARDIR/tmp --append
---let ndb_restore_filter=test
---source include/ndb_backup_print.inc
-
---let $message= t1
---source include/show_msg.inc
---exec sort $MYSQLTEST_VARDIR/tmp/t1.txt
---let $message= t2
---source include/show_msg.inc
---exec sort $MYSQLTEST_VARDIR/tmp/t2.txt
---let $message= t3
---source include/show_msg.inc
---exec sort $MYSQLTEST_VARDIR/tmp/t3.txt
---let $message= t4
---source include/show_msg.inc
---exec sort $MYSQLTEST_VARDIR/tmp/t4.txt
-
---remove_file $MYSQLTEST_VARDIR/tmp/t1.txt
---remove_file $MYSQLTEST_VARDIR/tmp/t2.txt
---remove_file $MYSQLTEST_VARDIR/tmp/t3.txt
---remove_file $MYSQLTEST_VARDIR/tmp/t4.txt
-
-# now test some other datatypes
-drop table t1;
-create table t1
- (pk int key
- ,a1 MEDIUMINT, a2 MEDIUMINT UNSIGNED
- ) engine ndb;
-
-# max values
-insert into t1 values(1, 8388607, 16777215);
-# min values
-insert into t1 values(2, -8388608, 0);
-# small values
-insert into t1 values(3, -1, 1);
-
-# backup and print
---source include/ndb_backup.inc
-
---let ndb_restore_filter=test t1
---let ndb_restore_opts=--verbose=0 --print_data --hex --fields-terminated-by=";"
---source include/ndb_backup_print.inc
-
-# clean up
-drop table t1;
-drop table t2;
-drop table t3;
-drop table t4;
diff --git a/mysql-test/suite/ndb/t/ndb_row_format.test b/mysql-test/suite/ndb/t/ndb_row_format.test
deleted file mode 100644
index b1582cbe339..00000000000
--- a/mysql-test/suite/ndb/t/ndb_row_format.test
+++ /dev/null
@@ -1,86 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
-drop database if exists mysqltest;
---enable_warnings
-
-#
-# some negative tests
-#
-
-# cannot have ROW_FORMAT=FIXED and var attrs mixed
---error 1005
-CREATE TABLE t1
- ( a INT KEY,
- b VARCHAR(10) )
- ROW_FORMAT=FIXED
- ENGINE=NDB;
-
-# warnings give more detail on the error
-SHOW WARNINGS;
-
-
-#
-# Check force var part for different ROW_FORMAT
-#
-
-# default => ForceVarPart: 1
-CREATE TABLE t1
- ( a INT KEY,
- b INT )
- ENGINE=NDB;
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart
-DROP TABLE t1;
-
-# explicit DEFAULT => ForceVarPart: 1
-CREATE TABLE t1
- ( a INT KEY,
- b INT )
- ROW_FORMAT=DEFAULT
- ENGINE=NDB;
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart
-DROP TABLE t1;
-
-# FIXED => ForceVarPart: 0
-CREATE TABLE t1
- ( a INT KEY,
- b INT )
- ROW_FORMAT=FIXED
- ENGINE=NDB;
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart
-DROP TABLE t1;
-
-# DYNAMIC => ForceVarPart: 1
-CREATE TABLE t1
- ( a INT KEY,
- b INT )
- ROW_FORMAT=DYNAMIC
- ENGINE=NDB;
---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart
-DROP TABLE t1;
-
-# test of bug
-create table t1 (a int auto_increment primary key, b varchar(1000)) engine = ndb;
-insert into t1(b) values ('0123456789');
-insert into t1(b) select b from t1;
-insert into t1(b) select b from t1;
-insert into t1(b) select b from t1;
-insert into t1(b) select b from t1;
-insert into t1(b) select b from t1;
-insert into t1(b) select b from t1;
-insert into t1(b) select b from t1;
-insert into t1(b) select b from t1;
-insert into t1(b) select b from t1;
-insert into t1(b) select b from t1;
-select count(*) from t1;
-begin;
-update t1 set b = concat(b,b);
-update t1 set b = concat(b,b);
-update t1 set b = concat(b,b);
-update t1 set b = concat(b,b);
-update t1 set b = concat(b,b);
-rollback;
-select count(*),b from t1 group by b;
-drop table t1;
diff --git a/mysql-test/suite/ndb/t/ndb_single_user.test b/mysql-test/suite/ndb/t/ndb_single_user.test
deleted file mode 100644
index a64ac066a49..00000000000
--- a/mysql-test/suite/ndb/t/ndb_single_user.test
+++ /dev/null
@@ -1,174 +0,0 @@
--- source include/have_multi_ndb.inc
--- source include/ndb_default_cluster.inc
--- source include/not_embedded.inc
-
---disable_warnings
-drop table if exists t1,t2;
---enable_warnings
-
-# operations allowed while cluster is in single user mode
-
---connection server1
---let $node_id= `SHOW STATUS LIKE 'Ndb_cluster_node_id'`
---disable_query_log
---eval set @node_id= SUBSTRING('$node_id', 20)+0
---enable_query_log
---let $node_id= `SELECT @node_id`
---exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "enter single user mode $node_id" >> $NDB_TOOLS_OUTPUT
---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" --single-user >> $NDB_TOOLS_OUTPUT
-
-# verify that we are indeed in single user mode
-# and test that some operations give correct errors
---connection server2
---error 1005
-create table t1 (a int key, b int unique, c int) engine ndb;
-# Bug #27712 Single user mode. Creating logfile group and tablespace is allowed
-# - before bug fix these would succeed
---error ER_CREATE_FILEGROUP_FAILED
-CREATE LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile.dat'
-INITIAL_SIZE 16M
-UNDO_BUFFER_SIZE = 1M
-ENGINE=NDB;
-show warnings;
-
-# test some sql on first mysqld
---connection server1
-create table t1 (a int key, b int unique, c int) engine ndb;
-# Check that we can create logfile group
-CREATE LOGFILE GROUP lg1
-ADD UNDOFILE 'undofile.dat'
-INITIAL_SIZE 16M
-UNDO_BUFFER_SIZE = 1M
-ENGINE=NDB;
---connection server2
---error ER_CREATE_FILEGROUP_FAILED
-CREATE TABLESPACE ts1
-ADD DATAFILE 'datafile.dat'
-USE LOGFILE GROUP lg1
-INITIAL_SIZE 12M
-ENGINE NDB;
-show warnings;
---error ER_DROP_FILEGROUP_FAILED
-DROP LOGFILE GROUP lg1
-ENGINE =NDB;
-show warnings;
---connection server1
-CREATE TABLESPACE ts1
-ADD DATAFILE 'datafile.dat'
-USE LOGFILE GROUP lg1
-INITIAL_SIZE 12M
-ENGINE NDB;
---connection server2
---error ER_ALTER_FILEGROUP_FAILED
-ALTER TABLESPACE ts1
-DROP DATAFILE 'datafile.dat'
-ENGINE NDB;
-show warnings;
---connection server1
-ALTER TABLESPACE ts1
-DROP DATAFILE 'datafile.dat'
-ENGINE NDB;
---connection server2
---error ER_DROP_FILEGROUP_FAILED
-DROP TABLESPACE ts1
-ENGINE NDB;
-show warnings;
---connection server1
-DROP TABLESPACE ts1
-ENGINE NDB;
-DROP LOGFILE GROUP lg1
-ENGINE =NDB;
-insert into t1 values (1,1,0),(2,2,0),(3,3,0),(4,4,0),(5,5,0),(6,6,0),(7,7,0),(8,8,0),(9,9,0),(10,10,0);
-create table t2 as select * from t1;
-# read with pk
-select * from t1 where a = 1;
-# read with unique index
-select * from t1 where b = 4;
-# read with ordered index
-select * from t1 where a > 4 order by a;
-# update with pk
-update t1 set b=102 where a = 2;
-# update with unique index
-update t1 set b=103 where b = 3;
-# update with full table scan
-update t1 set b=b+100;
-# update with ordered insex scan
-update t1 set b=b+100 where a > 7;
-# delete with full table scan
-delete from t1;
-insert into t1 select * from t2;
-# Bug #27710 Creating unique index fails during single user mode
-# - prior to bugfix this would fail
-create unique index new_index on t1 (b,c);
-
-drop table t2;
-
-# test some sql on other mysqld
---connection server2
---error 1051
-drop table t1;
---error 1296
-create index new_index_fail on t1 (c);
---error 1296
-insert into t1 values (21,21,0),(22,22,0),(23,23,0),(24,24,0),(25,25,0),(26,26,0),(27,27,0),(28,28,0),(29,29,0),(210,210,0);
---error 1296
-select * from t1 where a = 1;
---error 1296
-select * from t1 where b = 4;
---error 1296
-update t1 set b=102 where a = 2;
---error 1296
-update t1 set b=103 where b = 3;
---error 1296
-update t1 set b=b+100;
---error 1296
-update t1 set b=b+100 where a > 7;
-
---exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "exit single user mode" >> $NDB_TOOLS_OUTPUT
---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT
-
-#
-# we should be able to run transaction while in single user mode
-#
---connection server1
-BEGIN;
-update t1 set b=b+100 where a=1;
-
---connection server2
-BEGIN;
-update t1 set b=b+100 where a=2;
-
-# enter single user mode
---exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "enter single user mode $node_id" >> $NDB_TOOLS_OUTPUT
---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" --single-user >> $NDB_TOOLS_OUTPUT
-
---connection server1
-update t1 set b=b+100 where a=3;
-COMMIT;
-
-# while on other mysqld it should be aborted
---connection server2
---error 1296
-update t1 set b=b+100 where a=4;
---error 1296
-COMMIT;
-
-# Bug #25275 SINGLE USER MODE prevents ALTER on non-ndb
-# tables for other mysqld nodes
---connection server2
-create table t2 (a int) engine myisam;
-alter table t2 add column (b int);
-
-# exit single user mode
---exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "exit single user mode" >> $NDB_TOOLS_OUTPUT
---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT
-
-# cleanup
---connection server2
-drop table t2;
---connection server1
-drop table t1;
-
-# End of 5.0 tests
-
diff --git a/mysql-test/suite/ndb/t/ndb_sp.test b/mysql-test/suite/ndb/t/ndb_sp.test
deleted file mode 100644
index b833869cad0..00000000000
--- a/mysql-test/suite/ndb/t/ndb_sp.test
+++ /dev/null
@@ -1,42 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-create table t1 (
- a int not null primary key,
- b int not null
-) engine=ndb;
-insert into t1 values (1,10), (2,20), (3,100), (4, 100);
-
-delimiter //;
-create procedure test_proc1 (in var_in int)
-begin
- select * from t1 where a = var_in;
-end;
-create procedure test_proc2 (out var_out int)
-begin
- select b from t1 where a = 1 into var_out;
-end;
-create procedure test_proc3 (inout var_inout int)
-begin
- select b from t1 where a = var_inout into var_inout;
-end;
-//
-delimiter ;//
-call test_proc1(1);
-call test_proc2(@test_var);
-select @test_var;
-set @test_var = 1;
-call test_proc3(@test_var);
-select @test_var;
-alter procedure test_proc1 comment 'new comment';
-show create procedure test_proc1;
-drop procedure test_proc1;
-drop procedure test_proc2;
-drop procedure test_proc3;
-drop table t1;
-
---echo End of 5.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_subquery.test b/mysql-test/suite/ndb/t/ndb_subquery.test
deleted file mode 100644
index 6282c31c922..00000000000
--- a/mysql-test/suite/ndb/t/ndb_subquery.test
+++ /dev/null
@@ -1,79 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-drop table if exists t1, t2, t3, t4;
---enable_warnings
-
-##########
-# bug#5367
-create table t1 (p int not null primary key, u int not null, o int not null,
-unique (u), key(o)) engine=ndb;
-
-create table t2 (p int not null primary key, u int not null, o int not null,
-unique (u), key(o)) engine=ndb;
-
-create table t3 (a int not null primary key, b int not null) engine=ndb;
-create table t4 (c int not null primary key, d int not null) engine=ndb;
-
-insert into t1 values (1,1,1),(2,2,2),(3,3,3);
-insert into t2 values (1,1,1),(2,2,2),(3,3,3), (4,4,4), (5,5,5);
-insert into t3 values (1,10), (2,10), (3,30), (4, 30);
-insert into t4 values (1,10), (2,10), (3,30), (4, 30);
-
-# Use pk
---replace_column 9 #
-explain select * from t2 where p NOT IN (select p from t1);
-select * from t2 where p NOT IN (select p from t1) order by p;
-
-# Use unique index
---replace_column 9 #
-explain select * from t2 where p NOT IN (select u from t1);
-select * from t2 where p NOT IN (select u from t1) order by p;
-
-# Use ordered index
---replace_column 9 #
-explain select * from t2 where p NOT IN (select o from t1);
-select * from t2 where p NOT IN (select o from t1) order by p;
-
-# Use scan
---replace_column 9 #
-explain select * from t2 where p NOT IN (select p+0 from t1);
-select * from t2 where p NOT IN (select p+0 from t1) order by p;
-
-drop table t1;
-drop table t2;
-# bug#5367
-##########
-
-# End of 4.1 tests
-
-#
-# bug#11205
-#
-create table t1 (p int not null primary key, u int not null) engine=ndb;
-insert into t1 values (1,1),(2,2),(3,3);
-
-create table t2 as
-select t1.*
-from t1 as t1, t1 as t2, t1 as t3, t1 as t4, t1 as t5, t1 as t6, t1 as t7, t1 as t8
-where t1.u = t2.u
- and t2.u = t3.u
- and t3.u = t4.u
- and t4.u = t5.u
- and t5.u = t6.u
- and t6.u = t7.u
- and t7.u = t8.u;
-
-select * from t2 order by 1;
-
-select * from t3 where a = any (select c from t4 where c = 1) order by a;
-select * from t3 where a in (select c from t4 where c = 1) order by a;
-select * from t3 where a <> some (select c from t4 where c = 1) order by a;
-select * from t3 where a > all (select c from t4 where c = 1) order by a;
-select * from t3 where row(1,10) = (select c,d from t4 where c = 1) order by a;
-select * from t3 where exists (select * from t4 where c = 1) order by a;
-
-drop table if exists t1, t2, t3, t4;
-
---echo End of 5.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_temporary.test b/mysql-test/suite/ndb/t/ndb_temporary.test
deleted file mode 100644
index 7f6902bf745..00000000000
--- a/mysql-test/suite/ndb/t/ndb_temporary.test
+++ /dev/null
@@ -1,38 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-#
-# creating a temporary table with engine=ndb should give an error
-#
---error ER_ILLEGAL_HA_CREATE_OPTION
-create temporary table t1 (a int key) engine=ndb;
-
-
-#
-# alter temporary table to engine=ndb should give an error
-#
-create temporary table t1 (a int key) engine=myisam;
---error ER_ILLEGAL_HA_CREATE_OPTION
-alter table t1 engine=ndb;
-drop table t1;
-
-
-#
-# if default storage engine=ndb, temporary tables
-# without explicit engine= should be created as myisam
-#
-SET SESSION storage_engine=NDBCLUSTER;
-create table t1 (a int key);
-
-# verify that we have a ndb table
-select engine from information_schema.tables where table_name = 't1';
-drop table t1;
-
-# verify that we have a myisam table
-create temporary table t1 (a int key);
-show create table t1;
-drop table t1;
diff --git a/mysql-test/suite/ndb/t/ndb_tmp_table_and_DDL.test b/mysql-test/suite/ndb/t/ndb_tmp_table_and_DDL.test
deleted file mode 100644
index 748c0ac28e4..00000000000
--- a/mysql-test/suite/ndb/t/ndb_tmp_table_and_DDL.test
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# Bug#49132
-# This test verifies if executing DDL statement before trying to manipulate
-# a temporary table causes row-based replication to break with error 'table
-# does not exist' base on ndb engine.
-#
-
-source include/have_ndb.inc;
-
-LET $ENGINE_TYPE= NDB;
-source extra/rpl_tests/rpl_tmp_table_and_DDL.test;
diff --git a/mysql-test/suite/ndb/t/ndb_transaction.test b/mysql-test/suite/ndb/t/ndb_transaction.test
deleted file mode 100644
index d3ebadb1a78..00000000000
--- a/mysql-test/suite/ndb/t/ndb_transaction.test
+++ /dev/null
@@ -1,298 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
-drop database if exists mysqltest;
---enable_warnings
-
-#
-# Transactionc test to show that the NDB
-# table handler is working properly with
-# transactions
-#
-
-#
-# Create a normal table with primary key
-#
-CREATE TABLE t1 (
- pk1 INT NOT NULL PRIMARY KEY,
- attr1 INT NOT NULL
-) ENGINE=ndbcluster;
-
-# insert
-begin;
-insert into t1 values(1,1);
-insert into t1 values(2,2);
-select count(*) from t1;
-select * from t1 where pk1 = 1;
-select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1;
-rollback;
-
-select count(*) from t1;
-select * from t1 where pk1 = 1;
-select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1;
-
-begin;
-insert into t1 values(1,1);
-insert into t1 values(2,2);
-commit;
-
-select count(*) from t1;
-select * from t1 where pk1 = 1;
-select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1;
-
-# update
-begin;
-update t1 set attr1 = attr1 * 2;
-select count(*) from t1;
-select * from t1 where pk1 = 1;
-select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2;
-rollback;
-
-select count(*) from t1;
-select * from t1 where pk1 = 1;
-select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2;
-
-begin;
-update t1 set attr1 = attr1 * 2;
-commit;
-
-select count(*) from t1;
-select * from t1 where pk1 = 1;
-select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2;
-
-# delete
-begin;
-delete from t1 where attr1 = 2;
-select count(*) from t1;
-select * from t1 where pk1 = 1;
-select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2;
-rollback;
-
-select count(*) from t1;
-select * from t1 where pk1 = 1;
-select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2;
-
-begin;
-delete from t1 where attr1 = 2;
-commit;
-
-select count(*) from t1;
-select * from t1 where pk1 = 1;
-select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2;
-
-DROP TABLE t1;
-
-#
-# Create table without primary key
-# a hidden primary key column is created by handler
-#
-CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster;
-
-# insert
-begin;
-insert into t1 values(1,1);
-insert into t1 values(2,2);
-select sum(id) from t1;
-select * from t1 where id = 1;
-select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1;
-rollback;
-
-select sum(id) from t1;
-select * from t1 where id = 1;
-select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1;
-
-begin;
-insert into t1 values(1,1);
-insert into t1 values(2,2);
-commit;
-
-select sum(id) from t1;
-select * from t1 where id = 1;
-select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1;
-
-# update
-begin;
-update t1 set id = id * 2;
-select sum(id) from t1;
-select * from t1 where id = 2;
-select * from t1, t1 as t1x where t1x.id = t1.id - 2;
-rollback;
-
-select sum(id) from t1;
-select * from t1 where id = 2;
-select * from t1, t1 as t1x where t1x.id = t1.id - 2;
-
-begin;
-update t1 set id = id * 2;
-commit;
-
-select sum(id) from t1;
-select * from t1 where id = 2;
-select * from t1, t1 as t1x where t1x.id = t1.id - 2;
-
-# delete
-
-DROP TABLE t1;
-
-#
-# A more extensive test with a lot more records
-#
-
-CREATE TABLE t2 (
- a bigint unsigned NOT NULL PRIMARY KEY,
- b int unsigned not null,
- c int unsigned
-) engine=ndbcluster;
-
-CREATE TABLE t3 (
- a bigint unsigned NOT NULL,
- b bigint unsigned not null,
- c bigint unsigned,
- PRIMARY KEY(a)
-) engine=ndbcluster;
-
-CREATE TABLE t4 (
- a bigint unsigned NOT NULL,
- b bigint unsigned not null,
- c bigint unsigned NOT NULL,
- d int unsigned,
- PRIMARY KEY(a, b, c)
-) engine=ndbcluster;
-
-
-#
-# insert records into tables and rollback
-#
-let $1=100;
-disable_query_log;
-begin;
-while ($1)
-{
- eval insert into t2 values($1, $1+9, 5);
- eval insert into t3 values($1, $1+9, 5);
- eval insert into t4 values($1, $1+9, 5, $1+26000);
- dec $1;
-}
-rollback;
-enable_query_log;
-
-select count(*) from t2;
-select count(*) from t3;
-select count(*) from t4;
-
-#
-# insert records into tables and commit;
-#
-let $1=100;
-disable_query_log;
-begin;
-while ($1)
-{
- eval insert into t2 values($1, $1+9, 5);
- eval insert into t3 values($1, $1+9, 5);
- eval insert into t4 values($1, $1+9, 5, $1+26000);
- dec $1;
-}
-commit;
-enable_query_log;
-
-select count(*) from t2;
-select count(*) from t3;
-select count(*) from t4;
-
-#
-# delete every other record in the tables
-#
-let $1=100;
-disable_query_log;
-while ($1)
-{
- eval delete from t2 where a=$1;
- eval delete from t3 where a=$1;
- eval delete from t4 where a=$1 and b=$1+9 and c=5;
- dec $1;
- dec $1;
-}
-enable_query_log;
-
-#
-# update records and rollback
-#
-begin;
-let $1=100;
-disable_query_log;
-while ($1)
-{
- eval update t2 set c=$1 where a=$1;
- eval update t3 set c=7 where a=$1 and b=$1+9 and c=5;
- eval update t4 set d=$1+21987 where a=$1 and b=$1+9 and c=5;
- dec $1;
- dec $1;
-}
-rollback;
-enable_query_log;
-
-#
-# update records and commit
-#
-begin;
-let $1=100;
-disable_query_log;
-while ($1)
-{
- eval update t2 set c=$1 where a=$1;
- eval update t3 set c=7 where a=$1 and b=$1+9 and c=5;
- eval update t4 set d=$1+21987 where a=$1 and b=$1+9 and c=5;
- dec $1;
- dec $1;
-}
-rollback;
-enable_query_log;
-
-drop table t2;
-drop table t3;
-drop table t4;
-
-#
-# Test multiple databases in one transaction
-#
-
-CREATE TABLE t1 (
- pk1 INT NOT NULL PRIMARY KEY,
- attr1 INT NOT NULL
-) ENGINE=ndbcluster;
-
-create database mysqltest;
-use mysqltest;
-
-CREATE TABLE t2 (
- a bigint unsigned NOT NULL PRIMARY KEY,
- b int unsigned not null,
- c int unsigned
-) engine=ndbcluster;
-
-begin;
-insert into test.t1 values(1,1);
-insert into t2 values(1,1,1);
-insert into test.t1 values(2,2);
-insert into t2 values(2,2,2);
-select count(*) from test.t1;
-select count(*) from t2;
-select * from test.t1 where pk1 = 1;
-select * from t2 where a = 1;
-select test.t1.attr1
-from test.t1, test.t1 as t1x where test.t1.pk1 = t1x.pk1 + 1;
-select t2.a
-from t2, t2 as t2x where t2.a = t2x.a + 1;
-select test.t1.pk1, a from test.t1,t2 where b > test.t1.attr1;
-rollback;
-
-select count(*) from test.t1;
-select count(*) from t2;
-
-drop table test.t1, t2;
-drop database mysqltest;
-
-# End of 4.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_trigger.test b/mysql-test/suite/ndb/t/ndb_trigger.test
deleted file mode 100644
index 9f01157fc93..00000000000
--- a/mysql-test/suite/ndb/t/ndb_trigger.test
+++ /dev/null
@@ -1,221 +0,0 @@
-# Tests which involve triggers and NDB storage engine
---source include/have_ndb.inc
---source include/not_embedded.inc
-
-#
-# Test for bug#18437 "Wrong values inserted with a before update
-# trigger on NDB table". SQL-layer didn't properly inform handler
-# about fields which were read and set in triggers. In some cases
-# this resulted in incorrect (garbage) values of OLD variables and
-# lost changes to NEW variables.
-# You can find similar tests for ON INSERT triggers in federated.test
-# since this engine so far is the only engine in MySQL which cares
-# about field mark-up during handler::write_row() operation.
-#
-
---disable_warnings
-drop table if exists t1, t2, t3, t4, t5;
---enable_warnings
-
-create table t1 (id int primary key, a int not null, b decimal (63,30) default 0) engine=ndb;
-create table t2 (op char(1), a int not null, b decimal (63,30)) engine=ndb;
-create table t3 engine=ndb select 1 as i;
-create table t4 (a int not null primary key, b int) engine=ndb;
-create table t5 (a int not null primary key, b int) engine=ndb;
-
-delimiter //;
-create trigger t1_bu before update on t1 for each row
-begin
- insert into t2 values ("u", old.a, old.b);
- set new.b = old.b + 10;
-end;//
-create trigger t1_bd before delete on t1 for each row
-begin
- insert into t2 values ("d", old.a, old.b);
-end;//
-create trigger t4_au after update on t4
- for each row begin
- update t5 set b = b+1;
- end;
-//
-create trigger t4_ad after delete on t4
- for each row begin
- update t5 set b = b+1;
- end;
-//
-delimiter ;//
-
-insert into t1 values (1, 1, 1.05), (2, 2, 2.05), (3, 3, 3.05), (4, 4, 4.05);
-insert into t4 values (1,1), (2,2), (3,3), (4, 4);
-insert into t5 values (1,0);
-
-# Check that usual update works as it should
-update t1 set a=5 where a != 3;
-select * from t1 order by id;
-select * from t2 order by op, a, b;
-delete from t2;
-# Check that everything works for multi-update
-update t1, t3 set a=6 where a = 5;
-select * from t1 order by id;
-select * from t2 order by op, a, b;
-delete from t2;
-# Check for delete
-delete from t1 where a != 3;
-select * from t1 order by id;
-select * from t2 order by op, a, b;
-delete from t2;
-# Check for multi-delete
-insert into t1 values (1, 1, 1.05), (2, 2, 2.05), (4, 4, 4.05);
-delete t1 from t1, t3 where a != 3;
-select * from t1 order by id;
-select * from t2 order by op, a, b;
-delete from t2;
-# Check for insert ... on duplicate key update
-insert into t1 values (4, 4, 4.05);
-insert into t1 (id, a) values (4, 1), (3, 1) on duplicate key update a= a + 1;
-select * from t1 order by id;
-select * from t2 order by op, a, b;
-delete from t2;
-# Check for insert ... select ... on duplicate key update
-delete from t3;
-insert into t3 values (4), (3);
-insert into t1 (id, a) (select i, 1 from t3) on duplicate key update a= a + 1;
-select * from t1 order by id;
-select * from t2 order by op, a, b;
-delete from t2;
-# Check for replace
-replace into t1 (id, a) values (4, 1), (3, 1);
-select * from t1 order by id;
-select * from t2 order by op, a, b;
-delete from t1;
-delete from t2;
-# Check for replace ... select ...
-insert into t1 values (3, 1, 1.05), (4, 1, 2.05);
-replace into t1 (id, a) (select i, 2 from t3);
-select * from t1 order by id;
-select * from t2 order by op, a, b;
-delete from t1;
-delete from t2;
-# Check for load data replace
-insert into t1 values (3, 1, 1.05), (5, 2, 2.05);
-load data infile '../../../std_data/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (id, a);
-select * from t1 order by id;
-select * from t2 order by op, a, b;
-update t4 set b = 10 where a = 1;
-select * from t5 order by a;
-update t5 set b = 0;
-delete from t4 where a = 1;
-select * from t5 order by a;
-drop trigger t4_au;
-drop trigger t4_ad;
-
-drop table t1, t2, t3, t4, t5;
-# Test for bug#26242
-# Verify that AFTER UPDATE/DELETE triggers are executed
-# after the change has actually taken place
-
-CREATE TABLE t1 (
- id INT NOT NULL PRIMARY KEY,
- xy INT
-) ENGINE=ndbcluster;
-
-INSERT INTO t1 VALUES (1, 0);
-
-DELIMITER //;
-CREATE TRIGGER t1_update AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id = NEW.id; END //
-DELIMITER ;//
-
-CREATE TABLE t2 (
- id INT NOT NULL PRIMARY KEY,
- xy INT
-) ENGINE=ndbcluster;
-
-INSERT INTO t2 VALUES (2, 0);
-
-CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY) ENGINE=ndbcluster;
-
-INSERT INTO t3 VALUES (1);
-
-CREATE TABLE t4 LIKE t1;
-
-DELIMITER //;
-CREATE TRIGGER t4_update AFTER UPDATE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id = NEW.id; END //
-DELIMITER ;//
-
-CREATE TABLE t5 LIKE t2;
-
-UPDATE t1 SET xy = 3 WHERE id = 1;
-SELECT xy FROM t1 where id = 1;
-SELECT xy FROM t2 where id = 1;
-
-UPDATE t1 SET xy = 4 WHERE id IN (SELECT id FROM t3 WHERE id = 1);
-SELECT xy FROM t1 where id = 1;
-SELECT xy FROM t2 where id = 1;
-
-INSERT INTO t4 SELECT * FROM t1;
-INSERT INTO t5 SELECT * FROM t2;
-UPDATE t1,t4 SET t1.xy = 3, t4.xy = 3 WHERE t1.id = 1 AND t4.id = 1;
-SELECT xy FROM t1 where id = 1;
-SELECT xy FROM t2 where id = 1;
-SELECT xy FROM t4 where id = 1;
-SELECT xy FROM t5 where id = 1;
-
-UPDATE t1,t4 SET t1.xy = 4, t4.xy = 4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 1) AND t4.id IN (SELECT id FROM t3 WHERE id = 1);
-SELECT xy FROM t1 where id = 1;
-SELECT xy FROM t2 where id = 1;
-SELECT xy FROM t4 where id = 1;
-SELECT xy FROM t5 where id = 1;
-
-INSERT INTO t1 VALUES (1,0) ON DUPLICATE KEY UPDATE xy = 5;
-SELECT xy FROM t1 where id = 1;
-SELECT xy FROM t2 where id = 1;
-
-DROP TRIGGER t1_update;
-DROP TRIGGER t4_update;
-
-DELIMITER //;
-CREATE TRIGGER t1_delete AFTER DELETE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id > 4; END //
-DELIMITER ;//
-
-DELIMITER //;
-CREATE TRIGGER t4_delete AFTER DELETE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id > 4; END //
-DELIMITER ;//
-
-INSERT INTO t1 VALUES (5, 0),(6,0);
-INSERT INTO t2 VALUES (5, 1),(6,1);
-INSERT INTO t3 VALUES (5);
-SELECT * FROM t1 order by id;
-SELECT * FROM t2 order by id;
-DELETE FROM t1 WHERE id IN (SELECT id FROM t3 WHERE id = 5);
-SELECT * FROM t1 order by id;
-SELECT * FROM t2 order by id;
-
-INSERT INTO t1 VALUES (5,0);
-UPDATE t2 SET xy = 1 WHERE id = 6;
-TRUNCATE t4;
-INSERT INTO t4 SELECT * FROM t1;
-TRUNCATE t5;
-INSERT INTO t5 SELECT * FROM t2;
-SELECT * FROM t1 order by id;
-SELECT * FROM t2 order by id;
-SELECT * FROM t4 order by id;
-SELECT * FROM t5 order by id;
-DELETE FROM t1,t4 USING t1,t3,t4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 5) AND t4.id IN (SELECT id FROM t3 WHERE id = 5);
-SELECT * FROM t1 order by id;
-SELECT * FROM t2 order by id;
-SELECT * FROM t4 order by id;
-SELECT * FROM t5 order by id;
-
-INSERT INTO t1 VALUES (5, 0);
-REPLACE INTO t2 VALUES (6,1);
-SELECT * FROM t1 order by id;
-SELECT * FROM t2 order by id;
-REPLACE INTO t1 VALUES (5, 1);
-SELECT * FROM t1 order by id;
-SELECT * FROM t2 order by id;
-
-DROP TRIGGER t1_delete;
-DROP TRIGGER t4_delete;
-DROP TABLE t1, t2, t3, t4, t5;
-
---echo End of 5.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_truncate.test b/mysql-test/suite/ndb/t/ndb_truncate.test
deleted file mode 100644
index a1ef4be0d48..00000000000
--- a/mysql-test/suite/ndb/t/ndb_truncate.test
+++ /dev/null
@@ -1,41 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1, t2;
---enable_warnings
-
-CREATE TABLE t1 (
- a bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
- b int unsigned not null,
- c int unsigned
-) engine=ndbcluster;
-
-
-#
-# insert records into table
-#
-let $1=500;
-disable_query_log;
-while ($1)
-{
- eval insert into t1 values(NULL, $1+9, 5*$1), (NULL, $1+10, 7),(NULL, $1+10, 7*$1), (NULL, $1+10, 10+$1), (NULL, $1+10, 70*$1), (NULL, $1+10, 7), (NULL, $1+10, 9), (NULL, $1+299, 899), (NULL, $1+10, 12), (NULL, $1+10, 14*$1);
- dec $1;
-}
-enable_query_log;
-
-select count(*) from t1;
-
-select * from t1 order by a limit 2;
-
-truncate table t1;
-
-select count(*) from t1;
-
-insert into t1 values(NULL,1,1),(NULL,2,2);
-
-select * from t1 order by a;
-
-drop table t1;
-
-# End of 4.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_types.test b/mysql-test/suite/ndb/t/ndb_types.test
deleted file mode 100644
index ab18817132e..00000000000
--- a/mysql-test/suite/ndb/t/ndb_types.test
+++ /dev/null
@@ -1,85 +0,0 @@
---source include/have_ndb.inc
---source include/not_embedded.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-#
-# Test creation of different column types in NDB
-#
-CREATE TABLE t1 (
- auto int(5) unsigned NOT NULL auto_increment,
- string char(10) default "hello",
- vstring varchar(10) default "hello",
- bin binary(2),
- vbin varbinary(7),
- tiny tinyint(4) DEFAULT '0' NOT NULL ,
- short smallint(6) DEFAULT '1' NOT NULL ,
- medium mediumint(8) DEFAULT '0' NOT NULL,
- long_int int(11) DEFAULT '0' NOT NULL,
- longlong bigint(13) DEFAULT '0' NOT NULL,
- real_float float(13,1) DEFAULT 0.0 NOT NULL,
- real_double double(16,4),
- real_decimal decimal(16,4),
- utiny tinyint(3) unsigned DEFAULT '0' NOT NULL,
- ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL,
- umedium mediumint(8) unsigned DEFAULT '0' NOT NULL,
- ulong int(11) unsigned DEFAULT '0' NOT NULL,
- ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL,
- bits bit(3),
- options enum('one','two','tree') not null,
- flags set('one','two','tree') not null,
- date_field date,
- year_field year,
- time_field time,
- date_time datetime,
- time_stamp timestamp not null default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
- PRIMARY KEY (auto),
- KEY (utiny),
- KEY (tiny),
- KEY (short),
- KEY any_name (medium),
- KEY (longlong),
- KEY (real_float),
- KEY (ushort),
- KEY (umedium),
- KEY (ulong),
- KEY (ulonglong,ulong),
- KEY (options,flags)
-);
-
-set @now = now();
---sleep 1.5
-insert into t1
-(string,vstring,bin,vbin,tiny,short,medium,long_int,longlong,
- real_float,real_double, real_decimal,utiny, ushort, umedium,ulong,ulonglong,
- bits,options,flags,date_field,year_field,time_field,date_time)
-values
-("aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1,
- b'001','one','one', '1901-01-01','1901','01:01:01','1901-01-01 01:01:01');
-
-select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong,
- real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong,
- bits,options,flags,date_field,year_field,time_field,date_time
-from t1;
-select time_stamp>@now from t1;
-
-set @now = now();
---sleep 1.5
-update t1 set string="bbbb",vstring="bbbb",bin=0xBBBB,vbin=0xBBBB,
-tiny=-2,short=-2,medium=-2,long_int=-2,longlong=-2,real_float=2.2,
-real_double=2.2,real_decimal=2.2,utiny=2,ushort=2,umedium=2,ulong=2,
-ulonglong=2, bits=b'010',
-options='one',flags='one', date_field='1902-02-02',year_field='1902',
-time_field='02:02:02',date_time='1902-02-02 02:02:02' where auto=1;
-
-select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong,
- real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong,
- bits,options,flags,date_field,year_field,time_field,date_time
-from t1;
-select time_stamp>@now from t1;
-
-drop table t1;
-
---echo End of 4.1 tests
diff --git a/mysql-test/suite/ndb/t/ndb_update.test b/mysql-test/suite/ndb/t/ndb_update.test
deleted file mode 100644
index ab0fbee171e..00000000000
--- a/mysql-test/suite/ndb/t/ndb_update.test
+++ /dev/null
@@ -1,94 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
-DROP TABLE IF EXISTS t3;
---enable_warnings
-
-#
-# Basic test of UPDATE in NDB
-#
-
-#
-# Create a normal table with primary key
-#
-CREATE TABLE t1 (
- pk1 INT NOT NULL PRIMARY KEY,
- b INT NOT NULL,
- c INT NOT NULL UNIQUE
-) ENGINE=ndbcluster;
-
-INSERT INTO t1 VALUES (0, 1, 0),(1,2,1),(2,3,2);
-UPDATE t1 set b = c;
-select * from t1 order by pk1;
-UPDATE t1 set pk1 = 4 where pk1 = 1;
-select * from t1 order by pk1;
---error ER_DUP_ENTRY
-UPDATE t1 set pk1 = 4 where pk1 = 2;
-UPDATE IGNORE t1 set pk1 = 4 where pk1 = 2;
-select * from t1 order by pk1;
---error ER_DUP_ENTRY
-UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4;
-UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4;
-select * from t1 order by pk1;
-UPDATE t1 set pk1 = pk1 + 10;
-select * from t1 order by pk1;
-# bug#25817
-create unique index ib on t1(b);
-update t1 set c = 4 where pk1 = 12;
-update ignore t1 set b = 55 where pk1 = 14;
-select * from t1 order by pk1;
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-# End of 4.1 tests
-
-#
-# Bug#28158: table->read_set is set incorrectly,
-# causing wrong error message in Falcon
-#
-CREATE TABLE t1 (a int, b int, KEY (a, b)) ENGINE=ndbcluster;
-CREATE TABLE t2 (a int, b int, UNIQUE KEY (a, b)) ENGINE=ndbcluster;
-CREATE TABLE t3 (a int, b int, PRIMARY KEY (a, b)) ENGINE=ndbcluster;
-#
-INSERT INTO t1 VALUES (1, 2);
-INSERT INTO t1 VALUES (2, 2);
-#
-INSERT INTO t2 VALUES (1, 2);
-INSERT INTO t2 VALUES (2, 2);
-#
-INSERT INTO t3 VALUES (1, 2);
-INSERT INTO t3 VALUES (2, 2);
-#
-UPDATE t1 SET a = 1;
-UPDATE t1 SET a = 1 ORDER BY a;
-#
---error ER_DUP_ENTRY
-UPDATE t2 SET a = 1;
---error ER_DUP_ENTRY
-UPDATE t2 SET a = 1 ORDER BY a;
-#
---error ER_DUP_ENTRY
-UPDATE t3 SET a = 1;
---error ER_DUP_ENTRY
-UPDATE t3 SET a = 1 ORDER BY a;
-#
-SELECT count(*) FROM t1;
-SELECT count(*) FROM t2;
-SELECT count(*) FROM t3;
-SELECT * FROM t1 ORDER by a;
-SELECT * FROM t2 ORDER by a;
-SELECT * FROM t3 ORDER by a;
-#
---disable_warnings
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
-DROP TABLE IF EXISTS t3;
---enable_warnings
-
---echo End of 5.1 tests
-
diff --git a/mysql-test/suite/ndb/t/ndb_update_no_read.test b/mysql-test/suite/ndb/t/ndb_update_no_read.test
deleted file mode 100644
index 60bea53b7b5..00000000000
--- a/mysql-test/suite/ndb/t/ndb_update_no_read.test
+++ /dev/null
@@ -1,79 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-#
-# New test case for WL 3686 (which is not until CGE-6.3)
-# but test is committed in 5.1 to verify consistant results.
-#
-# When only constant expressions in update statements and
-# only PK or UK in WHERE clause. No extra WHERE parts are
-# allowed. WL #3687 takes of more advanced variants of
-# avoiding the read before the update/delete
-
-create table t1 (a int not null primary key, b int not null, c int,
- unique index_b (b) using hash)
-engine ndb;
-
-insert into t1 values (1,10,1),(2,9,1),(3,8,1),(4,7,1),(5,6,1),(6,5,2),(7,4,2),(8,3,2),
- (9,2,2),(10,1,2);
-
-# These ones should use optimisation
-
-update t1 set c = 111, b = 20 where a = 1;
-
-select * from t1 where a = 1 order by a;
-
-delete from t1 where a = 1;
-
-select * from t1 where a = 1 order by a;
-
-update t1 set c = 12, b = 19 where b = 2;
-
-select * from t1 where b = 2 order by a;
-
-delete from t1 where b = 19;
-
-select * from t1 where b = 19 order by a;
-
-update t1 set c = 22 where a = 10 or a >= 10;
-
-select * from t1 order by a;
-
-update t1 set c = 23 where a in (8,10);
-
-select * from t1 order by a;
-
-update t1 set c = 23 where a in (7,8) or a >= 10;
-
-select * from t1 order by a;
-
-# These ones should not use optimisation
-
-update t1 set c = 11 where a = 3 or b = 7;
-
-select * from t1 where a = 3 or b = 7 order by a;
-
-update t1 set a = 13, b = 20 where a = 3;
-
-select * from t1 where a = 13 order by a;
-
-update t1 set a = 12, b = 19 where b = 7;
-
-select * from t1 where b = 19 order by a;
-
-select * from t1 where b = 7 order by a;
-
-update t1 set c = 12, b = 29 where a = 5 and b = 6;
-
-select * from t1 where b = 19 order by a;
-
-delete from t1 where b = 6 and c = 12;
-
-select * from t1 where b = 6 order by a;
-
-drop table t1;
-
diff --git a/mysql-test/suite/ndb/t/ndb_view.test b/mysql-test/suite/ndb/t/ndb_view.test
deleted file mode 100644
index 3b8fc330b40..00000000000
--- a/mysql-test/suite/ndb/t/ndb_view.test
+++ /dev/null
@@ -1,29 +0,0 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t1,t2,t3;
-DROP VIEW IF EXISTS v1,v2,v3;
---enable_warnings
-
-#
-# simple operations via view
-#
-
-create table t1 (a int, b int, c int, d int) engine=ndb;
-insert into t1 values (1,2,3,4),(5,6,7,8);
-
-create view v1 as select t1.c as a, t1.a as b, t1.d as c, t1.a+t1.b+t1.c as d from t1;
-select * from v1 order by a,b,c;
-
-update v1 set a=a+100 where b=1;
-select * from v1 order by a,b,c;
-
-drop view v1;
-
-create view v1 as select t1.c as a from t1;
-insert into v1 values (200);
-select * from t1 order by a,b,c,d;
-
-drop view v1;
-drop table t1;
diff --git a/mysql-test/suite/ndb/t/ndbapi.test b/mysql-test/suite/ndb/t/ndbapi.test
deleted file mode 100644
index 398a2cbfbfa..00000000000
--- a/mysql-test/suite/ndb/t/ndbapi.test
+++ /dev/null
@@ -1,44 +0,0 @@
--- source include/have_ndb.inc
--- source include/have_ndbapi_examples.inc
-
---disable_warnings
-DROP TABLE IF EXISTS t0;
-drop database if exists mysqltest;
---enable_warnings
-
---exec echo Running ndbapi_simple
---exec $NDB_EXAMPLES_DIR/ndbapi_simple/ndbapi_simple $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT
-
---exec echo Running ndbapi_simple_index
---exec $NDB_EXAMPLES_DIR/ndbapi_simple_index/ndbapi_simple_index $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT
-
---exec echo Running ndbapi_scan
---exec $NDB_EXAMPLES_DIR/ndbapi_scan/ndbapi_scan $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT
-
---exec echo Running ndbapi_retries
---exec $NDB_EXAMPLES_DIR/ndbapi_retries/ndbapi_retries $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT
-
---exec echo Running ndbapi_async
---exec $NDB_EXAMPLES_DIR/ndbapi_async/ndbapi_async $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT
-
---exec echo Running ndbapi_async1
---exec $NDB_EXAMPLES_DIR/ndbapi_async1/ndbapi_async1 $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT
-
-use TEST_DB;
-create table t0(c0 int, c1 int, c2 char(4), c3 char(4), c4 text,
- primary key(c0, c2)) engine ndb charset latin1;
-#--exec echo Running ndbapi_event
-#--exec $NDB_EXAMPLES_DIR/ndbapi_event/ndbapi_event "$NDB_CONNECTSTRING" 1 >> $NDB_EXAMPLES_OUTPUT
-insert into t0 values (1, 2, 'a', 'b', null);
-insert into t0 values (3, 4, 'c', 'd', null);
-update t0 set c3 = 'e' where c0 = 1 and c2 = 'a'; -- use pk
-update t0 set c3 = 'f'; -- use scan
-update t0 set c3 = 'F'; -- use scan update to 'same'
-update t0 set c2 = 'g' where c0 = 1; -- update pk part
-update t0 set c2 = 'G' where c0 = 1; -- update pk part to 'same'
-update t0 set c0 = 5, c2 = 'H' where c0 = 3; -- update full PK
-delete from t0;
-drop table t0;
-
---exec echo Running mgmapi_logevent
---exec $NDB_EXAMPLES_DIR/mgmapi_logevent/mgmapi_logevent "$NDB_CONNECTSTRING" 1 >> $NDB_EXAMPLES_OUTPUT
diff --git a/mysql-test/suite/ndb/t/ps_7ndb.test b/mysql-test/suite/ndb/t/ps_7ndb.test
deleted file mode 100644
index e3f65ec2c4e..00000000000
--- a/mysql-test/suite/ndb/t/ps_7ndb.test
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################
-# #
-# Prepared Statements test on NDB tables #
-# #
-###############################################
-
-#
-# NOTE: PLEASE SEE ps_1general.test (bottom)
-# BEFORE ADDING NEW TEST CASES HERE !!!
-
-use test;
-
--- source include/have_ndb.inc
-let $type= 'NDB' ;
--- source include/ps_create.inc
--- source include/ps_renew.inc
-
--- source include/ps_query.inc
--- source include/ps_modify.inc
--- source include/ps_modify1.inc
--- source include/ps_conv.inc
-
-drop table t1, t9;
-
-# End of 4.1 tests
diff --git a/mysql-test/suite/ndb/t/strict_autoinc_5ndb.test b/mysql-test/suite/ndb/t/strict_autoinc_5ndb.test
deleted file mode 100644
index 9e2090fddef..00000000000
--- a/mysql-test/suite/ndb/t/strict_autoinc_5ndb.test
+++ /dev/null
@@ -1,10 +0,0 @@
--- source include/have_ndb.inc
-
-#
-# Bug#20573 Strict mode auto-increment
-#
-
-let $type= 'NDB' ;
---source include/strict_autoinc.inc
-
-# end of test