1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-16 20:23:18 +03:00

ndb - fix old decimal type mysql vs ndb

This commit is contained in:
pekka@mysql.com
2005-02-16 12:45:59 +01:00
parent 1393c8a808
commit 7c9a155c4a
12 changed files with 304 additions and 61 deletions

View File

@@ -75,7 +75,7 @@ public:
Bigunsigned, // 64 Bit
Float, // 32-bit float
Double, // 64-bit float
Decimal, // Precision, Scale
Olddecimal, // Precision, Scale
Char, // Len
Varchar, // Max len
Binary, // Len
@@ -86,7 +86,8 @@ public:
Text, // Text blob
Time = 25, // Time without date
Year = 26, // Year (size 1 byte)
Timestamp = 27 // Unix seconds (uint32)
Timestamp = 27, // Unix seconds (uint32)
Olddecimalunsigned = 28
};
Enum m_typeId;
Cmp* m_cmp; // comparison method
@@ -109,6 +110,11 @@ public:
static bool usable_in_hash_index(Uint32 typeId, const void* cs);
static bool usable_in_ordered_index(Uint32 typeId, const void* cs);
/**
* Compare decimal numbers.
*/
static int cmp_olddecimal(const uchar* s1, const uchar* s2, unsigned n);
private:
/**
* List of all types. Must match Type::Enum.
@@ -129,7 +135,7 @@ private:
static Cmp cmpBigunsigned;
static Cmp cmpFloat;
static Cmp cmpDouble;
static Cmp cmpDecimal;
static Cmp cmpOlddecimal;
static Cmp cmpChar;
static Cmp cmpVarchar;
static Cmp cmpBinary;
@@ -141,6 +147,7 @@ private:
static Cmp cmpTime;
static Cmp cmpYear;
static Cmp cmpTimestamp;
static Cmp cmpOlddecimalunsigned;
};
#endif