Commit a1fc9e88 authored by unknown's avatar unknown
Browse files

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
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -163,6 +163,7 @@ class NdbConnection
  friend class NdbIndexOperation;
  friend class NdbIndexScanOperation;
  friend class NdbBlob;
  friend class ha_ndbcluster;

public:

+8 −0
Original line number Diff line number Diff line
@@ -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)
{
+2 −0
Original line number Diff line number Diff line
@@ -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*);