~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbms/src/events_ms.cc

  • Committer: Lee Bieber
  • Date: 2010-12-15 16:23:36 UTC
  • mfrom: (1995.1.2 build)
  • Revision ID: kalebral@gmail.com-20101215162336-juntyt4gw4vgohg4
Merge Andrew - fix bug 628912: Crash / segfault in drizzled::Item_func::arguments (this=0x35) at ./drizzled/function/func.h
Merge Andrew - 663919: next query after KILL QUERY will error

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
                }
91
91
                
92
92
                // Signal PBMS to delete the reference to the BLOB.
93
 
                err = MSEngine::referenceBlob(data.table.getSchemaName(), data.table.getTableName(), &blob_url_buffer, blob_url, field->position(), &result);
 
93
                err = MSEngine::referenceBlob(data.table.getSchemaName(), data.table.getTableName(), &blob_url_buffer, blob_url, field->field_index, &result);
94
94
                if (err) {
95
95
                        // If it fails log the error and continue to try and release any other BLOBs in the row.
96
96
                        fprintf(stderr, "PBMSEvents: referenceBlob(\"%s.%s\", \"%s\" ) error (%d):'%s'\n", 
206
206
        }
207
207
        
208
208
        // Tell PBMS to add a reference to the BLOB.
209
 
        err = MSEngine::referenceBlob(db, table_name, &blob_url_buffer, blob_url, field->position(), &result);
 
209
        err = MSEngine::referenceBlob(db, table_name, &blob_url_buffer, blob_url, field->field_index, &result);
210
210
        if (err) {
211
211
                // If it fails log the error and continue to try and release any other BLOBs in the row.
212
212
                fprintf(stderr, "PBMSEvents: referenceBlob(\"%s.%s\", \"%s\" ) error (%d):'%s'\n", 
227
227
                
228
228
                if (length > org_length) {
229
229
                        // This can only happen if the BLOB URL is actually larger than the BLOB itself.
230
 
                        blob = (char *) session.getMemRoot()->allocate(length);
 
230
                        blob = (char *) session.alloc(length);
231
231
                        memcpy(blob_rec+packlength, &blob, sizeof(char*));
232
232
                }                       
233
233
                memcpy(blob, blob_url_buffer.bu_data, length);