summaryrefslogtreecommitdiff
path: root/ndb/include
diff options
context:
space:
mode:
authorunknown <pekka@mysql.com>2005-01-09 00:45:06 +0100
committerunknown <pekka@mysql.com>2005-01-09 00:45:06 +0100
commitf029af067b5e68222d3b52e5c3c400ba47ef411d (patch)
treef4e1eba2241ebc4cef73aa11e6ed710e36bb2d41 /ndb/include
parent3fbb1dd5fff45824f25916ad40488592a067ca86 (diff)
parent09a487266171a297db9fab88710c224e7526e8b6 (diff)
downloadmariadb-git-f029af067b5e68222d3b52e5c3c400ba47ef411d.tar.gz
Merge
ndb/src/ndbapi/NdbDictionary.cpp: Auto merged ndb/src/ndbapi/NdbDictionaryImpl.cpp: Auto merged sql/ha_ndbcluster.cc: Auto merged ndb/include/ndb_constants.h: merge 5.0->5.0-ndb ndb/include/kernel/signaldata/DictTabInfo.hpp: merge 5.0->5.0-ndb ndb/include/ndbapi/NdbDictionary.hpp: merge 5.0->5.0-ndb ndb/include/util/NdbSqlUtil.hpp: merge 5.0->5.0-ndb ndb/src/common/util/NdbSqlUtil.cpp: merge 5.0->5.0-ndb
Diffstat (limited to 'ndb/include')
-rw-r--r--ndb/include/kernel/signaldata/DictTabInfo.hpp13
-rw-r--r--ndb/include/ndb_constants.h10
-rw-r--r--ndb/include/ndbapi/NdbDictionary.hpp5
-rw-r--r--ndb/include/util/NdbSqlUtil.hpp10
4 files changed, 22 insertions, 16 deletions
diff --git a/ndb/include/kernel/signaldata/DictTabInfo.hpp b/ndb/include/kernel/signaldata/DictTabInfo.hpp
index cc8a647615c..93ad246a094 100644
--- a/ndb/include/kernel/signaldata/DictTabInfo.hpp
+++ b/ndb/include/kernel/signaldata/DictTabInfo.hpp
@@ -266,12 +266,13 @@ public:
ExtBinary = NdbSqlUtil::Type::Binary,
ExtVarbinary = NdbSqlUtil::Type::Varbinary,
ExtDatetime = NdbSqlUtil::Type::Datetime,
- ExtTimespec = NdbSqlUtil::Type::Timespec,
+ ExtDate = NdbSqlUtil::Type::Date,
ExtBlob = NdbSqlUtil::Type::Blob,
ExtText = NdbSqlUtil::Type::Text,
ExtBit = NdbSqlUtil::Type::Bit,
ExtLongvarchar = NdbSqlUtil::Type::Longvarchar,
- ExtLongvarbinary = NdbSqlUtil::Type::Longvarbinary
+ ExtLongvarbinary = NdbSqlUtil::Type::Longvarbinary,
+ ExtTime = NdbSqlUtil::Type::Time
};
// Attribute data interpretation
@@ -358,10 +359,10 @@ public:
AttributeSize = DictTabInfo::an8Bit;
AttributeArraySize = 8 * AttributeExtLength;
break;
- case DictTabInfo::ExtTimespec:
+ case DictTabInfo::ExtDate:
// to fix
AttributeSize = DictTabInfo::an8Bit;
- AttributeArraySize = 12 * AttributeExtLength;
+ AttributeArraySize = 3 * AttributeExtLength;
break;
case DictTabInfo::ExtBlob:
case DictTabInfo::ExtText:
@@ -380,6 +381,10 @@ public:
AttributeSize = DictTabInfo::an8Bit;
AttributeArraySize = AttributeExtLength + 2;
break;
+ case DictTabInfo::ExtTime:
+ AttributeSize = DictTabInfo::an8Bit;
+ AttributeArraySize = 3 * AttributeExtLength;
+ break;
default:
return false;
};
diff --git a/ndb/include/ndb_constants.h b/ndb/include/ndb_constants.h
index b4e42fb83f5..491d0719a69 100644
--- a/ndb/include/ndb_constants.h
+++ b/ndb/include/ndb_constants.h
@@ -53,17 +53,15 @@
#define NDB_TYPE_VARCHAR 15
#define NDB_TYPE_BINARY 16
#define NDB_TYPE_VARBINARY 17
-#define NDB_TYPE_DATETIME 18 // need to fix
-#define NDB_TYPE_TIMESPEC 19 // need to fix
+#define NDB_TYPE_DATETIME 18
+#define NDB_TYPE_DATE 19
#define NDB_TYPE_BLOB 20
#define NDB_TYPE_TEXT 21
#define NDB_TYPE_BIT 22
#define NDB_TYPE_LONG_VARCHAR 23
#define NDB_TYPE_LONG_VARBINARY 24
+#define NDB_TYPE_TIME 25
-// add at next merge 4.1->5.0
-// #define NDB_TYPE_TIME 25
-
-#define NDB_TYPE_MAX 25
+#define NDB_TYPE_MAX 26
#endif
diff --git a/ndb/include/ndbapi/NdbDictionary.hpp b/ndb/include/ndbapi/NdbDictionary.hpp
index ecc34072661..2100260dab3 100644
--- a/ndb/include/ndbapi/NdbDictionary.hpp
+++ b/ndb/include/ndbapi/NdbDictionary.hpp
@@ -190,12 +190,13 @@ public:
Binary = NDB_TYPE_BINARY, ///< Len
Varbinary = NDB_TYPE_VARBINARY, ///< Length bytes: 1, Max: 255
Datetime = NDB_TYPE_DATETIME, ///< Precision down to 1 sec (sizeof(Datetime) == 8 bytes )
- Timespec = NDB_TYPE_TIMESPEC, ///< Precision down to 1 nsec(sizeof(Datetime) == 12 bytes )
+ Date = NDB_TYPE_DATE, ///< Precision down to 1 day(sizeof(Date) == 4 bytes )
Blob = NDB_TYPE_BLOB, ///< Binary large object (see NdbBlob)
Text = NDB_TYPE_TEXT, ///< Text blob
Bit = NDB_TYPE_BIT, ///< Bit, length specifies no of bits
Longvarchar = NDB_TYPE_LONG_VARCHAR, ///< Length bytes: 2, little-endian
- Longvarbinary = NDB_TYPE_LONG_VARBINARY ///< Length bytes: 2, little-endian
+ Longvarbinary = NDB_TYPE_LONG_VARBINARY, ///< Length bytes: 2, little-endian
+ Time = NDB_TYPE_TIME ///< Time without date
};
/**
diff --git a/ndb/include/util/NdbSqlUtil.hpp b/ndb/include/util/NdbSqlUtil.hpp
index feb2b97c54b..529e02f1d89 100644
--- a/ndb/include/util/NdbSqlUtil.hpp
+++ b/ndb/include/util/NdbSqlUtil.hpp
@@ -86,12 +86,13 @@ public:
Binary = NDB_TYPE_BINARY,
Varbinary = NDB_TYPE_VARBINARY,
Datetime = NDB_TYPE_DATETIME,
- Timespec = NDB_TYPE_TIMESPEC,
+ Date = NDB_TYPE_DATE,
Blob = NDB_TYPE_BLOB,
Text = NDB_TYPE_TEXT,
- Bit = NDB_TYPE_BIT,
+ Bit = NDB_TYPE_BIT
Longvarchar = NDB_TYPE_LONG_VARCHAR,
- Longvarbinary = NDB_TYPE_LONG_VARBINARY
+ Longvarbinary = NDB_TYPE_LONG_VARBINARY,
+ Time = NDB_TYPE_TIME
};
Enum m_typeId; // redundant
Cmp* m_cmp; // comparison method
@@ -153,12 +154,13 @@ private:
static Cmp cmpBinary;
static Cmp cmpVarbinary;
static Cmp cmpDatetime;
- static Cmp cmpTimespec;
+ static Cmp cmpDate;
static Cmp cmpBlob;
static Cmp cmpText;
static Cmp cmpBit;
static Cmp cmpLongvarchar;
static Cmp cmpLongvarbinary;
+ static Cmp cmpTime;
};
#endif