Commit 9615e9be authored by unknown's avatar unknown

ndb: charset fix from Bar (strxfrm_multiply can be 0)


ndb/src/common/util/NdbSqlUtil.cpp:
  charset fix from Bar (strxfrm_multiply can be 0)
ndb/src/ndbapi/NdbIndexOperation.cpp:
  charset fix from Bar (strxfrm_multiply can be 0)
ndb/src/ndbapi/NdbOperationSearch.cpp:
  charset fix from Bar (strxfrm_multiply can be 0)
ndb/src/ndbapi/NdbScanOperation.cpp:
  charset fix from Bar (strxfrm_multiply can be 0)
parent 03d6e245
...@@ -582,7 +582,7 @@ NdbSqlUtil::usable_in_pk(Uint32 typeId, const void* info) ...@@ -582,7 +582,7 @@ NdbSqlUtil::usable_in_pk(Uint32 typeId, const void* info)
cs->cset != 0 && cs->cset != 0 &&
cs->coll != 0 && cs->coll != 0 &&
cs->coll->strnxfrm != 0 && cs->coll->strnxfrm != 0 &&
cs->strxfrm_multiply == 1; // current limitation cs->strxfrm_multiply <= 1; // current limitation
} }
break; break;
case Type::Varchar: case Type::Varchar:
...@@ -618,7 +618,7 @@ NdbSqlUtil::usable_in_ordered_index(Uint32 typeId, const void* info) ...@@ -618,7 +618,7 @@ NdbSqlUtil::usable_in_ordered_index(Uint32 typeId, const void* info)
cs->coll != 0 && cs->coll != 0 &&
cs->coll->strnxfrm != 0 && cs->coll->strnxfrm != 0 &&
cs->coll->strnncollsp != 0 && cs->coll->strnncollsp != 0 &&
cs->strxfrm_multiply == 1; // current limitation cs->strxfrm_multiply <= 1; // current limitation
} }
break; break;
case Type::Varchar: case Type::Varchar:
...@@ -633,7 +633,7 @@ NdbSqlUtil::usable_in_ordered_index(Uint32 typeId, const void* info) ...@@ -633,7 +633,7 @@ NdbSqlUtil::usable_in_ordered_index(Uint32 typeId, const void* info)
cs->coll != 0 && cs->coll != 0 &&
cs->coll->strnxfrm != 0 && cs->coll->strnxfrm != 0 &&
cs->coll->strnncollsp != 0 && cs->coll->strnncollsp != 0 &&
cs->strxfrm_multiply == 1; // current limitation cs->strxfrm_multiply <= 1; // current limitation
} }
break; break;
default: default:
......
...@@ -272,7 +272,7 @@ int NdbIndexOperation::equal_impl(const NdbColumnImpl* tAttrInfo, ...@@ -272,7 +272,7 @@ int NdbIndexOperation::equal_impl(const NdbColumnImpl* tAttrInfo,
CHARSET_INFO* cs = tAttrInfo->m_cs; CHARSET_INFO* cs = tAttrInfo->m_cs;
if (cs != 0) { if (cs != 0) {
// current limitation: strxfrm does not increase length // current limitation: strxfrm does not increase length
assert(cs->strxfrm_multiply == 1); assert(cs->strxfrm_multiply <= 1);
unsigned n = unsigned n =
(*cs->coll->strnxfrm)(cs, (*cs->coll->strnxfrm)(cs,
(uchar*)xfrmData, sizeof(xfrmData), (uchar*)xfrmData, sizeof(xfrmData),
......
...@@ -142,7 +142,7 @@ NdbOperation::equal_impl(const NdbColumnImpl* tAttrInfo, ...@@ -142,7 +142,7 @@ NdbOperation::equal_impl(const NdbColumnImpl* tAttrInfo,
CHARSET_INFO* cs = tAttrInfo->m_cs; CHARSET_INFO* cs = tAttrInfo->m_cs;
if (cs != 0) { if (cs != 0) {
// current limitation: strxfrm does not increase length // current limitation: strxfrm does not increase length
assert(cs->strxfrm_multiply == 1); assert(cs->strxfrm_multiply <= 1);
unsigned n = unsigned n =
(*cs->coll->strnxfrm)(cs, (*cs->coll->strnxfrm)(cs,
(uchar*)xfrmData, sizeof(xfrmData), (uchar*)xfrmData, sizeof(xfrmData),
......
...@@ -1091,7 +1091,7 @@ NdbIndexScanOperation::setBound(const NdbColumnImpl* tAttrInfo, ...@@ -1091,7 +1091,7 @@ NdbIndexScanOperation::setBound(const NdbColumnImpl* tAttrInfo,
Uint32 xfrmData[2000]; Uint32 xfrmData[2000];
if (cs != NULL && aValue != NULL) { if (cs != NULL && aValue != NULL) {
// current limitation: strxfrm does not increase length // current limitation: strxfrm does not increase length
assert(cs->strxfrm_multiply == 1); assert(cs->strxfrm_multiply <= 1);
unsigned n = unsigned n =
(*cs->coll->strnxfrm)(cs, (*cs->coll->strnxfrm)(cs,
(uchar*)xfrmData, sizeof(xfrmData), (uchar*)xfrmData, sizeof(xfrmData),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment