summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <mskold/marty@mysql.com/linux.site>2006-11-30 16:04:12 +0100
committerunknown <mskold/marty@mysql.com/linux.site>2006-11-30 16:04:12 +0100
commit7d3cb1a453cb511f1d85ccf469e8fcc1f829768e (patch)
tree6ee16833943fcf23eaf62aaf38124f4b125afc0d /mysql-test/r
parent4ec847218dca3fa31d6b7d61fffdf71c444c1c74 (diff)
parentd9540e74e2e6d7b646efe5d31f1691eb775ad67e (diff)
downloadmariadb-git-7d3cb1a453cb511f1d85ccf469e8fcc1f829768e.tar.gz
Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp: Auto merged ndb/tools/ndb_config.cpp: Auto merged sql/ha_ndbcluster.cc: Auto merged
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/ndb_index_unique.result35
-rw-r--r--mysql-test/r/ndb_update.result9
2 files changed, 43 insertions, 1 deletions
diff --git a/mysql-test/r/ndb_index_unique.result b/mysql-test/r/ndb_index_unique.result
index ce4759ad553..12ffc8437db 100644
--- a/mysql-test/r/ndb_index_unique.result
+++ b/mysql-test/r/ndb_index_unique.result
@@ -140,7 +140,40 @@ b int unsigned not null,
c int unsigned,
UNIQUE USING HASH (b, c)
) engine=ndbcluster;
-ERROR 42000: Column 'c' is used with UNIQUE or INDEX but is not defined as NOT NULL
+Warnings:
+Warning 1121 Ndb does not support unique index on NULL valued attributes, index access with NULL value will become full table scan
+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;
+a b c
+1 1 NULL
+3 3 NULL
+5 5 NULL
+7 7 NULL
+8 3 NULL
+9 3 NULL
+select * from t2 where b = 3 AND c IS NULL order by a;
+a b c
+3 3 NULL
+8 3 NULL
+9 3 NULL
+select * from t2 where (b = 3 OR b = 5) AND c IS NULL order by a;
+a b c
+3 3 NULL
+5 5 NULL
+8 3 NULL
+9 3 NULL
+set @old_ecpd = @@session.engine_condition_pushdown;
+set engine_condition_pushdown = true;
+explain select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 range PRIMARY,b PRIMARY 4 NULL 1 Using where with pushed condition
+select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a;
+a b c
+3 3 NULL
+5 5 NULL
+8 3 NULL
+set engine_condition_pushdown = @old_ecpd;
+drop table t2;
CREATE TABLE t3 (
a int unsigned NOT NULL,
b int unsigned not null,
diff --git a/mysql-test/r/ndb_update.result b/mysql-test/r/ndb_update.result
index 164d1bd700c..d75f82172ae 100644
--- a/mysql-test/r/ndb_update.result
+++ b/mysql-test/r/ndb_update.result
@@ -17,8 +17,17 @@ pk1 b c
0 0 0
2 2 2
4 1 1
+UPDATE t1 set pk1 = 4 where pk1 = 2;
+ERROR 23000: Duplicate entry '4' for key 1
+UPDATE IGNORE t1 set pk1 = 4 where pk1 = 2;
+select * from t1 order by pk1;
+pk1 b c
+0 0 0
+2 2 2
+4 1 1
UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4;
ERROR 23000: Duplicate entry '' for key 0
+UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4;
select * from t1 order by pk1;
pk1 b c
0 0 0