Commit 24594865 authored by unknown's avatar unknown

ndb - bug#15918 fix


mysql-test/r/ndb_index_unique.result:
  bug#15918 fix
mysql-test/t/ndb_index_unique.test:
  bug#15918 fix
ndb/src/kernel/blocks/dbacc/Dbacc.hpp:
  bug#15918 fix
sql/ha_ndbcluster.cc:
  bug#15918 fix
sql/ha_ndbcluster.h:
  bug#15918 fix
parent 895d0946
......@@ -626,3 +626,12 @@ select * from t1 where code = '12' and month = 4 and year = 2004 ;
id month year code
1 4 2004 12
drop table t1;
create table t1 (a int primary key, b varchar(1000) not null, unique key (b))
engine=ndb charset=utf8;
insert into t1 values (1, repeat(_utf8 0xe288ab6474, 200));
insert into t1 values (2, repeat(_utf8 0xe288ab6474, 200));
ERROR 23000: Duplicate entry '2' for key 1
select a, sha1(b) from t1;
a sha1(b)
1 08f5d02c8b8bc244f275bdfc22c42c5cab0d9d7d
drop table t1;
......@@ -309,4 +309,18 @@ select * from t1 where code = '12' and month = 4 and year = 2004 ;
drop table t1;
# bug#15918 Unique Key Limit in NDB Engine
create table t1 (a int primary key, b varchar(1000) not null, unique key (b))
engine=ndb charset=utf8;
insert into t1 values (1, repeat(_utf8 0xe288ab6474, 200));
--error 1062
insert into t1 values (2, repeat(_utf8 0xe288ab6474, 200));
select a, sha1(b) from t1;
# perl -e 'print pack("H2000","e288ab6474"x200)' | sha1sum
drop table t1;
# End of 4.1 tests
......@@ -1446,7 +1446,7 @@ private:
Uint32 cexcPrevforward;
Uint32 clocalkey[32];
union {
Uint32 ckeys[2048];
Uint32 ckeys[2048 * MAX_XFRM_MULTIPLY];
Uint64 ckeys_align;
};
......
......@@ -5083,6 +5083,10 @@ uint ha_ndbcluster::max_supported_key_length() const
{
return NDB_MAX_KEY_SIZE;
}
uint ha_ndbcluster::max_supported_key_part_length() const
{
return NDB_MAX_KEY_SIZE;
}
bool ha_ndbcluster::low_byte_first() const
{
#ifdef WORDS_BIGENDIAN
......
......@@ -510,6 +510,7 @@ class ha_ndbcluster: public handler
uint max_supported_keys() const;
uint max_supported_key_parts() const;
uint max_supported_key_length() const;
uint max_supported_key_part_length() const;
int rename_table(const char *from, const char *to);
int delete_table(const char *name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment