Loading mysql-test/r/ndb_bitfield.result +6 −6 Original line number Diff line number Diff line Loading @@ -201,21 +201,21 @@ create table t1 ( pk1 bit(9) not null primary key, b int ) engine=ndbcluster; ERROR HY000: Can't create table 'test.t1' (errno: 140) ERROR HY000: Can't create table 'test.t1' (errno: 906) show warnings; Level Code Message Error 1296 Got error 739 'Unsupported primary key length' from NDB Error 1005 Can't create table 'test.t1' (errno: 140) Error 1296 Got error 906 'Unsupported attribute type in index' from NDB Error 1005 Can't create table 'test.t1' (errno: 906) create table t1 ( pk1 int not null primary key, b bit(9), key(b) ) engine=ndbcluster; ERROR HY000: Can't create table 'test.t1' (errno: 140) ERROR HY000: Can't create table 'test.t1' (errno: 906) show warnings; Level Code Message Error 1296 Got error 743 'Unsupported character set in table or index' from NDB Error 1005 Can't create table 'test.t1' (errno: 140) Error 1296 Got error 906 'Unsupported attribute type in index' from NDB Error 1005 Can't create table 'test.t1' (errno: 906) create table t1 ( pk1 int primary key, b bit(32) not null Loading storage/myisam/mi_open.c +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) bzero((byte*) &info,sizeof(info)); my_realpath(name_buff, fn_format(org_name,name,"",MI_NAME_IEXT, MY_UNPACK_FILENAME|MY_APPEND_EXT),MYF(0)); MY_UNPACK_FILENAME),MYF(0)); pthread_mutex_lock(&THR_LOCK_myisam); if (!(old_info=test_if_reopen(name_buff))) { Loading storage/ndb/include/kernel/signaldata/TupFrag.hpp +2 −1 Original line number Diff line number Diff line Loading @@ -147,7 +147,8 @@ public: enum ErrorCode { NoError = 0, InvalidCharset = 743, TooManyBitsUsed = 831 TooManyBitsUsed = 831, UnsupportedType = 906 }; private: Uint32 userPtr; Loading storage/ndb/include/util/NdbSqlUtil.hpp +3 −3 Original line number Diff line number Diff line Loading @@ -117,9 +117,9 @@ public: /** * Check character set. */ 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); static uint check_column_for_pk(Uint32 typeId, const void* info); static uint check_column_for_hash_index(Uint32 typeId, const void* info); static uint check_column_for_ordered_index(Uint32 typeId, const void* info); /** * Get number of length bytes and length from variable length string. Loading storage/ndb/src/common/util/NdbSqlUtil.cpp +28 −24 Original line number Diff line number Diff line Loading @@ -872,8 +872,8 @@ NdbSqlUtil::likeLongvarbinary(const void* info, const void* p1, unsigned n1, con // check charset bool NdbSqlUtil::usable_in_pk(Uint32 typeId, const void* info) uint NdbSqlUtil::check_column_for_pk(Uint32 typeId, const void* info) { const Type& type = getType(typeId); switch (type.m_typeId) { Loading @@ -882,12 +882,14 @@ NdbSqlUtil::usable_in_pk(Uint32 typeId, const void* info) case Type::Longvarchar: { const CHARSET_INFO *cs = (const CHARSET_INFO*)info; return cs != 0 && if(cs != 0 && cs->cset != 0 && cs->coll != 0 && cs->coll->strnxfrm != 0 && cs->strxfrm_multiply <= MAX_XFRM_MULTIPLY; cs->strxfrm_multiply <= MAX_XFRM_MULTIPLY) return 0; else return 743; } break; case Type::Undefined: Loading @@ -896,19 +898,19 @@ NdbSqlUtil::usable_in_pk(Uint32 typeId, const void* info) case Type::Bit: break; default: return true; return 0; } return false; return 906; } bool NdbSqlUtil::usable_in_hash_index(Uint32 typeId, const void* info) uint NdbSqlUtil::check_column_for_hash_index(Uint32 typeId, const void* info) { return usable_in_pk(typeId, info); return check_column_for_pk(typeId, info); } bool NdbSqlUtil::usable_in_ordered_index(Uint32 typeId, const void* info) uint NdbSqlUtil::check_column_for_ordered_index(Uint32 typeId, const void* info) { const Type& type = getType(typeId); if (type.m_cmp == NULL) Loading @@ -919,13 +921,15 @@ NdbSqlUtil::usable_in_ordered_index(Uint32 typeId, const void* info) case Type::Longvarchar: { const CHARSET_INFO *cs = (const CHARSET_INFO*)info; return cs != 0 && if (cs != 0 && cs->cset != 0 && cs->coll != 0 && cs->coll->strnxfrm != 0 && cs->coll->strnncollsp != 0 && cs->strxfrm_multiply <= MAX_XFRM_MULTIPLY; cs->strxfrm_multiply <= MAX_XFRM_MULTIPLY) return 0; else return 743; } break; case Type::Undefined: Loading @@ -934,9 +938,9 @@ NdbSqlUtil::usable_in_ordered_index(Uint32 typeId, const void* info) case Type::Bit: // can be fixed break; default: return true; return 0; } return false; return 906; } // utilities Loading Loading
mysql-test/r/ndb_bitfield.result +6 −6 Original line number Diff line number Diff line Loading @@ -201,21 +201,21 @@ create table t1 ( pk1 bit(9) not null primary key, b int ) engine=ndbcluster; ERROR HY000: Can't create table 'test.t1' (errno: 140) ERROR HY000: Can't create table 'test.t1' (errno: 906) show warnings; Level Code Message Error 1296 Got error 739 'Unsupported primary key length' from NDB Error 1005 Can't create table 'test.t1' (errno: 140) Error 1296 Got error 906 'Unsupported attribute type in index' from NDB Error 1005 Can't create table 'test.t1' (errno: 906) create table t1 ( pk1 int not null primary key, b bit(9), key(b) ) engine=ndbcluster; ERROR HY000: Can't create table 'test.t1' (errno: 140) ERROR HY000: Can't create table 'test.t1' (errno: 906) show warnings; Level Code Message Error 1296 Got error 743 'Unsupported character set in table or index' from NDB Error 1005 Can't create table 'test.t1' (errno: 140) Error 1296 Got error 906 'Unsupported attribute type in index' from NDB Error 1005 Can't create table 'test.t1' (errno: 906) create table t1 ( pk1 int primary key, b bit(32) not null Loading
storage/myisam/mi_open.c +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) bzero((byte*) &info,sizeof(info)); my_realpath(name_buff, fn_format(org_name,name,"",MI_NAME_IEXT, MY_UNPACK_FILENAME|MY_APPEND_EXT),MYF(0)); MY_UNPACK_FILENAME),MYF(0)); pthread_mutex_lock(&THR_LOCK_myisam); if (!(old_info=test_if_reopen(name_buff))) { Loading
storage/ndb/include/kernel/signaldata/TupFrag.hpp +2 −1 Original line number Diff line number Diff line Loading @@ -147,7 +147,8 @@ public: enum ErrorCode { NoError = 0, InvalidCharset = 743, TooManyBitsUsed = 831 TooManyBitsUsed = 831, UnsupportedType = 906 }; private: Uint32 userPtr; Loading
storage/ndb/include/util/NdbSqlUtil.hpp +3 −3 Original line number Diff line number Diff line Loading @@ -117,9 +117,9 @@ public: /** * Check character set. */ 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); static uint check_column_for_pk(Uint32 typeId, const void* info); static uint check_column_for_hash_index(Uint32 typeId, const void* info); static uint check_column_for_ordered_index(Uint32 typeId, const void* info); /** * Get number of length bytes and length from variable length string. Loading
storage/ndb/src/common/util/NdbSqlUtil.cpp +28 −24 Original line number Diff line number Diff line Loading @@ -872,8 +872,8 @@ NdbSqlUtil::likeLongvarbinary(const void* info, const void* p1, unsigned n1, con // check charset bool NdbSqlUtil::usable_in_pk(Uint32 typeId, const void* info) uint NdbSqlUtil::check_column_for_pk(Uint32 typeId, const void* info) { const Type& type = getType(typeId); switch (type.m_typeId) { Loading @@ -882,12 +882,14 @@ NdbSqlUtil::usable_in_pk(Uint32 typeId, const void* info) case Type::Longvarchar: { const CHARSET_INFO *cs = (const CHARSET_INFO*)info; return cs != 0 && if(cs != 0 && cs->cset != 0 && cs->coll != 0 && cs->coll->strnxfrm != 0 && cs->strxfrm_multiply <= MAX_XFRM_MULTIPLY; cs->strxfrm_multiply <= MAX_XFRM_MULTIPLY) return 0; else return 743; } break; case Type::Undefined: Loading @@ -896,19 +898,19 @@ NdbSqlUtil::usable_in_pk(Uint32 typeId, const void* info) case Type::Bit: break; default: return true; return 0; } return false; return 906; } bool NdbSqlUtil::usable_in_hash_index(Uint32 typeId, const void* info) uint NdbSqlUtil::check_column_for_hash_index(Uint32 typeId, const void* info) { return usable_in_pk(typeId, info); return check_column_for_pk(typeId, info); } bool NdbSqlUtil::usable_in_ordered_index(Uint32 typeId, const void* info) uint NdbSqlUtil::check_column_for_ordered_index(Uint32 typeId, const void* info) { const Type& type = getType(typeId); if (type.m_cmp == NULL) Loading @@ -919,13 +921,15 @@ NdbSqlUtil::usable_in_ordered_index(Uint32 typeId, const void* info) case Type::Longvarchar: { const CHARSET_INFO *cs = (const CHARSET_INFO*)info; return cs != 0 && if (cs != 0 && cs->cset != 0 && cs->coll != 0 && cs->coll->strnxfrm != 0 && cs->coll->strnncollsp != 0 && cs->strxfrm_multiply <= MAX_XFRM_MULTIPLY; cs->strxfrm_multiply <= MAX_XFRM_MULTIPLY) return 0; else return 743; } break; case Type::Undefined: Loading @@ -934,9 +938,9 @@ NdbSqlUtil::usable_in_ordered_index(Uint32 typeId, const void* info) case Type::Bit: // can be fixed break; default: return true; return 0; } return false; return 906; } // utilities Loading