ndb - wl-1442 4.1->5.0 merge fixes
This commit is contained in:
parent
195f7bda02
commit
fe906b4777
@ -384,7 +384,6 @@ public:
|
||||
AttributeArraySize = (NDB_BLOB_HEAD_SIZE << 2) + (AttributeExtPrecision & 0xFFFF);
|
||||
return true;
|
||||
case DictTabInfo::ExtTime:
|
||||
AttributeType = DictTabInfo::StringType;
|
||||
AttributeSize = DictTabInfo::an8Bit;
|
||||
AttributeArraySize = 3 * AttributeExtLength;
|
||||
return true;
|
||||
|
@ -53,12 +53,16 @@
|
||||
#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_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
|
||||
|
@ -83,7 +83,7 @@ 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,
|
||||
|
@ -449,6 +449,7 @@ NdbSqlUtil::cmpVarchar(const void* info, const void* p1, unsigned n1, const void
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
NdbSqlUtil::cmpBinary(const void* info, const void* p1, unsigned n1, const void* p2, unsigned n2, bool full)
|
||||
{
|
||||
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;
|
||||
}
|
||||
assert(! full);
|
||||
return cmpUnknown;
|
||||
return CmpUnknown;
|
||||
#else
|
||||
if (n2 >= 4) { // may access 4-th byte
|
||||
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;
|
||||
}
|
||||
assert(! full);
|
||||
return cmpUnknown;
|
||||
return CmpUnknown;
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -543,14 +544,14 @@ NdbSqlUtil::cmpText(const void* info, const void* p1, unsigned n1, const void* p
|
||||
}
|
||||
|
||||
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
|
||||
const uchar* v1 = (const uchar*)p1;
|
||||
const uchar* v2 = (const uchar*)p2;
|
||||
// from Field_time::val_int
|
||||
Int32 j1 = sint3korr(u1.v);
|
||||
Int32 j2 = sint3korr(u2.v);
|
||||
Int32 j1 = sint3korr(v1);
|
||||
Int32 j2 = sint3korr(v2);
|
||||
if (j1 < j2)
|
||||
return -1;
|
||||
if (j1 > j2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user