From 9b80f95f8f0d1d0940df53a23ba4cd8fb586dddd Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 9 Jan 2005 11:00:37 +0100 Subject: ndb - Fix ndb_limit, handle cmpDate of length 3 Remove ucs2 test as it requires one to configure --with-extra-charsets mysql-test/r/ndb_charset.result: Remove ucs2 test as it requires one to configure --with-extra-charsets mysql-test/t/ndb_charset.test: Remove ucs2 test as it requires one to configure --with-extra-charsets ndb/src/common/util/NdbSqlUtil.cpp: Fix ndb_limit, handle cmpDate of length 3 --- ndb/src/common/util/NdbSqlUtil.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ndb/src/common/util') diff --git a/ndb/src/common/util/NdbSqlUtil.cpp b/ndb/src/common/util/NdbSqlUtil.cpp index 1e280ae0fac..82f99d0e7fd 100644 --- a/ndb/src/common/util/NdbSqlUtil.cpp +++ b/ndb/src/common/util/NdbSqlUtil.cpp @@ -545,6 +545,15 @@ NdbSqlUtil::cmpDate(const void* info, const void* p1, unsigned n1, const void* p assert(! full); return CmpUnknown; #else + char t1[4], t2[4]; + if (n1 == 3 && n2 == 3) + { + memcpy(t1, p1, 3); + memcpy(t2, p2, 3); + p1 = t1; + p2 = t2; + n1 = n2 = 4; + } if (n2 >= 4) { // may access 4-th byte const uchar* v1 = (const uchar*)p1; const uchar* v2 = (const uchar*)p2; -- cgit v1.2.1