#At file:///home/frazer/bzr/mysql-5.1-telco-6.2/
3003 Frazer Clement 2009-09-24
Bug#47572 Multi-exec txns accessing Blobs have high memory usage. Allow periodic resource release for Blob transactions
modified:
sql/ha_ndbcluster.cc
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc 2009-09-17 13:53:38 +0000
+++ b/sql/ha_ndbcluster.cc 2009-09-24 14:10:29 +0000
@@ -3539,7 +3539,13 @@ void ha_ndbcluster::unpack_record(uchar
{
Field_blob *field_blob= (Field_blob *)field;
NdbBlob *ndb_blob= m_value[i].blob;
+ /* unpack_record *only* called for scan result processing
+ * *while* the scan is open and the Blob is active.
+ * Verify Blob state to be certain.
+ * Accessing PK/UK op Blobs after execute() is unsafe
+ */
DBUG_ASSERT(ndb_blob != 0);
+ DBUG_ASSERT(ndb_blob->getState() == NdbBlob::Active);
int isNull;
res= ndb_blob->getNull(isNull);
DBUG_ASSERT(res == 0); // Already succeeded once
@@ -3637,6 +3643,7 @@ void ha_ndbcluster::print_results()
{
NdbBlob *ndb_blob= value.blob;
bool isNull= TRUE;
+ assert(ndb_blob->getState() == NdbBlob::Active);
ndb_blob->getNull(isNull);
if (isNull)
strmov(buf, "NULL");
@@ -9150,14 +9157,6 @@ int ha_ndbcluster::write_ndb_file(const
void
ha_ndbcluster::release_completed_operations(NdbTransaction *trans)
{
- if (trans->hasBlobOperation())
- {
- /* We are reading/writing BLOB fields,
- releasing operation records is unsafe
- */
- return;
- }
-
trans->releaseCompletedOperations();
}
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-6.2 branch (frazer:3003) Bug#47572 | Frazer Clement | 24 Sep |