summaryrefslogtreecommitdiff
path: root/mysql-test/suite/ndb
diff options
context:
space:
mode:
authorunknown <pekka@sama.ndb.mysql.com>2008-01-29 15:30:46 +0100
committerunknown <pekka@sama.ndb.mysql.com>2008-01-29 15:30:46 +0100
commitb75ae0f3f4e375e6cc9e485b228f3cc8fa167a22 (patch)
treed1024d64d2b63630a247651f6dc7153479a16e1f /mysql-test/suite/ndb
parent6b4274cc616dc70a912914e8a04163b18757f311 (diff)
parent4c414b10d5ae1971de8ea667dd155c1fd6116a6f (diff)
downloadmariadb-git-b75ae0f3f4e375e6cc9e485b228f3cc8fa167a22.tar.gz
Merge sama.ndb.mysql.com:/export/space/pekka/ndb/version/my51-ndb
into sama.ndb.mysql.com:/export/space/pekka/ndb/version/my51-bug34118
Diffstat (limited to 'mysql-test/suite/ndb')
-rw-r--r--mysql-test/suite/ndb/r/ndb_dd_basic.result12
-rw-r--r--mysql-test/suite/ndb/t/ndb_dd_basic.test15
2 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/suite/ndb/r/ndb_dd_basic.result b/mysql-test/suite/ndb/r/ndb_dd_basic.result
index f04905b8d13..2a79fcfb3c8 100644
--- a/mysql-test/suite/ndb/r/ndb_dd_basic.result
+++ b/mysql-test/suite/ndb/r/ndb_dd_basic.result
@@ -501,6 +501,18 @@ f1 f2
111111 aaaaaa
222222 bbbbbb
drop table test.t1;
+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);
+update t1 set c1 = 1 where id = 2;
+ERROR 23000: Duplicate entry '1' for key 'c1'
+drop table t1;
ALTER TABLESPACE ts1
DROP DATAFILE 'datafile.dat'
ENGINE = NDB;
diff --git a/mysql-test/suite/ndb/t/ndb_dd_basic.test b/mysql-test/suite/ndb/t/ndb_dd_basic.test
index 8c83c2febe5..fc35ef03b39 100644
--- a/mysql-test/suite/ndb/t/ndb_dd_basic.test
+++ b/mysql-test/suite/ndb/t/ndb_dd_basic.test
@@ -439,6 +439,21 @@ 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
###################