| 1 |
-- source include/have_ndb.inc |
| 2 |
|
| 3 |
--disable_warnings |
| 4 |
drop table if exists t1, t2; |
| 5 |
--enable_warnings |
| 6 |
|
| 7 |
CREATE TABLE t1 ( |
| 8 |
a int PRIMARY KEY |
| 9 |
) engine = ndb; |
| 10 |
|
| 11 |
INSERT INTO t1 VALUES (1); |
| 12 |
INSERT INTO t1 VALUES (2); |
| 13 |
INSERT INTO t1 VALUES (3); |
| 14 |
INSERT INTO t1 VALUES (4); |
| 15 |
INSERT INTO t1 VALUES (5); |
| 16 |
INSERT INTO t1 VALUES (6); |
| 17 |
|
| 18 |
select MAX(a) from t1; |
| 19 |
select MAX(a) from t1; |
| 20 |
select MAX(a) from t1; |
| 21 |
select MAX(a) from t1; |
| 22 |
select MIN(a) from t1; |
| 23 |
select MIN(a) from t1; |
| 24 |
select MIN(a) from t1; |
| 25 |
select * from t1 order by a; |
| 26 |
select MIN(a) from t1; |
| 27 |
select MAX(a) from t1; |
| 28 |
select MAX(a) from t1; |
| 29 |
select * from t1 order by a; |
| 30 |
drop table t1; |
| 31 |
|
| 32 |
|
| 33 |
CREATE TABLE t2 ( |
| 34 |
a int PRIMARY KEY, |
| 35 |
b int not null, |
| 36 |
c int not null, |
| 37 |
KEY(b), |
| 38 |
UNIQUE(c) |
| 39 |
) engine = ndb; |
| 40 |
|
| 41 |
INSERT INTO t2 VALUES (1, 5, 1); |
| 42 |
INSERT INTO t2 VALUES (2, 2, 7); |
| 43 |
INSERT INTO t2 VALUES (3, 3, 3); |
| 44 |
INSERT INTO t2 VALUES (4, 4, 4); |
| 45 |
INSERT INTO t2 VALUES (5, 5, 5); |
| 46 |
INSERT INTO t2 VALUES (6, 6, 6); |
| 47 |
INSERT INTO t2 VALUES (7, 2, 10); |
| 48 |
INSERT INTO t2 VALUES (8, 10, 2); |
| 49 |
|
| 50 |
|
| 51 |
select MAX(a) from t2; |
| 52 |
select MAX(b) from t2; |
| 53 |
select MAX(c) from t2; |
| 54 |
select MIN(a) from t2; |
| 55 |
select MIN(b) from t2; |
| 56 |
select MIN(c) from t2; |
| 57 |
select * from t2 order by a; |
| 58 |
select MIN(b) from t2; |
| 59 |
select MAX(a) from t2; |
| 60 |
select MAX(c) from t2; |
| 61 |
select * from t2 order by a; |
| 62 |
drop table t2; |
| 63 |
|
| 64 |
# End of 4.1 tests |