Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2419 07/02/05 12:19:24 tomas@stripped +22 -0
Merge tulin@stripped:/home/bk/mysql-5.1
into poseidon.mysql.com:/home/tomas/mysql-5.1-new-ndb
storage/ndb/src/ndbapi/NdbIndexOperation.cpp
1.31 07/02/05 12:19:17 tomas@stripped +0 -0
manual merge
sql/ha_ndbcluster.cc
1.400 07/02/05 12:19:17 tomas@stripped +2 -4
manual merge
storage/ndb/src/ndbapi/NdbScanOperation.cpp
1.107 07/02/05 12:14:09 tomas@stripped +0 -0
Auto merged
storage/ndb/src/ndbapi/NdbOperationExec.cpp
1.26 07/02/05 12:14:09 tomas@stripped +0 -0
Auto merged
storage/ndb/src/ndbapi/NdbOperationDefine.cpp
1.28 07/02/05 12:14:09 tomas@stripped +0 -0
Auto merged
storage/ndb/src/ndbapi/NdbIndexStat.cpp
1.8 07/02/05 12:14:09 tomas@stripped +0 -0
Auto merged
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
1.80 07/02/05 12:14:09 tomas@stripped +0 -0
Auto merged
storage/ndb/src/ndbapi/NdbBlob.cpp
1.52 07/02/05 12:14:09 tomas@stripped +0 -0
Auto merged
storage/ndb/src/ndbapi/Ndb.cpp
1.85 07/02/05 12:14:09 tomas@stripped +0 -0
Auto merged
storage/ndb/src/mgmsrv/main.cpp
1.54 07/02/05 12:14:08 tomas@stripped +0 -0
Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp
1.98 07/02/05 12:14:08 tomas@stripped +0 -0
Auto merged
storage/ndb/src/mgmclient/CommandInterpreter.cpp
1.82 07/02/05 12:14:08 tomas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/suma/Suma.cpp
1.56 07/02/05 12:14:08 tomas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
1.50 07/02/05 12:14:08 tomas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
1.57 07/02/05 12:14:08 tomas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
1.132 07/02/05 12:14:08 tomas@stripped +0 -0
Auto merged
storage/ndb/src/common/debugger/EventLogger.cpp
1.34 07/02/05 12:14:07 tomas@stripped +0 -0
Auto merged
sql/slave.cc
1.305 07/02/05 12:14:07 tomas@stripped +0 -0
Auto merged
sql/log_event.cc
1.266 07/02/05 12:14:07 tomas@stripped +0 -0
Auto merged
sql/ha_ndbcluster_binlog.cc
1.97 07/02/05 12:14:07 tomas@stripped +0 -0
Auto merged
mysql-test/t/ndb_read_multi_range.test
1.13 07/02/05 12:14:06 tomas@stripped +0 -0
Auto merged
mysql-test/r/ndb_read_multi_range.result
1.11 07/02/05 12:14:06 tomas@stripped +0 -0
Auto merged
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: tomas
# Host: poseidon.mysql.com
# Root: /home/tomas/mysql-5.1-new-ndb/RESYNC
--- 1.265/sql/log_event.cc 2007-01-29 06:47:30 +07:00
+++ 1.266/sql/log_event.cc 2007-02-05 12:14:07 +07:00
@@ -5702,9 +5702,26 @@
{
if (!need_reopen)
{
- slave_print_msg(ERROR_LEVEL, rli, error,
- "Error in %s event: when locking tables",
- get_type_str());
+ if (thd->query_error || thd->is_fatal_error)
+ {
+ /*
+ Error reporting borrowed from Query_log_event with many excessive
+ simplifications (we don't honour --slave-skip-errors)
+ */
+ uint actual_error= thd->net.last_errno;
+ slave_print_msg(ERROR_LEVEL, rli, actual_error,
+ "Error '%s' in %s event: when locking tables",
+ (actual_error ? thd->net.last_error :
+ "unexpected success or fatal error"),
+ get_type_str());
+ thd->is_fatal_error= 1;
+ }
+ else
+ {
+ slave_print_msg(ERROR_LEVEL, rli, error,
+ "Error in %s event: when locking tables",
+ get_type_str());
+ }
rli->clear_tables_to_lock();
DBUG_RETURN(error);
}
--- 1.304/sql/slave.cc 2007-01-29 06:47:31 +07:00
+++ 1.305/sql/slave.cc 2007-02-05 12:14:07 +07:00
@@ -1296,7 +1296,7 @@
rpl_filter->get_wild_ignore_table(&tmp);
protocol->store(&tmp);
- protocol->store((uint32) mi->rli.last_slave_errno);
+ protocol->store(mi->rli.last_slave_errno);
protocol->store(mi->rli.last_slave_error, &my_charset_bin);
protocol->store((uint32) mi->rli.slave_skip_counter);
protocol->store((ulonglong) mi->rli.group_master_log_pos);
--- 1.33/storage/ndb/src/common/debugger/EventLogger.cpp 2007-02-02 00:34:07 +07:00
+++ 1.34/storage/ndb/src/common/debugger/EventLogger.cpp 2007-02-05 12:14:07 +07:00
@@ -1040,6 +1040,7 @@
removeAllHandlers();
}
+#ifdef NOT_USED
static NdbOut&
operator<<(NdbOut& out, const LogLevel & ll)
{
@@ -1049,6 +1050,7 @@
out << "]";
return out;
}
+#endif
int
EventLoggerBase::event_lookup(int eventType,
--- 1.97/storage/ndb/src/mgmsrv/ConfigInfo.cpp 2007-01-25 00:57:03 +07:00
+++ 1.98/storage/ndb/src/mgmsrv/ConfigInfo.cpp 2007-02-05 12:14:08 +07:00
@@ -3613,6 +3613,7 @@
Uint32 db_nodes= 0;
Uint32 replicas= 0;
Uint32 db_host_count= 0;
+ bool with_arbitration_rank= false;
ctx.m_userProperties.get(DB_TOKEN, &db_nodes);
ctx.m_userProperties.get("NoOfReplicas", &replicas);
if((db_nodes % replicas) != 0){
@@ -3648,83 +3649,90 @@
tmp->get("HostName", &host);
if (strcmp(type,DB_TOKEN) == 0)
- {
- {
- Uint32 ii;
- if (!p_db_hosts.get(host,&ii))
- db_host_count++;
- p_db_hosts.put(host,i);
- if (p_arbitrators.get(host,&ii))
- {
- arbitration_warning.appfmt(arbit_warn_fmt, ii, i, host);
- p_arbitrators.remove(host); // only one warning per db node
- }
- }
- {
- unsigned j;
- BaseString str, str2;
- str.assfmt("#group%d_",group);
- p_db_hosts.put(str.c_str(),i_group,host);
- str2.assfmt("##group%d_",group);
- p_db_hosts.put(str2.c_str(),i_group,i);
- for (j= 0; j < i_group; j++)
- {
- const char *other_host;
- p_db_hosts.get(str.c_str(),j,&other_host);
- if (strcmp(host,other_host) == 0) {
- unsigned int other_i, c= 0;
- p_db_hosts.get(str2.c_str(),j,&other_i);
- p_db_hosts.get(str.c_str(),&c);
- if (c == 0) // first warning in this node group
- node_group_warning.appfmt(" Node group %d", group);
- c|= 1 << j;
- p_db_hosts.put(str.c_str(),c);
-
- node_group_warning.appfmt(",\n db node with id %d and id %d "
- "on same host %s", other_i, i, host);
- }
- }
- i_group++;
- DBUG_ASSERT(i_group <= replicas);
- if (i_group == replicas)
- {
- unsigned c= 0;
- p_db_hosts.get(str.c_str(),&c);
- if (c+1 == (1u << (replicas-1))) // all nodes on same machine
- node_group_warning.append(".\n Host failure will "
- "cause complete cluster shutdown.");
- else if (c > 0)
- node_group_warning.append(".\n Host failure may "
- "cause complete cluster shutdown.");
- group++;
- i_group= 0;
- }
- }
+ {
+ {
+ Uint32 ii;
+ if (!p_db_hosts.get(host,&ii))
+ db_host_count++;
+ p_db_hosts.put(host,i);
+ if (p_arbitrators.get(host,&ii))
+ {
+ arbitration_warning.appfmt(arbit_warn_fmt, ii, i, host);
+ p_arbitrators.remove(host); // only one warning per db node
+ }
+ }
+ {
+ unsigned j;
+ BaseString str, str2;
+ str.assfmt("#group%d_",group);
+ p_db_hosts.put(str.c_str(),i_group,host);
+ str2.assfmt("##group%d_",group);
+ p_db_hosts.put(str2.c_str(),i_group,i);
+ for (j= 0; j < i_group; j++)
+ {
+ const char *other_host;
+ p_db_hosts.get(str.c_str(),j,&other_host);
+ if (strcmp(host,other_host) == 0) {
+ unsigned int other_i, c= 0;
+ p_db_hosts.get(str2.c_str(),j,&other_i);
+ p_db_hosts.get(str.c_str(),&c);
+ if (c == 0) // first warning in this node group
+ node_group_warning.appfmt(" Node group %d", group);
+ c|= 1 << j;
+ p_db_hosts.put(str.c_str(),c);
+ node_group_warning.appfmt(",\n db node with id %d and id %d "
+ "on same host %s", other_i, i, host);
+ }
+ }
+ i_group++;
+ DBUG_ASSERT(i_group <= replicas);
+ if (i_group == replicas)
+ {
+ unsigned c= 0;
+ p_db_hosts.get(str.c_str(),&c);
+ if (c+1 == (1u << (replicas-1))) // all nodes on same machine
+ node_group_warning.append(".\n Host failure will "
+ "cause complete cluster shutdown.");
+ else if (c > 0)
+ node_group_warning.append(".\n Host failure may "
+ "cause complete cluster shutdown.");
+ group++;
+ i_group= 0;
+ }
+ }
}
else if (strcmp(type,API_TOKEN) == 0 ||
strcmp(type,MGM_TOKEN) == 0)
- {
- Uint32 rank;
- if(tmp->get("ArbitrationRank", &rank) && rank > 0)
- {
- if(host && host[0] != 0)
- {
- Uint32 ii;
- p_arbitrators.put(host,i);
- if (p_db_hosts.get(host,&ii))
- {
- arbitration_warning.appfmt(arbit_warn_fmt, i, ii, host);
- }
- }
- else
- {
- arbitration_warning.appfmt(arbit_warn_fmt2, i);
- }
- }
+ {
+ Uint32 rank;
+ if(tmp->get("ArbitrationRank", &rank) && rank > 0)
+ {
+ with_arbitration_rank = true; //check whether MGM or API node configured with
rank >0
+ if(host && host[0] != 0)
+ {
+ Uint32 ii;
+ p_arbitrators.put(host,i);
+ if (p_db_hosts.get(host,&ii))
+ {
+ arbitration_warning.appfmt(arbit_warn_fmt, i, ii, host);
+ }
+ }
+ else
+ {
+ arbitration_warning.appfmt(arbit_warn_fmt2, i);
+ }
+ }
}
}
if (db_host_count > 1 && node_group_warning.length() > 0)
ndbout_c("Cluster configuration warning:\n%s",node_group_warning.c_str());
+ if (!with_arbitration_rank)
+ {
+ ndbout_c("Cluster configuration warning:"
+ "\n Neither %s nor %s nodes are configured with arbitrator,"
+ "\n may cause complete cluster shutdown in case of host failure.",
+ MGM_TOKEN, API_TOKEN);
+ }
if (db_host_count > 1 && arbitration_warning.length() > 0)
ndbout_c("Cluster configuration warning:%s%s",arbitration_warning.c_str(),
"\n Running arbitrator on the same host as a database node may"
--- 1.131/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2007-01-27 08:46:41 +07:00
+++ 1.132/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2007-02-05 12:14:08 +07:00
@@ -582,6 +582,26 @@
{
jamEntry();
m_backup_ptr = RNIL;
+ DefineBackupRef* ref = (DefineBackupRef*)signal->getDataPtrSend();
+ int err_code = 0;
+ char * extra_msg = NULL;
+
+ switch(ref->errorCode){
+ case DefineBackupRef::Undefined:
+ case DefineBackupRef::FailedToSetupFsBuffers:
+ case DefineBackupRef::FailedToAllocateBuffers:
+ case DefineBackupRef::FailedToAllocateTables:
+ case DefineBackupRef::FailedAllocateTableMem:
+ case DefineBackupRef::FailedToAllocateFileRecord:
+ case DefineBackupRef::FailedToAllocateAttributeRecord:
+ case DefineBackupRef::FailedInsertFileHeader:
+ case DefineBackupRef::FailedInsertTableList:
+ jam();
+ err_code = NDBD_EXIT_INVALID_CONFIG;
+ extra_msg = "Probably Backup parameters configuration error, Please consult the
manual";
+ progError(__LINE__, err_code, extra_msg);
+ }
+
sendsttorryLab(signal);
}
@@ -2479,8 +2499,16 @@
CommitAckMarkerPtr removedPtr;
m_commitAckMarkerHash.remove(removedPtr, key);
+#if defined VM_TRACE || defined ERROR_INSERT
ndbrequire(removedPtr.i != RNIL);
m_commitAckMarkerPool.release(removedPtr);
+#else
+ if (removedPtr.i != RNIL)
+ {
+ jam();
+ m_commitAckMarkerPool.release(removedPtr);
+ }
+#endif
#ifdef MARKER_TRACE
ndbout_c("Rem marker[%.8x %.8x]", key.transid1, key.transid2);
#endif
@@ -3138,20 +3166,23 @@
{
TcConnectionrec * const regTcPtr = tcConnectptr.p;
if (regTcPtr->operation != ZREAD) {
- if (regTcPtr->opExec != 1) {
- if (saveTupattrbuf(signal, dataPtr, length) == ZOK) {
- ;
- } else {
- jam();
+ if (regTcPtr->operation != ZDELETE)
+ {
+ if (regTcPtr->opExec != 1) {
+ if (saveTupattrbuf(signal, dataPtr, length) == ZOK) {
+ ;
+ } else {
+ jam();
/* ------------------------------------------------------------------------- */
/* WE MIGHT BE WAITING FOR RESPONSE FROM SOME BLOCK HERE. THUS WE NEED TO */
/* GO THROUGH THE STATE MACHINE FOR THE OPERATION. */
/* ------------------------------------------------------------------------- */
- localAbortStateHandlerLab(signal);
- return;
+ localAbortStateHandlerLab(signal);
+ return;
+ }//if
}//if
}//if
- }//if
+ }
c_tup->receive_attrinfo(signal, regTcPtr->tupConnectrec, dataPtr, length);
}//Dblqh::lqhAttrinfoLab()
@@ -3405,7 +3436,7 @@
markerPtr.p->tcNodeId = tcNodeId;
CommitAckMarkerPtr tmp;
-#ifdef VM_TRACE
+#if defined VM_TRACE || defined ERROR_INSERT
#ifdef MARKER_TRACE
ndbout_c("Add marker[%.8x %.8x]", markerPtr.p->transid1,
markerPtr.p->transid2);
#endif
@@ -7197,7 +7228,8 @@
TRACE_OP(regTcPtr, "ACC_ABORTCONF");
signal->theData[0] = regTcPtr->tupConnectrec;
EXECUTE_DIRECT(DBTUP, GSN_TUP_ABORTREQ, signal, 1);
-
+
+ jamEntry();
continueAbortLab(signal);
return;
}//Dblqh::execACC_ABORTCONF()
@@ -9628,7 +9660,7 @@
active.add(scanptr);
if(scanptr.p->scanKeyinfoFlag){
jam();
-#ifdef VM_TRACE
+#if defined VM_TRACE || defined ERROR_INSERT
ScanRecordPtr tmp;
ndbrequire(!c_scanTakeOverHash.find(tmp, * scanptr.p));
#endif
@@ -9752,7 +9784,7 @@
scans.add(restart);
if(restart.p->scanKeyinfoFlag){
jam();
-#ifdef VM_TRACE
+#if defined VM_TRACE || defined ERROR_INSERT
ScanRecordPtr tmp;
ndbrequire(!c_scanTakeOverHash.find(tmp, * restart.p));
#endif
--- 1.56/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp 2007-01-25 00:57:03 +07:00
+++ 1.57/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp 2007-02-05 12:14:08 +07:00
@@ -1736,7 +1736,8 @@
Operationrec* regOperPtr,
Fragrecord* regFragPtr,
Tablerec* regTabPtr,
- KeyReqStruct* req_struct);
+ KeyReqStruct* req_struct,
+ bool disk);
//------------------------------------------------------------------
//------------------------------------------------------------------
--- 1.49/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 2007-01-25 00:57:03 +07:00
+++ 1.50/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 2007-02-05 12:14:08 +07:00
@@ -3523,8 +3523,10 @@
nodePtr.p->phase = ZFAIL_CLOSING;
nodePtr.p->failState = WAITING_FOR_NDB_FAILCONF;
setNodeInfo(nodePtr.i).m_heartbeat_cnt= 0;
+ setNodeInfo(nodePtr.i).m_version = 0;
c_clusterNodes.clear(nodePtr.i);
}//for
+ recompute_version_info(NodeInfo::DB);
/*----------------------------------------------------------------------*/
/* WE INFORM THE API'S WE HAVE CONNECTED ABOUT THE FAILED NODES. */
/*----------------------------------------------------------------------*/
--- 1.55/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2007-01-29 06:47:32 +07:00
+++ 1.56/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2007-02-05 12:14:08 +07:00
@@ -4668,9 +4668,7 @@
m_out_of_buffer_gci = m_last_complete_gci - 1;
infoEvent("Out of event buffer: nodefailure will cause event failures");
- signal->theData[0] = SumaContinueB::OUT_OF_BUFFER_RELEASE;
- signal->theData[1] = 0;
- sendSignal(SUMA_REF, GSN_CONTINUEB, signal, 2, JBB);
+ out_of_buffer_release(signal, 0);
}
void
@@ -4738,7 +4736,8 @@
Uint32 count;
m_tup->allocConsPages(16, count, ref);
- ndbrequire(count > 0);
+ if (count == 0)
+ return RNIL;
ndbout_c("alloc_chunk(%d %d) - ", ref, count);
--- 1.81/storage/ndb/src/mgmclient/CommandInterpreter.cpp 2007-01-25 00:57:03 +07:00
+++ 1.82/storage/ndb/src/mgmclient/CommandInterpreter.cpp 2007-02-05 12:14:08 +07:00
@@ -2054,6 +2054,18 @@
ndbout << processId << ": Node not found" << endl;
return -1;
}
+ if (cl->node_states[i].node_type != NDB_MGM_NODE_TYPE_NDB){
+ if (cl->node_states[i].version != 0){
+ ndbout << "Node "<< cl->node_states[i].node_id <<": connected"
;
+ ndbout_c(" (Version %d.%d.%d)",
+ getMajor(version) ,
+ getMinor(version),
+ getBuild(version));
+
+ }else
+ ndbout << "Node "<< cl->node_states[i].node_id <<": not
connected" << endl;
+ return 0;
+ }
status = cl->node_states[i].node_status;
startPhase = cl->node_states[i].start_phase;
version = cl->node_states[i].version;
--- 1.53/storage/ndb/src/mgmsrv/main.cpp 2007-02-02 00:34:08 +07:00
+++ 1.54/storage/ndb/src/mgmsrv/main.cpp 2007-02-05 12:14:08 +07:00
@@ -188,7 +188,6 @@
*/
int main(int argc, char** argv)
{
- int mgm_connect_result;
NDB_INIT(argv[0]);
--- 1.84/storage/ndb/src/ndbapi/Ndb.cpp 2007-01-25 00:57:03 +07:00
+++ 1.85/storage/ndb/src/ndbapi/Ndb.cpp 2007-02-05 12:14:09 +07:00
@@ -1075,7 +1075,7 @@
tOperation->incValue("NEXTID", opValue);
tRecAttrResult = tOperation->getValue("NEXTID");
- if (tConnection->execute( Commit ) == -1 )
+ if (tConnection->execute( NdbTransaction::Commit ) == -1 )
goto error_handler;
tValue = tRecAttrResult->u_64_value();
@@ -1090,7 +1090,7 @@
tOperation->equal("SYSKEY_0", aTableId );
tOperation->setValue("NEXTID", opValue);
- if (tConnection->execute( Commit ) == -1 )
+ if (tConnection->execute( NdbTransaction::Commit ) == -1 )
goto error_handler;
range.reset();
@@ -1107,7 +1107,7 @@
tOperation->def_label(0);
tOperation->interpret_exit_nok(9999);
- if (tConnection->execute( Commit ) == -1)
+ if (tConnection->execute( NdbTransaction::Commit ) == -1)
{
if (tConnection->theError.code != 9999)
goto error_handler;
@@ -1124,7 +1124,7 @@
tOperation->readTuple();
tOperation->equal("SYSKEY_0", aTableId );
tRecAttrResult = tOperation->getValue("NEXTID");
- if (tConnection->execute( Commit ) == -1 )
+ if (tConnection->execute( NdbTransaction::Commit ) == -1 )
goto error_handler;
opValue = tRecAttrResult->u_64_value(); // out
break;
--- 1.79/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp 2007-01-29 21:13:14 +07:00
+++ 1.80/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp 2007-02-05 12:14:09 +07:00
@@ -1609,17 +1609,24 @@
Uint32 &oid_ref)
{
NdbEventOperationImpl *dropped_ev_op = m_dropped_ev_op;
+ DBUG_PRINT("info", ("gci: %u", data.gci));
do
{
do
{
- oid_ref = impl->m_oid;
- insertDataL(impl, &data, ptr);
+ if (impl->m_node_bit_mask.get(0u))
+ {
+ oid_ref = impl->m_oid;
+ insertDataL(impl, &data, ptr);
+ }
NdbEventOperationImpl* blob_op = impl->theBlobOpList;
while (blob_op != NULL)
{
- oid_ref = blob_op->m_oid;
- insertDataL(blob_op, &data, ptr);
+ if (blob_op->m_node_bit_mask.get(0u))
+ {
+ oid_ref = blob_op->m_oid;
+ insertDataL(blob_op, &data, ptr);
+ }
blob_op = blob_op->m_next;
}
} while((impl = impl->m_next));
@@ -1804,6 +1811,7 @@
switch (operation)
{
case NdbDictionary::Event::_TE_NODE_FAILURE:
+ DBUG_ASSERT(op->m_node_bit_mask.get(0u) != 0);
op->m_node_bit_mask.clear(SubTableData::getNdbdNodeId(ri));
DBUG_PRINT("info",
("_TE_NODE_FAILURE: m_ref_count: %u for op: %p id: %u",
@@ -1819,29 +1827,23 @@
DBUG_RETURN_EVENT(0);
break;
case NdbDictionary::Event::_TE_CLUSTER_FAILURE:
- if (op->m_node_bit_mask.get(0))
- {
- op->m_node_bit_mask.clear();
- DBUG_ASSERT(op->m_ref_count > 0);
- // remove kernel reference
- // added in execute_nolock
- op->m_ref_count--;
- DBUG_PRINT("info", ("_TE_CLUSTER_FAILURE: m_ref_count: %u for op: %p",
- op->m_ref_count, op));
- if (op->theMainOp)
- {
- DBUG_ASSERT(op->m_ref_count == 0);
- DBUG_ASSERT(op->theMainOp->m_ref_count > 0);
- // remove blob reference in main op
- // added in execute_no_lock
- op->theMainOp->m_ref_count--;
- DBUG_PRINT("info", ("m_ref_count: %u for op: %p",
- op->theMainOp->m_ref_count, op->theMainOp));
- }
- }
- else
- {
- DBUG_ASSERT(op->m_node_bit_mask.isclear() != 0);
+ DBUG_ASSERT(op->m_node_bit_mask.get(0u) != 0);
+ op->m_node_bit_mask.clear();
+ DBUG_ASSERT(op->m_ref_count > 0);
+ // remove kernel reference
+ // added in execute_nolock
+ op->m_ref_count--;
+ DBUG_PRINT("info", ("_TE_CLUSTER_FAILURE: m_ref_count: %u for op: %p",
+ op->m_ref_count, op));
+ if (op->theMainOp)
+ {
+ DBUG_ASSERT(op->m_ref_count == 0);
+ DBUG_ASSERT(op->theMainOp->m_ref_count > 0);
+ // remove blob reference in main op
+ // added in execute_no_lock
+ op->theMainOp->m_ref_count--;
+ DBUG_PRINT("info", ("m_ref_count: %u for op: %p",
+ op->theMainOp->m_ref_count, op->theMainOp));
}
break;
case NdbDictionary::Event::_TE_STOP:
--- 1.30/storage/ndb/src/ndbapi/NdbIndexOperation.cpp 2007-01-25 00:57:03 +07:00
+++ 1.31/storage/ndb/src/ndbapi/NdbIndexOperation.cpp 2007-02-05 12:19:17 +07:00
@@ -172,237 +172,6 @@
return m_theIndex;
}
-int
-NdbIndexOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransactionId)
-{
- Uint32 tTransId1, tTransId2;
- Uint32 tReqInfo;
- Uint32 tSignalCount = 0;
- Uint32 tInterpretInd = theInterpretIndicator;
-
- theErrorLine = 0;
-
- if (tInterpretInd != 1) {
- OperationType tOpType = theOperationType;
- OperationStatus tStatus = theStatus;
- if ((tOpType == UpdateRequest) ||
- (tOpType == InsertRequest) ||
- (tOpType == WriteRequest)) {
- if (tStatus != SetValue) {
- setErrorCodeAbort(4506);
- return -1;
- }//if
- } else if ((tOpType == ReadRequest) || (tOpType == ReadExclusive) ||
- (tOpType == DeleteRequest)) {
- if (tStatus != GetValue) {
- setErrorCodeAbort(4506);
- return -1;
- }//if
- } else {
- setErrorCodeAbort(4507);
- return -1;
- }//if
- } else {
- if (prepareSendInterpreted() == -1) {
- return -1;
- }//if
- }//if
-
-//-------------------------------------------------------------
-// We start by filling in the first 8 unconditional words of the
-// TCINDXREQ signal.
-//-------------------------------------------------------------
- TcKeyReq * tcKeyReq =
- CAST_PTR(TcKeyReq, theTCREQ->getDataPtrSend());
-
- Uint32 tTotalCurrAI_Len = theTotalCurrAI_Len;
- Uint32 tIndexId = m_theIndex->m_id;
- Uint32 tSchemaVersion = m_theIndex->m_version;
-
- tcKeyReq->apiConnectPtr = aTC_ConnectPtr;
- tcKeyReq->senderData = ptr2int();
- tcKeyReq->attrLen = tTotalCurrAI_Len;
- tcKeyReq->tableId = tIndexId;
- tcKeyReq->tableSchemaVersion = tSchemaVersion;
-
- tTransId1 = (Uint32) aTransactionId;
- tTransId2 = (Uint32) (aTransactionId >> 32);
-
-//-------------------------------------------------------------
-// Simple is simple if simple or both start and commit is set.
-//-------------------------------------------------------------
-// Temporarily disable simple stuff
- Uint8 tSimpleIndicator = 0;
-// Uint8 tSimpleIndicator = theSimpleIndicator;
- Uint8 tCommitIndicator = theCommitIndicator;
- Uint8 tStartIndicator = theStartIndicator;
-// if ((theNdbCon->theLastOpInList == this) && (theCommitIndicator == 0))
-// abort();
-// Temporarily disable simple stuff
- Uint8 tSimpleAlt = 0;
-// Uint8 tSimpleAlt = tStartIndicator & tCommitIndicator;
- tSimpleIndicator = tSimpleIndicator | tSimpleAlt;
-
-//-------------------------------------------------------------
-// Simple state is set if start and commit is set and it is
-// a read request. Otherwise it is set to zero.
-//-------------------------------------------------------------
- //theNdbCon->theSimpleState = tSimpleState;
-
- tcKeyReq->transId1 = tTransId1;
- tcKeyReq->transId2 = tTransId2;
-
- tReqInfo = 0;
-
- if (tTotalCurrAI_Len <= TcKeyReq::MaxAttrInfo) {
- tcKeyReq->setAIInTcKeyReq(tReqInfo, tTotalCurrAI_Len);
- } else {
- tcKeyReq->setAIInTcKeyReq(tReqInfo, TcKeyReq::MaxAttrInfo);
- }//if
-
- tcKeyReq->setSimpleFlag(tReqInfo, tSimpleIndicator);
- tcKeyReq->setCommitFlag(tReqInfo, tCommitIndicator);
- tcKeyReq->setStartFlag(tReqInfo, tStartIndicator);
- const Uint8 tInterpretIndicator = theInterpretIndicator;
- tcKeyReq->setInterpretedFlag(tReqInfo, tInterpretIndicator);
-
- Uint8 tDirtyIndicator = theDirtyIndicator;
- OperationType tOperationType = theOperationType;
- Uint32 tIndexLen = theTupKeyLen;
- Uint8 abortOption = theNdbCon->m_abortOption;
-
- tcKeyReq->setDirtyFlag(tReqInfo, tDirtyIndicator);
- tcKeyReq->setOperationType(tReqInfo, tOperationType);
- tcKeyReq->setKeyLength(tReqInfo, tIndexLen);
- tcKeyReq->setAbortOption(tReqInfo, abortOption);
-
- Uint8 tDistrKeyIndicator = theDistrKeyIndicator_;
- Uint8 tScanIndicator = theScanInfo & 1;
-
- tcKeyReq->setDistributionKeyFlag(tReqInfo, tDistrKeyIndicator);
- tcKeyReq->setScanIndFlag(tReqInfo, tScanIndicator);
-
- tcKeyReq->requestInfo = tReqInfo;
-
-//-------------------------------------------------------------
-// The next step is to fill in the upto three conditional words.
-//-------------------------------------------------------------
- Uint32* tOptionalDataPtr = &tcKeyReq->scanInfo;
- Uint32 tDistrGHIndex = tScanIndicator;
- Uint32 tDistrKeyIndex = tDistrGHIndex;
-
- Uint32 tScanInfo = theScanInfo;
- Uint32 tDistrKey = theDistributionKey;
-
- tOptionalDataPtr[0] = tScanInfo;
- tOptionalDataPtr[tDistrKeyIndex] = tDistrKey;
-
-//-------------------------------------------------------------
-// The next is step is to compress the key data part of the
-// TCKEYREQ signal.
-//-------------------------------------------------------------
- Uint32 tKeyIndex = tDistrKeyIndex + tDistrKeyIndicator;
- Uint32* tKeyDataPtr = &tOptionalDataPtr[tKeyIndex];
- Uint32 Tdata1 = tcKeyReq->keyInfo[0];
- Uint32 Tdata2 = tcKeyReq->keyInfo[1];
- Uint32 Tdata3 = tcKeyReq->keyInfo[2];
- Uint32 Tdata4 = tcKeyReq->keyInfo[3];
- Uint32 Tdata5;
-
- tKeyDataPtr[0] = Tdata1;
- tKeyDataPtr[1] = Tdata2;
- tKeyDataPtr[2] = Tdata3;
- tKeyDataPtr[3] = Tdata4;
- if (tIndexLen > 4) {
- Tdata1 = tcKeyReq->keyInfo[4];
- Tdata2 = tcKeyReq->keyInfo[5];
- Tdata3 = tcKeyReq->keyInfo[6];
- Tdata4 = tcKeyReq->keyInfo[7];
-
- tKeyDataPtr[4] = Tdata1;
- tKeyDataPtr[5] = Tdata2;
- tKeyDataPtr[6] = Tdata3;
- tKeyDataPtr[7] = Tdata4;
- }//if
-//-------------------------------------------------------------
-// Finally we also compress the INDXATTRINFO part of the signal.
-// We optimise by using the if-statement for sending INDXKEYINFO
-// signals to calculating the new Attrinfo Index.
-//-------------------------------------------------------------
- Uint32 tAttrInfoIndex;
-
- if (tIndexLen > TcKeyReq::MaxKeyInfo) {
- /**
- * Set transid and TC connect ptr in the INDXKEYINFO signals
- */
- NdbApiSignal* tSignal = theTCREQ->next();
- Uint32 remainingKey = tIndexLen - TcKeyReq::MaxKeyInfo;
-
- do {
- Uint32* tSigDataPtr = tSignal->getDataPtrSend();
- NdbApiSignal* tnextSignal = tSignal->next();
- tSignalCount++;
- tSigDataPtr[0] = aTC_ConnectPtr;
- tSigDataPtr[1] = tTransId1;
- tSigDataPtr[2] = tTransId2;
- if (remainingKey > IndxKeyInfo::DataLength) {
- // The signal is full
- tSignal->setLength(IndxKeyInfo::MaxSignalLength);
- remainingKey -= IndxKeyInfo::DataLength;
- }
- else {
- // Last signal
- tSignal->setLength(IndxKeyInfo::HeaderLength + remainingKey);
- remainingKey = 0;
- }
- tSignal = tnextSignal;
- } while (tSignal != NULL);
- tAttrInfoIndex = tKeyIndex + TcKeyReq::MaxKeyInfo;
- } else {
- tAttrInfoIndex = tKeyIndex + tIndexLen;
- }//if
-
-//-------------------------------------------------------------
-// Perform the Attrinfo packing in the TCKEYREQ signal started
-// above.
-//-------------------------------------------------------------
- Uint32* tAIDataPtr = &tOptionalDataPtr[tAttrInfoIndex];
- Tdata1 = tcKeyReq->attrInfo[0];
- Tdata2 = tcKeyReq->attrInfo[1];
- Tdata3 = tcKeyReq->attrInfo[2];
- Tdata4 = tcKeyReq->attrInfo[3];
- Tdata5 = tcKeyReq->attrInfo[4];
-
- theTCREQ->setLength(tcKeyReq->getAIInTcKeyReq(tReqInfo) +
- tAttrInfoIndex + TcKeyReq::StaticLength);
- tAIDataPtr[0] = Tdata1;
- tAIDataPtr[1] = Tdata2;
- tAIDataPtr[2] = Tdata3;
- tAIDataPtr[3] = Tdata4;
- tAIDataPtr[4] = Tdata5;
-
-/***************************************************
-* Send the INDXATTRINFO signals.
-***************************************************/
- if (tTotalCurrAI_Len > 5) {
- // Set the last signal's length.
- NdbApiSignal* tSignal = theFirstATTRINFO;
- theCurrentATTRINFO->setLength(theAI_LenInCurrAI);
- do {
- Uint32* tSigDataPtr = tSignal->getDataPtrSend();
- NdbApiSignal* tnextSignal = tSignal->next();
- tSignalCount++;
- tSigDataPtr[0] = aTC_ConnectPtr;
- tSigDataPtr[1] = tTransId1;
- tSigDataPtr[2] = tTransId2;
- tSignal = tnextSignal;
- } while (tSignal != NULL);
- }//if
- theStatus = WaitResponse;
- theReceiver.prepareSend();
- return 0;
-}
-
/***************************************************************************
int receiveTCINDXREF( NdbApiSignal* aSignal)
--- 1.27/storage/ndb/src/ndbapi/NdbOperationDefine.cpp 2007-01-29 06:47:32 +07:00
+++ 1.28/storage/ndb/src/ndbapi/NdbOperationDefine.cpp 2007-02-05 12:14:09 +07:00
@@ -44,6 +44,7 @@
tNdbCon->theSimpleState = 0;
theErrorLine = tErrorLine++;
theLockMode = LM_Exclusive;
+ m_abortOption = AbortOnError;
return 0;
} else {
setErrorCode(4200);
@@ -64,6 +65,7 @@
theOperationType = UpdateRequest;
theErrorLine = tErrorLine++;
theLockMode = LM_Exclusive;
+ m_abortOption = AbortOnError;
return 0;
} else {
setErrorCode(4200);
@@ -84,12 +86,35 @@
theOperationType = WriteRequest;
theErrorLine = tErrorLine++;
theLockMode = LM_Exclusive;
+ m_abortOption = AbortOnError;
return 0;
} else {
setErrorCode(4200);
return -1;
}//if
}//NdbOperation::writeTuple()
+/*****************************************************************************
+ * int deleteTuple();
+ *****************************************************************************/
+int
+NdbOperation::deleteTuple()
+{
+ NdbTransaction* tNdbCon = theNdbCon;
+ int tErrorLine = theErrorLine;
+ if (theStatus == Init) {
+ theStatus = OperationDefined;
+ tNdbCon->theSimpleState = 0;
+ theOperationType = DeleteRequest;
+ theErrorLine = tErrorLine++;
+ theLockMode = LM_Exclusive;
+ m_abortOption = AbortOnError;
+ return 0;
+ } else {
+ setErrorCode(4200);
+ return -1;
+ }//if
+}//NdbOperation::deleteTuple()
+
/******************************************************************************
* int readTuple();
*****************************************************************************/
@@ -124,6 +149,7 @@
theOperationType = ReadRequest;
theErrorLine = tErrorLine++;
theLockMode = LM_Read;
+ m_abortOption = AO_IgnoreError;
return 0;
} else {
setErrorCode(4200);
@@ -131,27 +157,6 @@
}//if
}//NdbOperation::readTuple()
-/*****************************************************************************
- * int deleteTuple();
- *****************************************************************************/
-int
-NdbOperation::deleteTuple()
-{
- NdbTransaction* tNdbCon = theNdbCon;
- int tErrorLine = theErrorLine;
- if (theStatus == Init) {
- theStatus = OperationDefined;
- tNdbCon->theSimpleState = 0;
- theOperationType = DeleteRequest;
- theErrorLine = tErrorLine++;
- theLockMode = LM_Exclusive;
- return 0;
- } else {
- setErrorCode(4200);
- return -1;
- }//if
-}//NdbOperation::deleteTuple()
-
/******************************************************************************
* int readTupleExclusive();
*****************************************************************************/
@@ -166,6 +171,7 @@
theOperationType = ReadExclusive;
theErrorLine = tErrorLine++;
theLockMode = LM_Exclusive;
+ m_abortOption = AO_IgnoreError;
return 0;
} else {
setErrorCode(4200);
@@ -222,6 +228,7 @@
theDirtyIndicator = 1;
theErrorLine = tErrorLine++;
theLockMode = LM_CommittedRead;
+ m_abortOption = AO_IgnoreError;
return 0;
} else {
setErrorCode(4200);
@@ -245,6 +252,7 @@
theDirtyIndicator = 1;
theErrorLine = tErrorLine++;
theLockMode = LM_CommittedRead;
+ m_abortOption = AbortOnError;
return 0;
} else {
setErrorCode(4200);
@@ -268,6 +276,7 @@
theDirtyIndicator = 1;
theErrorLine = tErrorLine++;
theLockMode = LM_CommittedRead;
+ m_abortOption = AbortOnError;
return 0;
} else {
setErrorCode(4200);
@@ -290,6 +299,7 @@
theAI_LenInCurrAI = 25;
theLockMode = LM_Exclusive;
theErrorLine = tErrorLine++;
+ m_abortOption = AbortOnError;
initInterpreter();
return 0;
} else {
@@ -314,6 +324,7 @@
theErrorLine = tErrorLine++;
theAI_LenInCurrAI = 25;
theLockMode = LM_Exclusive;
+ m_abortOption = AbortOnError;
initInterpreter();
return 0;
} else {
--- 1.25/storage/ndb/src/ndbapi/NdbOperationExec.cpp 2007-01-25 00:57:03 +07:00
+++ 1.26/storage/ndb/src/ndbapi/NdbOperationExec.cpp 2007-02-05 12:14:09 +07:00
@@ -99,7 +99,9 @@
Remark: Puts the the data into TCKEYREQ signal and optional KEYINFO and ATTRINFO
signals.
***************************************************************************/
int
-NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId)
+NdbOperation::prepareSend(Uint32 aTC_ConnectPtr,
+ Uint64 aTransId,
+ AbortOption ao)
{
Uint32 tTransId1, tTransId2;
Uint32 tReqInfo;
@@ -147,8 +149,8 @@
//-------------------------------------------------------------
TcKeyReq * const tcKeyReq = CAST_PTR(TcKeyReq, theTCREQ->getDataPtrSend());
- Uint32 tTableId = m_currentTable->m_id;
- Uint32 tSchemaVersion = m_currentTable->m_version;
+ Uint32 tTableId = m_accessTable->m_id;
+ Uint32 tSchemaVersion = m_accessTable->m_version;
tcKeyReq->apiConnectPtr = aTC_ConnectPtr;
tcKeyReq->apiOperationPtr = ptr2int();
@@ -196,16 +198,16 @@
OperationType tOperationType = theOperationType;
Uint32 tTupKeyLen = theTupKeyLen;
- Uint8 abortOption =
- m_abortOption != -1 ? m_abortOption : theNdbCon->m_abortOption;
+ Uint8 abortOption = (ao == DefaultAbortOption) ? m_abortOption : ao;
tcKeyReq->setDirtyFlag(tReqInfo, tDirtyIndicator);
tcKeyReq->setOperationType(tReqInfo, tOperationType);
tcKeyReq->setKeyLength(tReqInfo, tTupKeyLen);
// A simple read is always ignore error
- abortOption = tSimpleIndicator ? (Uint8) AO_IgnoreError : abortOption;
+ abortOption = tSimpleState ? AO_IgnoreError : abortOption;
tcKeyReq->setAbortOption(tReqInfo, abortOption);
+ m_abortOption = abortOption;
Uint8 tDistrKeyIndicator = theDistrKeyIndicator_;
Uint8 tScanIndicator = theScanInfo & 1;
@@ -541,21 +543,16 @@
return -1;
}//if
- AbortOption ao = (AbortOption)
- (m_abortOption != -1 ? m_abortOption : theNdbCon->m_abortOption);
+ setErrorCode(aSignal->readData(4));
+ theStatus = Finished;
theReceiver.m_received_result_length = ~0;
- theStatus = Finished;
- // blobs want this
- if (m_abortOption != AO_IgnoreError)
+ // not simple read
+ if(! (theOperationType == ReadRequest && theSimpleIndicator))
{
- theNdbCon->theReturnStatus = NdbTransaction::ReturnFailure;
+ theNdbCon->OpCompleteFailure(this);
+ return -1;
}
- theError.code = aSignal->readData(4);
- theNdbCon->setOperationErrorCodeAbort(aSignal->readData(4), ao);
-
- if(theOperationType != ReadRequest || !theSimpleIndicator) // not simple read
- return theNdbCon->OpCompleteFailure(ao, m_abortOption != AO_IgnoreError);
/**
* If TCKEYCONF has arrived
@@ -563,23 +560,8 @@
*/
if(theReceiver.m_expected_result_length)
{
- return theNdbCon->OpCompleteFailure(AbortOnError);
+ return theNdbCon->OpCompleteFailure(this);
}
return -1;
}
-
-
-void
-NdbOperation::handleFailedAI_ElemLen()
-{
- NdbRecAttr* tRecAttr = theReceiver.theFirstRecAttr;
- while (tRecAttr != NULL) {
- tRecAttr->setNULL();
- tRecAttr = tRecAttr->next();
- }//while
-}//NdbOperation::handleFailedAI_ElemLen()
-
-
-
-
--- 1.106/storage/ndb/src/ndbapi/NdbScanOperation.cpp 2007-01-25 00:57:03 +07:00
+++ 1.107/storage/ndb/src/ndbapi/NdbScanOperation.cpp 2007-02-05 12:14:09 +07:00
@@ -994,6 +994,7 @@
newOp->theTupKeyLen = len;
newOp->theOperationType = opType;
+ newOp->m_abortOption = AbortOnError;
switch (opType) {
case (ReadRequest):
newOp->theLockMode = theLockMode;
--- 1.399/sql/ha_ndbcluster.cc 2007-02-03 05:22:12 +07:00
+++ 1.400/sql/ha_ndbcluster.cc 2007-02-05 12:19:17 +07:00
@@ -260,13 +260,14 @@
int execute_no_commit_ignore_no_key(ha_ndbcluster *h, NdbTransaction *trans)
{
int res= trans->execute(NdbTransaction::NoCommit,
- NdbTransaction::AO_IgnoreError,
+ NdbOperation::AO_IgnoreError,
h->m_force_send);
- if (res == 0)
- return 0;
+ if (res == -1)
+ return -1;
const NdbError &err= trans->getNdbError();
- if (err.classification != NdbError::ConstraintViolation &&
+ if (err.classification != NdbError::NoError &&
+ err.classification != NdbError::ConstraintViolation &&
err.classification != NdbError::NoDataFound)
return res;
@@ -286,7 +287,7 @@
return h->m_ignore_no_key ?
execute_no_commit_ignore_no_key(h,trans) :
trans->execute(NdbTransaction::NoCommit,
- NdbTransaction::AbortOnError,
+ NdbOperation::AbortOnError,
h->m_force_send);
}
@@ -299,7 +300,7 @@
return 0;
#endif
return trans->execute(NdbTransaction::Commit,
- NdbTransaction::AbortOnError,
+ NdbOperation::AbortOnError,
h->m_force_send);
}
@@ -312,7 +313,7 @@
return 0;
#endif
return trans->execute(NdbTransaction::Commit,
- NdbTransaction::AbortOnError,
+ NdbOperation::AbortOnError,
thd->variables.ndb_force_send);
}
@@ -327,7 +328,7 @@
#endif
h->release_completed_operations(trans, force_release);
return trans->execute(NdbTransaction::NoCommit,
- NdbTransaction::AO_IgnoreError,
+ NdbOperation::AO_IgnoreError,
h->m_force_send);
}
@@ -1726,7 +1727,8 @@
ERR_RETURN(trans->getNdbError());
}
- if (execute_no_commit_ie(this,trans,FALSE) != 0)
+ if ((res = execute_no_commit_ie(this,trans,FALSE)) != 0 ||
+ op->getNdbError().code)
{
table->status= STATUS_NOT_FOUND;
DBUG_RETURN(ndb_err(trans));
@@ -1998,7 +2000,8 @@
if ((res= define_read_attrs(buf, op)))
DBUG_RETURN(res);
- if (execute_no_commit_ie(this,trans,FALSE) != 0)
+ if (execute_no_commit_ie(this,trans,FALSE) != 0 ||
+ op->getNdbError().code)
{
table->status= STATUS_NOT_FOUND;
DBUG_RETURN(ndb_err(trans));
@@ -4337,11 +4340,10 @@
ERR_RETURN(ndb->getNdbError());
no_uncommitted_rows_reset(thd);
thd_ndb->stmt= trans;
+ thd_ndb->query_state&= NDB_QUERY_NORMAL;
trans_register_ha(thd, FALSE, ndbcluster_hton);
}
- thd_ndb->query_state&= NDB_QUERY_NORMAL;
m_active_trans= trans;
-
// Start of statement
m_ops_pending= 0;
thd->set_current_stmt_binlog_row_based_if_mixed();
@@ -7800,7 +7802,7 @@
(char*)&var_mem);
if (pTrans->execute(NdbTransaction::NoCommit,
- NdbTransaction::AbortOnError,
+ NdbOperation::AbortOnError,
TRUE) == -1)
{
error= pTrans->getNdbError();
@@ -8057,7 +8059,6 @@
!op->readTuple(lm) &&
!set_primary_key(op, multi_range_curr->start_key.key) &&
!define_read_attrs(curr, op) &&
- (op->setAbortOption(AO_IgnoreError), TRUE) &&
(!m_use_partition_function ||
(op->setPartitionId(part_spec.start_part), TRUE)))
curr += reclength;
@@ -8079,8 +8080,7 @@
if ((op= m_active_trans->getNdbIndexOperation(unique_idx, tab)) &&
!op->readTuple(lm) &&
!set_index_key(op, key_info, multi_range_curr->start_key.key) &&
- !define_read_attrs(curr, op) &&
- (op->setAbortOption(AO_IgnoreError), TRUE))
+ !define_read_attrs(curr, op))
curr += reclength;
else
ERR_RETURN(op ? op->getNdbError() : m_active_trans->getNdbError());
@@ -8280,6 +8280,8 @@
if (multi_range_curr == multi_range_end)
{
DBUG_MULTI_RANGE(16);
+ Thd_ndb *thd_ndb= get_thd_ndb(current_thd);
+ thd_ndb->query_state&= NDB_QUERY_NORMAL;
DBUG_RETURN(HA_ERR_END_OF_FILE);
}
--- 1.51/storage/ndb/src/ndbapi/NdbBlob.cpp 2007-01-27 08:46:41 +07:00
+++ 1.52/storage/ndb/src/ndbapi/NdbBlob.cpp 2007-02-05 12:14:09 +07:00
@@ -1133,7 +1133,7 @@
setErrorCode(tOp);
DBUG_RETURN(-1);
}
- tOp->m_abortOption = NdbTransaction::AbortOnError;
+ tOp->m_abortOption = NdbOperation::AbortOnError;
buf += thePartSize;
n++;
thePendingBlobOps |= (1 << NdbOperation::ReadRequest);
@@ -1169,7 +1169,7 @@
setErrorCode(tOp);
DBUG_RETURN(-1);
}
- tOp->m_abortOption = NdbTransaction::AbortOnError;
+ tOp->m_abortOption = NdbOperation::AbortOnError;
buf += thePartSize;
n++;
thePendingBlobOps |= (1 << NdbOperation::InsertRequest);
@@ -1193,7 +1193,7 @@
setErrorCode(tOp);
DBUG_RETURN(-1);
}
- tOp->m_abortOption = NdbTransaction::AbortOnError;
+ tOp->m_abortOption = NdbOperation::AbortOnError;
buf += thePartSize;
n++;
thePendingBlobOps |= (1 << NdbOperation::UpdateRequest);
@@ -1216,7 +1216,7 @@
setErrorCode(tOp);
DBUG_RETURN(-1);
}
- tOp->m_abortOption = NdbTransaction::AbortOnError;
+ tOp->m_abortOption = NdbOperation::AbortOnError;
n++;
thePendingBlobOps |= (1 << NdbOperation::DeleteRequest);
theNdbCon->thePendingBlobOps |= (1 << NdbOperation::DeleteRequest);
@@ -1252,7 +1252,7 @@
setErrorCode(tOp);
DBUG_RETURN(-1);
}
- tOp->m_abortOption= NdbTransaction::AO_IgnoreError;
+ tOp->m_abortOption= NdbOperation::AO_IgnoreError;
n++;
}
DBUG_PRINT("info", ("bat=%u", bat));
@@ -1588,7 +1588,7 @@
DBUG_RETURN(-1);
}
if (isWriteOp()) {
- tOp->m_abortOption = NdbTransaction::AO_IgnoreError;
+ tOp->m_abortOption = NdbOperation::AO_IgnoreError;
}
theHeadInlineReadOp = tOp;
// execute immediately
@@ -1634,7 +1634,7 @@
DBUG_RETURN(-1);
}
if (isWriteOp()) {
- tOp->m_abortOption = NdbTransaction::AO_IgnoreError;
+ tOp->m_abortOption = NdbOperation::AO_IgnoreError;
}
theHeadInlineReadOp = tOp;
// execute immediately
@@ -1807,7 +1807,7 @@
setErrorCode(NdbBlobImpl::ErrAbort);
DBUG_RETURN(-1);
}
- tOp->m_abortOption = NdbTransaction::AbortOnError;
+ tOp->m_abortOption = NdbOperation::AbortOnError;
DBUG_PRINT("info", ("added op to update head+inline"));
}
DBUG_RETURN(0);
@@ -1837,7 +1837,7 @@
setErrorCode(NdbBlobImpl::ErrAbort);
DBUG_RETURN(-1);
}
- tOp->m_abortOption = NdbTransaction::AbortOnError;
+ tOp->m_abortOption = NdbOperation::AbortOnError;
DBUG_PRINT("info", ("added op to update head+inline"));
}
}
--- 1.7/storage/ndb/src/ndbapi/NdbIndexStat.cpp 2007-01-29 21:13:15 +07:00
+++ 1.8/storage/ndb/src/ndbapi/NdbIndexStat.cpp 2007-02-05 12:14:09 +07:00
@@ -426,7 +426,7 @@
DBUG_RETURN(-1);
}
if (trans->execute(NdbTransaction::NoCommit,
- NdbTransaction::AbortOnError, forceSend) == -1) {
+ NdbOperation::AbortOnError, forceSend) == -1) {
m_error = trans->getNdbError();
DBUG_PRINT("error", ("trans:%d op:%d", trans->getNdbError().code,
op->getNdbError().code));
--- 1.10/mysql-test/r/ndb_read_multi_range.result 2007-02-01 04:41:11 +07:00
+++ 1.11/mysql-test/r/ndb_read_multi_range.result 2007-02-05 12:14:06 +07:00
@@ -417,12 +417,12 @@
9199 9200 NULL
223456 223457 NULL
245651 245652 2005-12-08 15:58:27
-select c, count(*)
+select t21.c, count(*)
from t21
inner join t22 using (a)
where t22.b in (2,256,257,1121,1134,4102,9200,223457,245652)
-group by c
-order by c;
+group by t21.c
+order by t21.c;
c count(*)
NULL 7
2005-12-08 15:58:27 1
--- 1.12/mysql-test/t/ndb_read_multi_range.test 2007-02-01 04:41:11 +07:00
+++ 1.13/mysql-test/t/ndb_read_multi_range.test 2007-02-05 12:14:06 +07:00
@@ -249,12 +249,12 @@
delete from t22 where a > 245651;
update t22 set b = a + 1;
select * from t22 order by 1,2,3;
-select c, count(*)
+select t21.c, count(*)
from t21
inner join t22 using (a)
where t22.b in (2,256,257,1121,1134,4102,9200,223457,245652)
-group by c
-order by c;
+group by t21.c
+order by t21.c;
DROP TABLE t1, t11, t12, t21, t22;
--- 1.96/sql/ha_ndbcluster_binlog.cc 2007-01-29 06:47:29 +07:00
+++ 1.97/sql/ha_ndbcluster_binlog.cc 2007-02-05 12:14:07 +07:00
@@ -3924,9 +3924,9 @@
"%ld(%d e/s), total time %ld(%d e/s)",
(ulong)gci, event_count,
write_timer.elapsed_ms(),
- event_count / write_timer.elapsed_ms(),
+ (1000*event_count) / write_timer.elapsed_ms(),
gci_timer.elapsed_ms(),
- event_count / gci_timer.elapsed_ms());
+ (1000*event_count) / gci_timer.elapsed_ms());
#endif
}
}
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2419) | tomas | 5 Feb |