summaryrefslogtreecommitdiff
path: root/mysql-test/t/ndb_index_unique.test
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.ndb.mysql.com>2005-01-26 11:31:46 +0100
committerunknown <tomas@poseidon.ndb.mysql.com>2005-01-26 11:31:46 +0100
commitd041ed2d8cddc67fe9dacbf2060927b84139f3f4 (patch)
tree4e04933cc990354077d53b898f92e4a29019b6f6 /mysql-test/t/ndb_index_unique.test
parent9d1701898bb98dc59d121cfc5b485fbf86b30f4b (diff)
downloadmariadb-git-d041ed2d8cddc67fe9dacbf2060927b84139f3f4.tar.gz
Bug#8101 unique indexes which attribute are _not_ specified in the order of the table does not work
Diffstat (limited to 'mysql-test/t/ndb_index_unique.test')
-rw-r--r--mysql-test/t/ndb_index_unique.test21
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/t/ndb_index_unique.test b/mysql-test/t/ndb_index_unique.test
index f235d1ffc30..9bbea75028b 100644
--- a/mysql-test/t/ndb_index_unique.test
+++ b/mysql-test/t/ndb_index_unique.test
@@ -286,3 +286,24 @@ select * from t8 order by a;
select * from t1 order by a;
drop table t1, t8;
+###############################
+# Bug 8101
+#
+# Unique index not specified in the same order as in table
+#
+
+create table t1(
+ id integer not null auto_increment,
+ month integer not null,
+ year integer not null,
+ code varchar( 2) not null,
+ primary key ( id),
+ unique idx_t1( month, code, year)
+) engine=ndb;
+
+INSERT INTO t1 (month, year, code) VALUES (4,2004,'12');
+INSERT INTO t1 (month, year, code) VALUES (5,2004,'12');
+
+select * from t1 where code = '12' and month = 4 and year = 2004 ;
+
+drop table t1;