Had issues with older clone where I could not pull latest patches. So I pulled...

Had issues with older clone where I could not pull latest patches. So I pulled a fresh clone. Moved updated test cases over and restested. Therefore I have to do a new commit for these files.
parent 365b69dc
This diff is collapsed.
This diff is collapsed.
......@@ -422,6 +422,27 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
DROP TABLE t1;
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;
f1 f2 f3
111111 aaaaaa 1
222222 bbbbbb 2
select f1,f2 from test.t1 order by f2;
f1 f2
111111 aaaaaa
222222 bbbbbb
select f2 from test.t1 order by f2;
f2
aaaaaa
bbbbbb
select f1,f2 from test.t1 order by f1;
f1 f2
111111 aaaaaa
222222 bbbbbb
drop table test.t1;
ALTER TABLESPACE ts1
DROP DATAFILE 'datafile.dat'
ENGINE = NDB;
......
......@@ -299,10 +299,197 @@ usr_id uniq_id increment usr2_id c_amount max
DROP TABLE test.t1;
DROP TABLE test.t2;
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;
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;
Table Create Table
t1 CREATE TABLE `t1` (
`a1` smallint(6) NOT NULL,
`a2` int(11) NOT NULL,
`a3` bigint(20) NOT NULL,
`a4` char(10) DEFAULT NULL,
`a5` decimal(5,1) DEFAULT NULL,
`a6` time DEFAULT NULL,
`a7` date DEFAULT NULL,
`a8` datetime DEFAULT NULL,
`a9` varchar(255) DEFAULT NULL,
`a10` blob,
PRIMARY KEY (`a1`),
KEY `a2` (`a2`),
KEY `a3` (`a3`),
KEY `a8` (`a8`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
Table Create Table
t2 CREATE TABLE `t2` (
`b1` smallint(6) NOT NULL,
`b2` int(11) NOT NULL,
`b3` bigint(20) NOT NULL,
`b4` char(10) DEFAULT NULL,
`b5` decimal(5,1) DEFAULT NULL,
`b6` time DEFAULT NULL,
`b7` date DEFAULT NULL,
`b8` datetime DEFAULT NULL,
`b9` varchar(255) DEFAULT NULL,
`b10` blob,
PRIMARY KEY (`b1`),
KEY `b2` (`b2`),
KEY `b3` (`b3`),
KEY `b8` (`b8`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
a1 a2 a3 a4 a5 a6 a7 a8 a9 a10
1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data
2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data
3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data
4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data
5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data
6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data
7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data
8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data
9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data
10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data
11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data
12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data
13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data
14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data
15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data
16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data
17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data
18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data
19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data
20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data
b1 b2 b3 b4 b5 b6 b7 b8 b9 b10
3 4 3000000001 aaa1 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data
4 5 3000000002 aaa2 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data
5 6 3000000003 aaa3 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data
6 7 3000000004 aaa4 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data
7 8 3000000005 aaa5 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data
8 9 3000000006 aaa6 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data
9 10 3000000007 aaa7 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data
10 11 3000000008 aaa8 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data
11 12 3000000009 aaa9 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data
12 13 3000000010 aaa10 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data
13 14 3000000011 aaa11 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data
14 15 3000000012 aaa12 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data
15 16 3000000013 aaa13 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data
16 17 3000000014 aaa14 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data
17 18 3000000015 aaa15 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data
18 19 3000000016 aaa16 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data
19 20 3000000017 aaa17 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data
20 21 3000000018 aaa18 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data
21 22 3000000019 aaa19 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data
22 23 3000000020 aaa20 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data
COUNT(a1) a1 COUNT(a1)*a1
1 1 1
1 2 2
1 3 3
1 4 4
1 5 5
1 6 6
1 7 7
1 8 8
1 9 9
1 10 10
1 11 11
1 12 12
1 13 13
1 14 14
1 15 15
1 16 16
1 17 17
1 18 18
1 19 19
1 20 20
COUNT(a2) (a2+1) COUNT(a2)*(a2+0)
1 3 2
1 4 3
1 5 4
1 6 5
1 7 6
1 8 7
1 9 8
1 10 9
1 11 10
1 12 11
1 13 12
1 14 13
1 15 14
1 16 15
1 17 16
1 18 17
1 19 18
1 20 19
1 21 20
1 22 21
a
4
3
a c
4 Martin
4 Clavin
3 Serge
3 Pekka
a
3
4
a c
3 Serge
3 Pekka
4 Martin
4 Clavin
a
1
1
1
2
2
3
3
a
3
2
1
a
3
2
1
a
1
2
3
email shipcode
test1@testdomain.com Z001
test2@testdomain.com R002
test2@testdomain.com Z001
test3@testdomain.com Z001
email
test1@testdomain.com
test2@testdomain.com
test3@testdomain.com
email shipcode
test1@testdomain.com Z001
test2@testdomain.com Z001
test2@testdomain.com R002
test3@testdomain.com Z001
This diff is collapsed.
##############################################################
# 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/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;
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;
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;
#### Try to ALTER from Cluster Disk Data to MyISAM
SHOW CREATE TABLE test.t1;
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;
ALTER TABLE test.t1 ADD a2 FLOAT, ADD a3 DOUBLE;
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;
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;
SHOW CREATE TABLE test.t1;
#### 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;
ALTER TABLE test.t1 DROP INDEX a2_i;
SHOW CREATE TABLE test.t1;
#### 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;
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
......@@ -345,6 +345,21 @@ DELETE FROM t1 WHERE a=2;
SELECT COUNT(*) FROM t1;
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;
###################
# Test Cleanup
###################
......
......@@ -172,6 +172,112 @@ ORDER BY test.t2.c_amount;
####################### 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),(1,'e','Stewart',5),(2,'f','Jeb',6),
(3,'g','Serge',7),(4,'h','Clavin',8);
select distinct a from test.t1 group by b,a having a > 2 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 > 2 order by a asc;
select distinct a,c from test.t1 group by b,c,a having a > 2 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;
......
......@@ -221,6 +221,48 @@ 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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment