From 5d4ac972988843c8e65b09f9bc4b1cc5fce3af65 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 21 Feb 2005 08:40:59 +0100 Subject: [PATCH 1/2] ndb - compiler warning - remove extra ; and end of function ndb/src/common/transporter/TransporterRegistry.cpp: extra ; and end of function --- ndb/src/common/transporter/TransporterRegistry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndb/src/common/transporter/TransporterRegistry.cpp b/ndb/src/common/transporter/TransporterRegistry.cpp index 4f3ba3ee7d7..b8dd2d1f561 100644 --- a/ndb/src/common/transporter/TransporterRegistry.cpp +++ b/ndb/src/common/transporter/TransporterRegistry.cpp @@ -132,7 +132,7 @@ void TransporterRegistry::set_mgm_handle(NdbMgmHandle h) } #endif DBUG_VOID_RETURN; -}; +} TransporterRegistry::~TransporterRegistry() { From 2403965d137434f9c0cf9b915caf3bae7f4e037b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 21 Feb 2005 10:44:37 +0100 Subject: [PATCH 2/2] ndb - allow LIKE with Binary strings ndb/include/util/NdbSqlUtil.hpp: allow LIKE with Binary strings ndb/src/common/util/NdbSqlUtil.cpp: allow LIKE with Binary strings --- ndb/include/util/NdbSqlUtil.hpp | 3 +++ ndb/src/common/util/NdbSqlUtil.cpp | 27 ++++++++++++++++++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/ndb/include/util/NdbSqlUtil.hpp b/ndb/include/util/NdbSqlUtil.hpp index ebcfc562ec4..0088978992e 100644 --- a/ndb/include/util/NdbSqlUtil.hpp +++ b/ndb/include/util/NdbSqlUtil.hpp @@ -178,8 +178,11 @@ private: static Cmp cmpDecimalunsigned; // static Like likeChar; + static Like likeBinary; static Like likeVarchar; + static Like likeVarbinary; static Like likeLongvarchar; + static Like likeLongvarbinary; }; #endif diff --git a/ndb/src/common/util/NdbSqlUtil.cpp b/ndb/src/common/util/NdbSqlUtil.cpp index 12ba1d0c4e6..db4353dba93 100644 --- a/ndb/src/common/util/NdbSqlUtil.cpp +++ b/ndb/src/common/util/NdbSqlUtil.cpp @@ -107,12 +107,12 @@ NdbSqlUtil::m_typeList[] = { { // 16 Type::Binary, cmpBinary, - NULL + likeBinary }, { // 17 Type::Varbinary, cmpVarbinary, - NULL + likeVarbinary }, { // 18 Type::Datetime, @@ -147,7 +147,7 @@ NdbSqlUtil::m_typeList[] = { { // 24 Type::Longvarbinary, cmpLongvarbinary, - NULL + likeLongvarbinary }, { // 25 Type::Time, @@ -805,6 +805,13 @@ NdbSqlUtil::likeChar(const void* info, const void* p1, unsigned n1, const void* return k; } +int +NdbSqlUtil::likeBinary(const void* info, const void* p1, unsigned n1, const void* p2, unsigned n2) +{ + assert(info == 0); + return likeChar(&my_charset_bin, p1, n1, p2, n2); +} + int NdbSqlUtil::likeVarchar(const void* info, const void* p1, unsigned n1, const void* p2, unsigned n2) { @@ -825,6 +832,13 @@ NdbSqlUtil::likeVarchar(const void* info, const void* p1, unsigned n1, const voi return -1; } +int +NdbSqlUtil::likeVarbinary(const void* info, const void* p1, unsigned n1, const void* p2, unsigned n2) +{ + assert(info == 0); + return likeVarchar(&my_charset_bin, p1, n1, p2, n2); +} + int NdbSqlUtil::likeLongvarchar(const void* info, const void* p1, unsigned n1, const void* p2, unsigned n2) { @@ -845,6 +859,13 @@ NdbSqlUtil::likeLongvarchar(const void* info, const void* p1, unsigned n1, const return -1; } +int +NdbSqlUtil::likeLongvarbinary(const void* info, const void* p1, unsigned n1, const void* p2, unsigned n2) +{ + assert(info == 0); + return likeLongvarchar(&my_charset_bin, p1, n1, p2, n2); +} + // check charset bool