#At file:///home/frazer/bzr/mysql-5.1-telco-6.2/
3044 Frazer Clement 2009-11-27
Bug#48973 Assertion failed at NdbOperationSearch.cpp line 509
modified:
storage/ndb/src/ndbapi/NdbOperationSearch.cpp
storage/ndb/test/ndbapi/testBlobs.cpp
storage/ndb/test/run-test/daily-basic-tests.txt
=== modified file 'storage/ndb/src/ndbapi/NdbOperationSearch.cpp'
--- a/storage/ndb/src/ndbapi/NdbOperationSearch.cpp 2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/ndbapi/NdbOperationSearch.cpp 2009-11-27 13:13:26 +0000
@@ -473,7 +473,8 @@ NdbOperation::reorderKEYINFO()
{
Uint32 data[ NDB_MAX_KEYSIZE_IN_WORDS ];
Uint32 size = NDB_MAX_KEYSIZE_IN_WORDS;
- getKeyFromTCREQ(data, size);
+ int rc = getKeyFromTCREQ(data, size);
+ assert(rc == 0);
Uint32 pos = 1;
Uint32 k;
for (k = 0; k < m_accessTable->m_noOfKeys; k++) {
@@ -505,7 +506,10 @@ NdbOperation::reorderKEYINFO()
int
NdbOperation::getKeyFromTCREQ(Uint32* data, Uint32 & size)
{
- assert(size >= theTupKeyLen && theTupKeyLen > 0);
+ /* Check that we can correctly return a valid key */
+ if ((size < theTupKeyLen) || (theTupKeyLen == 0))
+ return -1;
+
size = theTupKeyLen;
unsigned pos = 0;
while (pos < 8 && pos < size) {
=== modified file 'storage/ndb/test/ndbapi/testBlobs.cpp'
--- a/storage/ndb/test/ndbapi/testBlobs.cpp 2009-10-26 20:02:17 +0000
+++ b/storage/ndb/test/ndbapi/testBlobs.cpp 2009-11-27 13:13:26 +0000
@@ -3997,6 +3997,31 @@ bugtest_27370()
return 0;
}
+static int
+bugtest_48973()
+{
+ DBG("bug test 48973 - Assertion failed at NdbOperationSearch.cpp line 509");
+
+ /* Attempt to insert tuple with Blob column, without setting the key at all */
+ calcTups(true);
+
+ Tup& tup = g_tups[0];
+ CHK((g_con = g_ndb->startTransaction()) != 0);
+ CHK((g_opr = g_con->getNdbOperation(g_opt.m_tname)) != 0);
+ CHK(g_opr->insertTuple() ==0);
+ CHK(getBlobHandles(g_opr) != 0);
+
+ /* 4264 == Invalid usage of Blob attribute */
+ CHK(g_con->getNdbError().code == 4264);
+ CHK(g_opr->getNdbError().code == 4264);
+
+ g_ndb->closeTransaction(g_con);
+
+ g_opr = 0;
+ g_con = 0;
+ return 0;
+}
+
static struct {
int m_bug;
int (*m_test)();
@@ -4006,7 +4031,8 @@ static struct {
{ 27370, bugtest_27370 },
{ 36756, bugtest_36756 },
{ 45768, bugtest_45768 },
- { 48040, bugtest_48040 }
+ { 48040, bugtest_48040 },
+ { 48973, bugtest_48973 }
};
NDB_COMMAND(testOdbcDriver, "testBlobs", "testBlobs", "testBlobs", 65535)
=== modified file 'storage/ndb/test/run-test/daily-basic-tests.txt'
--- a/storage/ndb/test/run-test/daily-basic-tests.txt 2009-10-26 20:02:17 +0000
+++ b/storage/ndb/test/run-test/daily-basic-tests.txt 2009-11-27 13:13:26 +0000
@@ -1378,3 +1378,7 @@ max-time: 300
cmd: testBasic
args: -n DDInsertFailUpdateBatch D1 D2
+max-time: 300
+cmd: testBlobs
+args: -skip hp -bug 48973
+
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-6.2 branch (frazer:3044) Bug#48973 | Frazer Clement | 27 Nov |