diff options
author | pekka@mysql.com <> | 2004-07-22 12:33:14 +0200 |
---|---|---|
committer | pekka@mysql.com <> | 2004-07-22 12:33:14 +0200 |
commit | e38792a6388144dd9b171730eed213069cd20944 (patch) | |
tree | 0a0dcd6a363ba58ac5410e3333585a1ecf97947c /ndb/include/util | |
parent | ce96f0e407ab3e2be70e02cf16b74dbb4e99d338 (diff) | |
download | mariadb-git-e38792a6388144dd9b171730eed213069cd20944.tar.gz |
ha_ndb blobs
Diffstat (limited to 'ndb/include/util')
-rw-r--r-- | ndb/include/util/NdbSqlUtil.hpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ndb/include/util/NdbSqlUtil.hpp b/ndb/include/util/NdbSqlUtil.hpp index 841da513d4a..78416fe9d01 100644 --- a/ndb/include/util/NdbSqlUtil.hpp +++ b/ndb/include/util/NdbSqlUtil.hpp @@ -80,7 +80,7 @@ public: Datetime, // Precision down to 1 sec (size 8 bytes) Timespec, // Precision down to 1 nsec (size 12 bytes) Blob, // Blob - Clob // Text blob + Text // Text blob }; Enum m_typeId; Cmp* m_cmp; // set to NULL if cmp not implemented @@ -125,7 +125,7 @@ private: static Cmp cmpDatetime; static Cmp cmpTimespec; static Cmp cmpBlob; - static Cmp cmpClob; + static Cmp cmpText; }; inline int @@ -344,17 +344,15 @@ NdbSqlUtil::cmp(Uint32 typeId, const Uint32* p1, const Uint32* p2, Uint32 full, break; case Type::Blob: // XXX fix break; - case Type::Clob: + case Type::Text: { - // skip blob head, the rest is varchar + // skip blob head, the rest is char const unsigned skip = NDB_BLOB_HEAD_SIZE; if (size >= skip + 1) { union { const Uint32* p; const char* v; } u1, u2; u1.p = p1 + skip; u2.p = p2 + skip; - // length in first 2 bytes - int k = strncmp(u1.v + 2, u2.v + 2, ((size - skip) << 2) - 2); - return k < 0 ? -1 : k > 0 ? +1 : full == size ? 0 : CmpUnknown; + // TODO } return CmpUnknown; } |