Commit a1fc9e88 authored by unknown's avatar unknown

Fix for bug #21059 Server crashes on join query with large dataset with NDB...

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);


parent b10b25fb
......@@ -163,7 +163,8 @@ class NdbConnection
friend class NdbIndexOperation;
friend class NdbIndexScanOperation;
friend class NdbBlob;
friend class ha_ndbcluster;
public:
/**
......
......@@ -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)
{
......
......@@ -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*);
......
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