Commit 37025cb3 authored by tomas@poseidon.ndb.mysql.com's avatar tomas@poseidon.ndb.mysql.com

Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-ndb

into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-ndb-local
parents 89fdc496 2d455470
......@@ -414,3 +414,134 @@ select * from t1 where b IS NOT NULL;
a b
1
drop table t1;
create table t1 (
c1 int,
c2 int,
c3 int,
c4 int,
c5 int,
c6 int,
c7 int,
c8 int,
c9 int,
c10 int,
c11 int,
c12 int,
c13 int,
c14 int,
c15 int,
c16 int,
c17 int,
c18 int,
c19 int,
c20 int,
c21 int,
c22 int,
c23 int,
c24 int,
c25 int,
c26 int,
c27 int,
c28 int,
c29 int,
c30 int,
c31 int,
c32 int,
c33 int,
c34 int,
c35 int,
c36 int,
c37 int,
c38 int,
c39 int,
c40 int,
c41 int,
c42 int,
c43 int,
c44 int,
c45 int,
c46 int,
c47 int,
c48 int,
c49 int,
c50 int,
c51 int,
c52 int,
c53 int,
c54 int,
c55 int,
c56 int,
c57 int,
c58 int,
c59 int,
c60 int,
c61 int,
c62 int,
c63 int,
c64 int,
c65 int,
c66 int,
c67 int,
c68 int,
c69 int,
c70 int,
c71 int,
c72 int,
c73 int,
c74 int,
c75 int,
c76 int,
c77 int,
c78 int,
c79 int,
c80 int,
c81 int,
c82 int,
c83 int,
c84 int,
c85 int,
c86 int,
c87 int,
c88 int,
c89 int,
c90 int,
c91 int,
c92 int,
c93 int,
c94 int,
c95 int,
c96 int,
c97 int,
c98 int,
c99 int,
c100 int,
c101 int,
c102 int,
c103 int,
c104 int,
c105 int,
c106 int,
c107 int,
c108 int,
c109 int,
c110 int,
c111 int,
c112 int,
c113 int,
c114 int,
c115 int,
c116 int,
c117 int,
c118 int,
c119 int,
c120 int,
c121 int,
c122 int,
c123 int,
c124 int,
c125 int,
c126 int,
c127 int,
c128 int,
primary key(c1)) engine=ndb;
drop table t1;
......@@ -371,3 +371,139 @@ select * from t1 order by b;
select * from t1 where b IS NULL;
select * from t1 where b IS NOT NULL;
drop table t1;
#
# test the limit of no of attributes in one table
#
create table t1 (
c1 int,
c2 int,
c3 int,
c4 int,
c5 int,
c6 int,
c7 int,
c8 int,
c9 int,
c10 int,
c11 int,
c12 int,
c13 int,
c14 int,
c15 int,
c16 int,
c17 int,
c18 int,
c19 int,
c20 int,
c21 int,
c22 int,
c23 int,
c24 int,
c25 int,
c26 int,
c27 int,
c28 int,
c29 int,
c30 int,
c31 int,
c32 int,
c33 int,
c34 int,
c35 int,
c36 int,
c37 int,
c38 int,
c39 int,
c40 int,
c41 int,
c42 int,
c43 int,
c44 int,
c45 int,
c46 int,
c47 int,
c48 int,
c49 int,
c50 int,
c51 int,
c52 int,
c53 int,
c54 int,
c55 int,
c56 int,
c57 int,
c58 int,
c59 int,
c60 int,
c61 int,
c62 int,
c63 int,
c64 int,
c65 int,
c66 int,
c67 int,
c68 int,
c69 int,
c70 int,
c71 int,
c72 int,
c73 int,
c74 int,
c75 int,
c76 int,
c77 int,
c78 int,
c79 int,
c80 int,
c81 int,
c82 int,
c83 int,
c84 int,
c85 int,
c86 int,
c87 int,
c88 int,
c89 int,
c90 int,
c91 int,
c92 int,
c93 int,
c94 int,
c95 int,
c96 int,
c97 int,
c98 int,
c99 int,
c100 int,
c101 int,
c102 int,
c103 int,
c104 int,
c105 int,
c106 int,
c107 int,
c108 int,
c109 int,
c110 int,
c111 int,
c112 int,
c113 int,
c114 int,
c115 int,
c116 int,
c117 int,
c118 int,
c119 int,
c120 int,
c121 int,
c122 int,
c123 int,
c124 int,
c125 int,
c126 int,
c127 int,
c128 int,
primary key(c1)) engine=ndb;
drop table t1;
......@@ -117,4 +117,9 @@
*/
#define NDB_BLOB_HEAD_SIZE 2 /* sizeof(NdbBlob::Head) >> 2 */
/*
* Long signals
*/
#define NDB_SECTION_SEGMENT_SZ 60
#endif
......@@ -22,9 +22,9 @@
#define NDB_MAX_DATABASE_NAME_SIZE 128
#define NDB_MAX_SCHEMA_NAME_SIZE 128
#define NDB_MAX_TAB_NAME_SIZE 128
#define NDB_MAX_ATTRIBUTES_IN_TABLE 91
#define NDB_MAX_ATTRIBUTES_IN_TABLE 128
#define NDB_MAX_TUPLE_SIZE_IN_WORDS 1023
#define NDB_MAX_TUPLE_SIZE_IN_WORDS 2013
#define NDB_MAX_KEYSIZE_IN_WORDS 1023
#define NDB_MAX_KEY_SIZE NDB_MAX_KEYSIZE_IN_WORDS*sizeof(Uint32)
#define NDB_MAX_TUPLE_SIZE NDB_MAX_TUPLE_SIZE_IN_WORDS*sizeof(uint32)
......
......@@ -25,7 +25,7 @@
*/
struct SectionSegment {
STATIC_CONST( DataLength = 60 );
STATIC_CONST( DataLength = NDB_SECTION_SEGMENT_SZ );
Uint32 m_ownerRef;
Uint32 m_sz;
......
......@@ -34,6 +34,7 @@
#include <NdbConfig.h>
#include <ndb_version.h>
#include <SignalLoggerManager.hpp>
#include <kernel/ndb_limits.h>
//#define REPORT_TRANSPORTER
//#define API_TRACE;
......@@ -834,10 +835,14 @@ TransporterFacade::sendSignalUnCond(NdbApiSignal * aSignal, NodeId aNode){
return (ss == SEND_OK ? 0 : -1);
}
#define CHUNK_SZ 100u
#define CHUNK_SZ NDB_SECTION_SEGMENT_SZ*1
int
TransporterFacade::sendFragmentedSignal(NdbApiSignal* aSignal, NodeId aNode,
LinearSectionPtr ptr[3], Uint32 secs){
LinearSectionPtr ptr[3], Uint32 secs)
{
if(getIsNodeSendable(aNode) != true)
return -1;
NdbApiSignal tmp_signal(*(SignalHeader*)aSignal);
LinearSectionPtr tmp_ptr[3];
Uint32 unique_id= m_fragmented_signal_id++; // next unique id
......@@ -855,41 +860,47 @@ TransporterFacade::sendFragmentedSignal(NdbApiSignal* aSignal, NodeId aNode,
if (chunk_sz + save_sz > CHUNK_SZ) {
// truncate
unsigned send_sz= CHUNK_SZ - chunk_sz;
if (i != start_i) // first piece of a new section has to be a multiple of NDB_SECTION_SEGMENT_SZ
{
send_sz=
NDB_SECTION_SEGMENT_SZ
*(send_sz+NDB_SECTION_SEGMENT_SZ-1)
/NDB_SECTION_SEGMENT_SZ;
if (send_sz > save_sz)
send_sz= save_sz;
}
tmp_ptr[i].sz= send_sz;
if (fragment_info < 2)
if (fragment_info < 2) // 1 = first fragment, 2 = middle fragments
fragment_info++;
// send tmp_signal
tmp_data[i-start_i+1]= unique_id;
tmp_signal.setLength(i-start_i+2);
tmp_signal.m_fragmentInfo= fragment_info;
tmp_signal.m_noOfSections= i-start_i+1;
// do prepare send
{
int ret;
if(getIsNodeSendable(aNode) == true){
SendStatus ss = theTransporterRegistry->prepareSend
(&tmp_signal,
1, // JBB
tmp_signal.getDataPtrSend(),
aNode,
&ptr[start_i]);
assert(ss != SEND_MESSAGE_TOO_BIG);
ret = (ss == SEND_OK ? 0 : -1);
} else
ret = -1;
if (ret != SEND_OK)
return ret;
SendStatus ss = theTransporterRegistry->prepareSend
(&tmp_signal,
1, /*JBB*/
tmp_data,
aNode,
&tmp_ptr[start_i]);
assert(ss != SEND_MESSAGE_TOO_BIG);
if (ss != SEND_OK) return -1;
}
// setup variables for next signal
start_i= i;
chunk_sz= 0;
tmp_ptr[i].sz= save_sz-send_sz;
tmp_ptr[i].p+= send_sz;
if (tmp_ptr[i].sz == 0)
i++;
}
else
{
chunk_sz+= save_sz;
chunk_sz+=save_sz;
i++;
}
}
......@@ -907,7 +918,7 @@ TransporterFacade::sendFragmentedSignal(NdbApiSignal* aSignal, NodeId aNode,
aSignal->setLength(a_sz+tmp_sz+1);
// send last fragment
aSignal->m_fragmentInfo= 3;
aSignal->m_fragmentInfo= 3; // 3 = last fragment
aSignal->m_noOfSections= i-start_i;
} else {
aSignal->m_noOfSections= secs;
......@@ -915,17 +926,16 @@ TransporterFacade::sendFragmentedSignal(NdbApiSignal* aSignal, NodeId aNode,
// send aSignal
int ret;
if(getIsNodeSendable(aNode) == true){
{
SendStatus ss = theTransporterRegistry->prepareSend
(aSignal,
1, // JBB
(aSignal,
1/*JBB*/,
aSignal->getDataPtrSend(),
aNode,
&ptr[start_i]);
aNode,
&tmp_ptr[start_i]);
assert(ss != SEND_MESSAGE_TOO_BIG);
ret = (ss == SEND_OK ? 0 : -1);
} else
ret = -1;
}
aSignal->m_noOfSections = 0;
aSignal->m_fragmentInfo = 0;
aSignal->setLength(a_sz);
......
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