~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbxt/src/datalog_xt.cc

Merge Paul

Show diffs side-by-side

added added

removed removed

Lines of Context:
1149
1149
xtBool XTDataLogBuffer::dlb_close_log(XTThreadPtr thread)
1150
1150
{
1151
1151
        if (dlb_data_log) {
 
1152
                if (dlb_data_log->dlf_log_file) {
 
1153
                        if (!dl_write_log_header(dlb_data_log, dlb_data_log->dlf_log_file, 0, thread))
 
1154
                                return FAILED;
 
1155
                }
 
1156
 
1152
1157
                /* Flush and commit the data in the old log: */
1153
1158
                if (!dlb_flush_log(TRUE, thread))
1154
1159
                        return FAILED;
1204
1209
                if (!xt_pwrite_file(dlb_data_log->dlf_log_file, dlb_buffer_offset, dlb_buffer_len, dlb_log_buffer, &thread->st_statistics.st_data, thread))
1205
1210
                        return FAILED;
1206
1211
#ifdef DEBUG
1207
 
                if (dlb_buffer_offset + dlb_buffer_len > dlb_max_write_offset)
 
1212
                if (dlb_buffer_offset + (xtLogOffset) dlb_buffer_len > dlb_max_write_offset)
1208
1213
                        dlb_max_write_offset = dlb_buffer_offset + (xtLogOffset) dlb_buffer_len;
1209
1214
#endif
1210
1215
                dlb_buffer_len = 0;
1745
1750
        xtLogOffset                     src_log_offset;
1746
1751
        xtLogID                         curr_log_id;
1747
1752
        xtLogOffset                     curr_log_offset;
1748
 
        xtLogID                         dest_log_id;
1749
 
        xtLogOffset                     dest_log_offset;
 
1753
        xtLogID                         dest_log_id = 0;
 
1754
        xtLogOffset                     dest_log_offset = 0;
1750
1755
        off_t                           garbage_count = 0;
1751
1756
 
1752
1757
        memset(&cs, 0, sizeof(XTCompactorStateRec));