From d1a139cb24143aae80487923c85a4d08647b7ce9 Mon Sep 17 00:00:00 2001 From: "joreland@mysql.com" <> Date: Wed, 1 Dec 2004 10:04:49 +0100 Subject: [PATCH 1/2] bug#6871 - ndb replace with charsets check update of primary key wo/ normalizing --- ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp b/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp index e6cc6f68842..cbb165c3eb1 100644 --- a/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp +++ b/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp @@ -706,7 +706,10 @@ Dbtup::checkUpdateOfPrimaryKey(Uint32* updateBuffer, Tablerec* const regTabPtr) tOutBufIndex = 0; tMaxRead = MAX_KEY_SIZE_IN_WORDS; + bool tmp = tXfrmFlag; + tXfrmFlag = false; ndbrequire((this->*f)(&keyReadBuffer[0], ahOut, attrDescriptor, attributeOffset)); + tXfrmFlag = tmp; ndbrequire(tOutBufIndex == ahOut->getDataSize()); if (ahIn.getDataSize() != ahOut->getDataSize()) { ljam(); From 9acd3ea38dfbfcb3d83bfd93fc29974bc422811a Mon Sep 17 00:00:00 2001 From: "joreland@mysql.com" <> Date: Wed, 1 Dec 2004 10:13:18 +0100 Subject: [PATCH 2/2] testcase for bug#6871, ndb, replace with collations --- mysql-test/r/ndb_charset.result | 10 ++++++++++ mysql-test/t/ndb_charset.test | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/mysql-test/r/ndb_charset.result b/mysql-test/r/ndb_charset.result index 501bec99ea3..00bc36a7c0d 100644 --- a/mysql-test/r/ndb_charset.result +++ b/mysql-test/r/ndb_charset.result @@ -189,3 +189,13 @@ p a 5 aaa 6 AAA drop table t1; +create table t1 ( +a varchar(10) primary key +) engine=ndb; +insert into t1 values ('jonas % '); +replace into t1 values ('jonas % '); +replace into t1 values ('jonas % '); +select * from t1; +a +jonas % +drop table t1; diff --git a/mysql-test/t/ndb_charset.test b/mysql-test/t/ndb_charset.test index f1ec0485e12..1b9e7e8bfcc 100644 --- a/mysql-test/t/ndb_charset.test +++ b/mysql-test/t/ndb_charset.test @@ -157,3 +157,13 @@ select * from t1 where a = 'AaA' order by p; # 6 select * from t1 where a = 'AAA' order by p; drop table t1; + +# bug +create table t1 ( + a varchar(10) primary key +) engine=ndb; +insert into t1 values ('jonas % '); +replace into t1 values ('jonas % '); +replace into t1 values ('jonas % '); +select * from t1; +drop table t1;