#At file:///home/jonas/src/telco-6.3/ based on revid:jonas@stripped
2943 Jonas Oreland 2009-04-20
(no message)
M storage/ndb/include/ndb_constants.h
M storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
M storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
M storage/ndb/src/kernel/vm/SimulatedBlock.cpp
M storage/ndb/src/ndbapi/ndberror.c
=== modified file 'storage/ndb/include/ndb_constants.h'
--- a/storage/ndb/include/ndb_constants.h 2008-09-30 06:55:35 +0000
+++ b/storage/ndb/include/ndb_constants.h 2009-04-20 02:49:52 +0000
@@ -76,6 +76,7 @@
#define NDB_ARRAYTYPE_FIXED 0 /* 0 length bytes */
#define NDB_ARRAYTYPE_SHORT_VAR 1 /* 1 length bytes */
#define NDB_ARRAYTYPE_MEDIUM_VAR 2 /* 2 length bytes */
+#define NDB_ARRAYTYPE_NONE_VAR 3 /* 0 length bytes */
/*
* Attribute storage type.
=== modified file 'storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2009-03-20 08:31:52 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2009-04-20 02:49:52 +0000
@@ -8921,7 +8921,8 @@ Dbdict::createIndex_toCreateTable(Signal
if (AttributeDescriptor::getPrimaryKey(desc) &&
AttributeDescriptor::getArrayType(desc) != NDB_ARRAYTYPE_FIXED)
{
- key_type = NDB_ARRAYTYPE_MEDIUM_VAR;
+ key_type = NDB_ARRAYTYPE_NONE_VAR;
+ ndbout_c("DICT: HERE");
break;
}
}
=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp 2008-11-03 08:33:52 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp 2009-04-20 02:49:52 +0000
@@ -1847,25 +1847,46 @@ Dbtup::varsize_updater(Uint32* in_buffer
Uint32 size_in_bytes = ahIn.getByteSize();
vsize_in_words= (size_in_bytes + 3) >> 2;
max_var_size= AttributeDescriptor::getSizeInBytes(attr_descriptor);
+ Uint32 arrayType = AttributeDescriptor::getArrayType(attr_descriptor);
new_index= index_buf + vsize_in_words + 1;
+
+ Uint32 dataLen = size_in_bytes;
+ const Uint8 * src = (const Uint8*)&in_buffer[index_buf + 1];
- if (new_index <= in_buf_len && vsize_in_words <= max_var_size) {
+ if (new_index <= in_buf_len && size_in_bytes <= max_var_size)
+ {
if (!null_ind) {
jam();
- *len_offset_ptr= var_attr_pos+size_in_bytes;
- req_struct->in_buf_index= new_index;
-
- ndbrequire(var_attr_pos+size_in_bytes <= check_offset);
- memcpy(var_data_start+var_attr_pos, &in_buffer[index_buf + 1],
- size_in_bytes);
- return true;
- }
+ if (arrayType == NDB_ARRAYTYPE_SHORT_VAR)
+ {
+ dataLen = 1 + src[0];
+ }
+ else if (arrayType == NDB_ARRAYTYPE_MEDIUM_VAR)
+ {
+ dataLen = 2 + src[0] + 256 * Uint32(src[1]);
+ }
+
+ if (dataLen == size_in_bytes)
+ {
+ *len_offset_ptr= var_attr_pos+size_in_bytes;
+ req_struct->in_buf_index= new_index;
+
+ ndbrequire(var_attr_pos+size_in_bytes <= check_offset);
+ memcpy(var_data_start+var_attr_pos, src, size_in_bytes);
+ return true;
+ }
+ jam();
+ abort();
+ terrorCode= ZAI_INCONSISTENCY_ERROR;
+ return false;
+ }
+
jam();
terrorCode= ZNOT_NULL_ATTR;
return false;
}
-
+
jam();
terrorCode= ZAI_INCONSISTENCY_ERROR;
return false;
=== modified file 'storage/ndb/src/kernel/vm/SimulatedBlock.cpp'
--- a/storage/ndb/src/kernel/vm/SimulatedBlock.cpp 2008-11-19 10:13:01 +0000
+++ b/storage/ndb/src/kernel/vm/SimulatedBlock.cpp 2009-04-20 02:49:52 +0000
@@ -2269,6 +2269,7 @@ SimulatedBlock::xfrm_attr(Uint32 attrDes
break;
#ifndef VM_TRACE
default:
+ abort();
#endif
case NDB_ARRAYTYPE_FIXED:
len = srcBytes;
=== modified file 'storage/ndb/src/ndbapi/ndberror.c'
--- a/storage/ndb/src/ndbapi/ndberror.c 2009-04-14 08:55:17 +0000
+++ b/storage/ndb/src/ndbapi/ndberror.c 2009-04-20 02:49:52 +0000
@@ -261,7 +261,6 @@ ErrorBundle ErrorCodes[] = {
{ 706, DMEC, IE, "Inconsistency during table creation" },
{ 809, DMEC, IE, "809" },
{ 812, DMEC, IE, "812" },
- { 829, DMEC, IE, "829" },
{ 833, DMEC, IE, "833" },
{ 871, DMEC, IE, "871" },
{ 882, DMEC, IE, "882" },
@@ -297,6 +296,7 @@ ErrorBundle ErrorCodes[] = {
{ 299, DMEC, AE, "Operation not allowed or aborted due to single user mode" },
{ 763, DMEC, AE, "Alter table requires cluster nodes to have exact same version" },
{ 823, DMEC, AE, "Too much attrinfo from application in tuple manager" },
+ { 829, DMEC, AE, "Corrupt data received for insert/update" },
{ 831, DMEC, AE, "Too many nullable/bitfields in table definition" },
{ 876, DMEC, AE, "876" },
{ 877, DMEC, AE, "877" },
Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20090420024952-qr4l3fe4nol4y3sk.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-6.3 branch (jonas:2943) | Jonas Oreland | 20 Apr |