summaryrefslogtreecommitdiff
path: root/mysql-test/r/ndb_minmax.result
diff options
context:
space:
mode:
authorunknown <magnus@neptunus.(none)>2004-05-11 10:40:48 +0200
committerunknown <magnus@neptunus.(none)>2004-05-11 10:40:48 +0200
commitcc7353f58b257e9b499212947d9f24b5484dcbaf (patch)
tree71248616c5d0727c46bb959a55fbb4df21eb202c /mysql-test/r/ndb_minmax.result
parent5b92b23bbf77f8984c9e1309f516bb6820b9cbce (diff)
downloadmariadb-git-cc7353f58b257e9b499212947d9f24b5484dcbaf.tar.gz
Updated ndb_* test cases
Added two new, ndb_replace and ndb_minmax mysql-test/r/ndb_index.result: Disable query, since index used is case sensitive mysql-test/r/ndb_index_ordered.result: Correct faulty CREATE TABLE statement mysql-test/r/ndb_index_unique.result: Correct faulty CREATE TABLE statement mysql-test/t/ndb_index.test: Disable query, since index used is case sensitive mysql-test/t/ndb_index_ordered.test: Correct faulty CREATE TABLE statement mysql-test/t/ndb_index_unique.test: Correct faulty CREATE TABLE statement
Diffstat (limited to 'mysql-test/r/ndb_minmax.result')
-rw-r--r--mysql-test/r/ndb_minmax.result120
1 files changed, 120 insertions, 0 deletions
diff --git a/mysql-test/r/ndb_minmax.result b/mysql-test/r/ndb_minmax.result
new file mode 100644
index 00000000000..cc0c238ac6e
--- /dev/null
+++ b/mysql-test/r/ndb_minmax.result
@@ -0,0 +1,120 @@
+drop table if exists t1, t2;
+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;
+MAX(a)
+6
+select MAX(a) from t1;
+MAX(a)
+6
+select MAX(a) from t1;
+MAX(a)
+6
+select MAX(a) from t1;
+MAX(a)
+6
+select MIN(a) from t1;
+MIN(a)
+1
+select MIN(a) from t1;
+MIN(a)
+1
+select MIN(a) from t1;
+MIN(a)
+1
+select * from t1 order by a;
+a
+1
+2
+3
+4
+5
+6
+select MIN(a) from t1;
+MIN(a)
+1
+select MAX(a) from t1;
+MAX(a)
+6
+select MAX(a) from t1;
+MAX(a)
+6
+select * from t1 order by a;
+a
+1
+2
+3
+4
+5
+6
+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;
+MAX(a)
+8
+select MAX(b) from t2;
+MAX(b)
+10
+select MAX(c) from t2;
+MAX(c)
+10
+select MIN(a) from t2;
+MIN(a)
+1
+select MIN(b) from t2;
+MIN(b)
+2
+select MIN(c) from t2;
+MIN(c)
+1
+select * from t2 order by a;
+a b c
+1 5 1
+2 2 7
+3 3 3
+4 4 4
+5 5 5
+6 6 6
+7 2 10
+8 10 2
+select MIN(b) from t2;
+MIN(b)
+2
+select MAX(a) from t2;
+MAX(a)
+8
+select MAX(c) from t2;
+MAX(c)
+10
+select * from t2 order by a;
+a b c
+1 5 1
+2 2 7
+3 3 3
+4 4 4
+5 5 5
+6 6 6
+7 2 10
+8 10 2
+drop table t2;