Fix for bug #21059 Server crashes on join query with large dataset with NDB tables: Releasing operation for each intermediate batch, before next call to trans->execute(NoCommit);

This commit is contained in:
unknown 2006-08-07 13:51:20 +02:00
parent b10b25fbb5
commit a1fc9e8848
3 changed files with 12 additions and 1 deletions

View file

@ -163,7 +163,8 @@ class NdbConnection
friend class NdbIndexOperation;
friend class NdbIndexScanOperation;
friend class NdbBlob;
friend class ha_ndbcluster;
public:
/**

View file

@ -161,6 +161,7 @@ int execute_no_commit(ha_ndbcluster *h, NdbConnection *trans)
if (m_batch_execute)
return 0;
#endif
h->release_completed_operations(trans);
return trans->execute(NoCommit,AbortOnError,h->m_force_send);
}
@ -194,6 +195,7 @@ int execute_no_commit_ie(ha_ndbcluster *h, NdbConnection *trans)
if (m_batch_execute)
return 0;
#endif
h->release_completed_operations(trans);
return trans->execute(NoCommit, AO_IgnoreError,h->m_force_send);
}
@ -5269,6 +5271,12 @@ int ha_ndbcluster::write_ndb_file()
DBUG_RETURN(error);
}
void
ha_ndbcluster::release_completed_operations(NdbConnection *trans)
{
trans->releaseCompletedOperations();
}
int
ndbcluster_show_status(THD* thd)
{

View file

@ -262,6 +262,8 @@ class ha_ndbcluster: public handler
void no_uncommitted_rows_init(THD *);
void no_uncommitted_rows_reset(THD *);
void release_completed_operations(NdbConnection*);
friend int execute_no_commit(ha_ndbcluster*, NdbConnection*);
friend int execute_commit(ha_ndbcluster*, NdbConnection*);
friend int execute_no_commit_ie(ha_ndbcluster*, NdbConnection*);