~drizzle-trunk/libdrizzle/jenkins-Libdrizzle-72

« back to all changes in this revision

Viewing changes to libdrizzle/binlog.cc

  • Committer: Continuous Integration
  • Date: 2013-01-29 00:59:23 UTC
  • mfrom: (105.1.2 5.1-binlogs-err)
  • Revision ID: ci@drizzle.org-20130129005923-4hfsd53helja27wc
Merge lp:~linuxjedi/libdrizzle/5.1-binlogs-err Build: jenkins-Libdrizzle-67

Show diffs side-by-side

added added

removed removed

Lines of Context:
271
271
    con->buffer_ptr+= 5;
272
272
    con->buffer_size-= 5;
273
273
    con->pop_state();
274
 
    con->binlog->error_fn(DRIZZLE_RETURN_EOF, con->binlog->binlog_context);
 
274
    con->binlog->error_fn(DRIZZLE_RETURN_EOF, con, con->binlog->binlog_context);
275
275
    return DRIZZLE_RETURN_EOF;
276
276
  }
277
277
  else if (con->buffer_ptr[0] == 255)
299
299
    con->packet_size= 0;
300
300
 
301
301
    con->pop_state();
302
 
    con->binlog->error_fn(DRIZZLE_RETURN_ERROR_CODE, con->binlog->binlog_context);
 
302
    con->binlog->error_fn(DRIZZLE_RETURN_ERROR_CODE, con, con->binlog->binlog_context);
303
303
    return DRIZZLE_RETURN_ERROR_CODE;
304
304
  }
305
305
  else
316
316
    {
317
317
        drizzle_set_error(con, "drizzle_state_binlog_read",
318
318
                          "packet size error:%zu:%zu", con->packet_size, binlog_event->length);
319
 
        con->binlog->error_fn(DRIZZLE_RETURN_UNEXPECTED_DATA, con->binlog->binlog_context);
 
319
        con->binlog->error_fn(DRIZZLE_RETURN_UNEXPECTED_DATA, con, con->binlog->binlog_context);
320
320
        return DRIZZLE_RETURN_UNEXPECTED_DATA;
321
321
    }
322
322
    if (binlog_event->length <= 27)
374
374
        if (event_crc != binlog_event->checksum)
375
375
        {
376
376
          drizzle_set_error(con, __func__, "CRC doesn't match: 0x%lX, 0x%lX", event_crc, binlog_event->checksum);
377
 
          con->binlog->error_fn(DRIZZLE_RETURN_BINLOG_CRC, con->binlog->binlog_context);
 
377
          con->binlog->error_fn(DRIZZLE_RETURN_BINLOG_CRC, con, con->binlog->binlog_context);
378
378
          return DRIZZLE_RETURN_BINLOG_CRC;
379
379
        }
380
380
      }
384
384
    {
385
385
      drizzle_set_error(con, "drizzle_state_binlog_read",
386
386
                        "unexpected data after packet:%zu", con->buffer_size);
387
 
      con->binlog->error_fn(DRIZZLE_RETURN_UNEXPECTED_DATA, con->binlog->binlog_context);
 
387
      con->binlog->error_fn(DRIZZLE_RETURN_UNEXPECTED_DATA, con, con->binlog->binlog_context);
388
388
      return DRIZZLE_RETURN_UNEXPECTED_DATA;
389
389
    }
390
390
    con->pop_state();