Commit b5b0a3d6 authored by jonas@perch.ndb.mysql.com's avatar jonas@perch.ndb.mysql.com

Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-push

into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new
parents b846c546 b7c11c87
......@@ -28,7 +28,7 @@
#define _LARGEFILE_SOURCE
#define _LARGEFILE64_SOURCE
#define _XOPEN_SOURCE /* needed to include getopt.h on some platforms. */
#define _XOPEN_SOURCE 500 /* needed to include getopt.h on some platforms. */
#include <stdio.h>
#include <stdlib.h>
......
......@@ -1886,6 +1886,8 @@ SimulatedBlock::xfrm_key(Uint32 tab, const Uint32* src,
xfrm_attr(keyAttr.attributeDescriptor, keyAttr.charsetInfo,
src, srcPos, dst, dstPos, dstSize);
keyPartLen[i++] = dstWords;
if (unlikely(dstWords == 0))
return 0;
}
if (0)
......@@ -1952,7 +1954,8 @@ SimulatedBlock::xfrm_attr(Uint32 attrDesc, CHARSET_INFO* cs,
AttributeDescriptor::getType(attrDesc);
Uint32 lb, len;
bool ok = NdbSqlUtil::get_var_length(typeId, srcPtr, srcBytes, lb, len);
ndbrequire(ok);
if (unlikely(!ok))
return 0;
Uint32 xmul = cs->strxfrm_multiply;
if (xmul == 0)
xmul = 1;
......@@ -1963,7 +1966,8 @@ SimulatedBlock::xfrm_attr(Uint32 attrDesc, CHARSET_INFO* cs,
Uint32 dstLen = xmul * (srcBytes - lb);
ndbrequire(dstLen <= ((dstSize - dstPos) << 2));
int n = NdbSqlUtil::strnxfrm_bug7284(cs, dstPtr, dstLen, srcPtr + lb, len);
ndbrequire(n != -1);
if (unlikely(n == -1))
return 0;
while ((n & 3) != 0)
{
dstPtr[n++] = 0;
......
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