summaryrefslogtreecommitdiff
path: root/ndb/src/common/util
diff options
context:
space:
mode:
authorunknown <joreland@mysql.com>2005-01-09 11:00:37 +0100
committerunknown <joreland@mysql.com>2005-01-09 11:00:37 +0100
commit9b80f95f8f0d1d0940df53a23ba4cd8fb586dddd (patch)
treeefa8424f5b6fe5eb8c39b2b2db1c9a2b86aac68c /ndb/src/common/util
parent79192c23358c9604a8c854a1b626e61ecbd6b34c (diff)
downloadmariadb-git-9b80f95f8f0d1d0940df53a23ba4cd8fb586dddd.tar.gz
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
Diffstat (limited to 'ndb/src/common/util')
-rw-r--r--ndb/src/common/util/NdbSqlUtil.cpp9
1 files changed, 9 insertions, 0 deletions
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;