1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-30 11:22:14 +03:00

ndb - wl-1442 new varchar

mysql-test/r/ndb_alter_table.result:
  wl-1442 new varchar
mysql-test/r/ndb_bitfield.result:
  wl-1442 new varchar
mysql-test/r/ndb_charset.result:
  wl-1442 new varchar
mysql-test/t/ndb_charset.test:
  wl-1442 new varchar
ndb/include/kernel/signaldata/DictTabInfo.hpp:
  wl-1442 new varchar
ndb/include/ndb_constants.h:
  wl-1442 new varchar
ndb/include/ndbapi/NdbDictionary.hpp:
  wl-1442 new varchar
ndb/include/util/NdbSqlUtil.hpp:
  wl-1442 new varchar
ndb/src/common/util/NdbSqlUtil.cpp:
  wl-1442 new varchar
ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
  wl-1442 new varchar
ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  wl-1442 new varchar
ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
  wl-1442 new varchar
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  wl-1442 new varchar
ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp:
  wl-1442 new varchar
ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp:
  wl-1442 new varchar
ndb/src/ndbapi/NdbDictionary.cpp:
  wl-1442 new varchar
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  wl-1442 new varchar
ndb/src/ndbapi/NdbDictionaryImpl.hpp:
  wl-1442 new varchar
ndb/src/ndbapi/NdbOperationDefine.cpp:
  wl-1442 new varchar
ndb/src/ndbapi/NdbOperationSearch.cpp:
  wl-1442 new varchar
ndb/src/ndbapi/NdbRecAttr.cpp:
  wl-1442 new varchar
ndb/src/ndbapi/NdbTransaction.cpp:
  wl-1442 new varchar
ndb/test/ndbapi/testOIBasic.cpp:
  wl-1442 new varchar
sql/ha_ndbcluster.cc:
  wl-1442 new varchar
This commit is contained in:
unknown
2005-01-07 11:55:20 +01:00
parent bec9de67d4
commit 2331344909
24 changed files with 1168 additions and 428 deletions

View File

@@ -20,6 +20,9 @@
#include <ndb_global.h>
#include <kernel/ndb_limits.h>
struct charset_info_st;
typedef struct charset_info_st CHARSET_INFO;
class NdbSqlUtil {
public:
/**
@@ -86,9 +89,11 @@ public:
Timespec = NDB_TYPE_TIMESPEC,
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
};
Enum m_typeId;
Enum m_typeId; // redundant
Cmp* m_cmp; // comparison method
};
@@ -98,16 +103,29 @@ public:
static const Type& getType(Uint32 typeId);
/**
* Get type by id but replace char type by corresponding binary type.
* Get the normalized type used in hashing and key comparisons.
* Maps all string types to Binary.
*/
static const Type& getTypeBinary(Uint32 typeId);
/**
* Check character set.
*/
static bool usable_in_pk(Uint32 typeId, const void* cs);
static bool usable_in_hash_index(Uint32 typeId, const void* cs);
static bool usable_in_ordered_index(Uint32 typeId, const void* cs);
static bool usable_in_pk(Uint32 typeId, const void* info);
static bool usable_in_hash_index(Uint32 typeId, const void* info);
static bool usable_in_ordered_index(Uint32 typeId, const void* info);
/**
* Get number of length bytes and length from variable length string.
* Returns false on error (invalid data). For other types returns
* zero length bytes and the fixed attribute length.
*/
static bool get_var_length(Uint32 typeId, const void* p, unsigned attrlen, Uint32& lb, Uint32& len);
/**
* Temporary workaround for bug#7284.
*/
static int strnxfrm_bug7284(CHARSET_INFO* cs, unsigned char* dst, unsigned dstLen, const unsigned char*src, unsigned srcLen);
private:
/**
@@ -138,6 +156,9 @@ private:
static Cmp cmpTimespec;
static Cmp cmpBlob;
static Cmp cmpText;
static Cmp cmpBit;
static Cmp cmpLongvarchar;
static Cmp cmpLongvarbinary;
};
#endif