summaryrefslogtreecommitdiff
path: root/ndb/include/util
diff options
context:
space:
mode:
authorpekka@mysql.com <>2004-09-17 14:18:32 +0200
committerpekka@mysql.com <>2004-09-17 14:18:32 +0200
commite274047c24a972b3774a69e80164fb847afbaaaf (patch)
treecdf1acfbaba13a23d58a84c53ed3803c6d801099 /ndb/include/util
parentf21e6d81ff354f4f29bca1cf2b8d9e670ef47663 (diff)
parentd02998e20f8f77c911b004644c32569adbb86c9e (diff)
downloadmariadb-git-e274047c24a972b3774a69e80164fb847afbaaaf.tar.gz
Merge pnousiainen@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb
into mysql.com:/space/pekka/ndb/version/my41-cc
Diffstat (limited to 'ndb/include/util')
-rw-r--r--ndb/include/util/NdbSqlUtil.hpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/ndb/include/util/NdbSqlUtil.hpp b/ndb/include/util/NdbSqlUtil.hpp
index df1cb716f93..3062d1e4e1b 100644
--- a/ndb/include/util/NdbSqlUtil.hpp
+++ b/ndb/include/util/NdbSqlUtil.hpp
@@ -40,11 +40,14 @@ public:
* Compare kernel attribute values. Returns -1, 0, +1 for less,
* equal, greater, respectively. Parameters are pointers to values,
* full attribute size in words, and size of available data in words.
+ * There is also pointer to type specific extra info. Char types
+ * receive CHARSET_INFO in it.
+ *
* If available size is less than full size, CmpUnknown may be
* returned. If a value cannot be parsed, it compares like NULL i.e.
* less than any valid value.
*/
- typedef int Cmp(const Uint32* p1, const Uint32* p2, Uint32 full, Uint32 size);
+ typedef int Cmp(const void* info, const Uint32* p1, const Uint32* p2, Uint32 full, Uint32 size);
enum CmpResult {
CmpLess = -1,
@@ -55,6 +58,7 @@ public:
/**
* Kernel data types. Must match m_typeList in NdbSqlUtil.cpp.
+ * Now also must match types in NdbDictionary.
*/
struct Type {
enum Enum {
@@ -91,6 +95,11 @@ public:
static const Type& getType(Uint32 typeId);
/**
+ * Get type by id but replace char type by corresponding binary type.
+ */
+ static const Type& getTypeBinary(Uint32 typeId);
+
+ /**
* Check character set.
*/
static bool usable_in_pk(Uint32 typeId, const void* cs);