mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
ndb - wl-1442 4.1->5.0 merge fixes
ndb/include/kernel/signaldata/DictTabInfo.hpp: wl-1442 4.1->5.0 merge fixes ndb/include/ndb_constants.h: wl-1442 4.1->5.0 merge fixes ndb/include/util/NdbSqlUtil.hpp: wl-1442 4.1->5.0 merge fixes ndb/src/common/util/NdbSqlUtil.cpp: wl-1442 4.1->5.0 merge fixes
This commit is contained in:
@@ -384,7 +384,6 @@ public:
|
|||||||
AttributeArraySize = (NDB_BLOB_HEAD_SIZE << 2) + (AttributeExtPrecision & 0xFFFF);
|
AttributeArraySize = (NDB_BLOB_HEAD_SIZE << 2) + (AttributeExtPrecision & 0xFFFF);
|
||||||
return true;
|
return true;
|
||||||
case DictTabInfo::ExtTime:
|
case DictTabInfo::ExtTime:
|
||||||
AttributeType = DictTabInfo::StringType;
|
|
||||||
AttributeSize = DictTabInfo::an8Bit;
|
AttributeSize = DictTabInfo::an8Bit;
|
||||||
AttributeArraySize = 3 * AttributeExtLength;
|
AttributeArraySize = 3 * AttributeExtLength;
|
||||||
return true;
|
return true;
|
||||||
|
@@ -53,12 +53,16 @@
|
|||||||
#define NDB_TYPE_VARCHAR 15
|
#define NDB_TYPE_VARCHAR 15
|
||||||
#define NDB_TYPE_BINARY 16
|
#define NDB_TYPE_BINARY 16
|
||||||
#define NDB_TYPE_VARBINARY 17
|
#define NDB_TYPE_VARBINARY 17
|
||||||
#define NDB_TYPE_DATETIME 18 // need to fix
|
#define NDB_TYPE_DATETIME 18
|
||||||
#define NDB_TYPE_TIMESPEC 19 // need to fix
|
#define NDB_TYPE_DATE 19
|
||||||
#define NDB_TYPE_BLOB 20
|
#define NDB_TYPE_BLOB 20
|
||||||
#define NDB_TYPE_TEXT 21
|
#define NDB_TYPE_TEXT 21
|
||||||
#define NDB_TYPE_BIT 22
|
#define NDB_TYPE_BIT 22
|
||||||
|
|
||||||
#define NDB_TYPE_MAX 23
|
// fill in NDB_TYPE_LONGVAR* at next merge 5.0-ndb -> 5.0
|
||||||
|
|
||||||
|
#define NDB_TYPE_TIME 25
|
||||||
|
|
||||||
|
#define NDB_TYPE_MAX 26
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -83,7 +83,7 @@ public:
|
|||||||
Binary = NDB_TYPE_BINARY,
|
Binary = NDB_TYPE_BINARY,
|
||||||
Varbinary = NDB_TYPE_VARBINARY,
|
Varbinary = NDB_TYPE_VARBINARY,
|
||||||
Datetime = NDB_TYPE_DATETIME,
|
Datetime = NDB_TYPE_DATETIME,
|
||||||
Timespec = NDB_TYPE_TIMESPEC,
|
Date = NDB_TYPE_DATE,
|
||||||
Blob = NDB_TYPE_BLOB,
|
Blob = NDB_TYPE_BLOB,
|
||||||
Text = NDB_TYPE_TEXT,
|
Text = NDB_TYPE_TEXT,
|
||||||
Bit = NDB_TYPE_BIT,
|
Bit = NDB_TYPE_BIT,
|
||||||
|
@@ -449,6 +449,7 @@ NdbSqlUtil::cmpVarchar(const void* info, const void* p1, unsigned n1, const void
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
NdbSqlUtil::cmpBinary(const void* info, const void* p1, unsigned n1, const void* p2, unsigned n2, bool full)
|
NdbSqlUtil::cmpBinary(const void* info, const void* p1, unsigned n1, const void* p2, unsigned n2, bool full)
|
||||||
{
|
{
|
||||||
const uchar* v1 = (const uchar*)p1;
|
const uchar* v1 = (const uchar*)p1;
|
||||||
@@ -505,7 +506,7 @@ NdbSqlUtil::cmpDate(const void* info, const void* p1, unsigned n1, const void* p
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
assert(! full);
|
assert(! full);
|
||||||
return cmpUnknown;
|
return CmpUnknown;
|
||||||
#else
|
#else
|
||||||
if (n2 >= 4) { // may access 4-th byte
|
if (n2 >= 4) { // may access 4-th byte
|
||||||
const uchar* v1 = (const uchar*)p1;
|
const uchar* v1 = (const uchar*)p1;
|
||||||
@@ -522,7 +523,7 @@ NdbSqlUtil::cmpDate(const void* info, const void* p1, unsigned n1, const void* p
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
assert(! full);
|
assert(! full);
|
||||||
return cmpUnknown;
|
return CmpUnknown;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -543,14 +544,14 @@ NdbSqlUtil::cmpText(const void* info, const void* p1, unsigned n1, const void* p
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
NdbSqlUtil::cmpTime(const void* info, const Uint32* p1, const Uint32* p2, Uint32 full, Uint32 size)
|
NdbSqlUtil::cmpTime(const void* info, const void* p1, unsigned n1, const void* p2, unsigned n2, bool full)
|
||||||
{
|
{
|
||||||
if (n2 >= 4) { // may access 4-th byte
|
if (n2 >= 4) { // may access 4-th byte
|
||||||
const uchar* v1 = (const uchar*)p1;
|
const uchar* v1 = (const uchar*)p1;
|
||||||
const uchar* v2 = (const uchar*)p2;
|
const uchar* v2 = (const uchar*)p2;
|
||||||
// from Field_time::val_int
|
// from Field_time::val_int
|
||||||
Int32 j1 = sint3korr(u1.v);
|
Int32 j1 = sint3korr(v1);
|
||||||
Int32 j2 = sint3korr(u2.v);
|
Int32 j2 = sint3korr(v2);
|
||||||
if (j1 < j2)
|
if (j1 < j2)
|
||||||
return -1;
|
return -1;
|
||||||
if (j1 > j2)
|
if (j1 > j2)
|
||||||
|
Reference in New Issue
Block a user