~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
 
60
60
DT_FIELD_INFO pbms_dump_info[]=
61
61
{
62
 
        {"Data",                        NULL, NULL, MYSQL_TYPE_LONG_BLOB,       &my_charset_bin,        NOT_NULL_FLAG,  "A BLOB repository record"},
63
 
        {NULL,NULL, NULL, MYSQL_TYPE_STRING,NULL, 0, NULL}
 
62
        {"Data",                        NOVAL, NULL, MYSQL_TYPE_LONG_BLOB,      &my_charset_bin,        NOT_NULL_FLAG,  "A BLOB repository record"},
 
63
        {NULL,NOVAL, NULL, MYSQL_TYPE_STRING,NULL, 0, NULL}
64
64
};
65
65
 
66
66
DT_KEY_INFO pbms_dump_keys[]=
157
157
         */
158
158
        save_write_set = table->write_set;
159
159
        table->write_set = NULL;
 
160
#ifdef DRIZZLED
160
161
        memset(buf, 0xFF, table->getNullBytes());
 
162
#else
 
163
        memset(buf, 0xFF, table->s->null_bytes);
 
164
#endif
161
165
        
162
166
        for (Field **field=GET_TABLE_FIELDS(table) ; *field ; field++) {
163
167
                curr_field = *field;
166
170
#if MYSQL_VERSION_ID < 50114
167
171
                curr_field->ptr = (byte *) buf + curr_field->offset();
168
172
#else
 
173
#ifdef DRIZZLED
169
174
                curr_field->ptr = (byte *) buf + curr_field->offset(curr_field->getTable()->getInsertRecord());
 
175
#else
 
176
                curr_field->ptr = (byte *) buf + curr_field->offset(curr_field->table->record[0]);
 
177
#endif
170
178
#endif
171
179
                switch (curr_field->field_name[0]) {
172
180
                        case 'D':
254
262
        }
255
263
 
256
264
 
257
 
        return returnDumpRow(iBlobBuffer->getBuffer(0), record_size, buf);
 
265
        return_(returnDumpRow(iBlobBuffer->getBuffer(0), record_size, buf));
258
266
}
259
267
 
260
268
//-----------------------
329
337
        INC_INFO_SPACE(4);
330
338
        memcpy(ptr, sysTablesDump->getBuffer(0), sysTablesDump->length());
331
339
        INC_INFO_SPACE(sysTablesDump->length());
332
 
        sysTablesDump->release();
 
340
        release_(sysTablesDump);
333
341
        sysTablesDump = NULL;
334
342
                        
335
343
        tab_info = (TabInfoPtr)ptr;
426
434
        field = (Field_blob *)GET_FIELD(table, 0);
427
435
        
428
436
    /* Get the blob record: */
 
437
#ifdef DRIZZLED
429
438
    blob_rec= buf + field->offset(table->getInsertRecord());
430
439
    packlength= field->pack_length() - table->getShare()->blob_ptr_size;
 
440
#else
 
441
    blob_rec= buf + field->offset(table->record[0]);
 
442
    packlength= field->pack_length() - table->s->blob_ptr_size;
 
443
#endif
431
444
 
432
445
    memcpy(&blob_ptr, blob_rec +packlength, sizeof(char*));
433
446
    length= field->get_length();