Commit 9615e9be authored by unknown's avatar unknown
Browse files

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
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -582,7 +582,7 @@ NdbSqlUtil::usable_in_pk(Uint32 typeId, const void* info)
        cs->cset != 0 &&
        cs->coll != 0 &&
        cs->coll->strnxfrm != 0 &&
        cs->strxfrm_multiply == 1; // current limitation
        cs->strxfrm_multiply <= 1; // current limitation
    }
    break;
  case Type::Varchar:
@@ -618,7 +618,7 @@ NdbSqlUtil::usable_in_ordered_index(Uint32 typeId, const void* info)
        cs->coll != 0 &&
        cs->coll->strnxfrm != 0 &&
        cs->coll->strnncollsp != 0 &&
        cs->strxfrm_multiply == 1; // current limitation
        cs->strxfrm_multiply <= 1; // current limitation
    }
    break;
  case Type::Varchar:
@@ -633,7 +633,7 @@ NdbSqlUtil::usable_in_ordered_index(Uint32 typeId, const void* info)
        cs->coll != 0 &&
        cs->coll->strnxfrm != 0 &&
        cs->coll->strnncollsp != 0 &&
        cs->strxfrm_multiply == 1; // current limitation
        cs->strxfrm_multiply <= 1; // current limitation
    }
    break;
  default:
+1 −1
Original line number Diff line number Diff line
@@ -272,7 +272,7 @@ int NdbIndexOperation::equal_impl(const NdbColumnImpl* tAttrInfo,
    CHARSET_INFO* cs = tAttrInfo->m_cs;
    if (cs != 0) {
      // current limitation: strxfrm does not increase length
      assert(cs->strxfrm_multiply == 1);
      assert(cs->strxfrm_multiply <= 1);
      unsigned n = 
      (*cs->coll->strnxfrm)(cs,
                            (uchar*)xfrmData, sizeof(xfrmData),
+1 −1
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@ NdbOperation::equal_impl(const NdbColumnImpl* tAttrInfo,
    CHARSET_INFO* cs = tAttrInfo->m_cs;
    if (cs != 0) {
      // current limitation: strxfrm does not increase length
      assert(cs->strxfrm_multiply == 1);
      assert(cs->strxfrm_multiply <= 1);
      unsigned n =
      (*cs->coll->strnxfrm)(cs,
                            (uchar*)xfrmData, sizeof(xfrmData),
+1 −1
Original line number Diff line number Diff line
@@ -1091,7 +1091,7 @@ NdbIndexScanOperation::setBound(const NdbColumnImpl* tAttrInfo,
    Uint32 xfrmData[2000];
    if (cs != NULL && aValue != NULL) {
      // current limitation: strxfrm does not increase length
      assert(cs->strxfrm_multiply == 1);
      assert(cs->strxfrm_multiply <= 1);
      unsigned n =
      (*cs->coll->strnxfrm)(cs,
                            (uchar*)xfrmData, sizeof(xfrmData),