~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_load.cc

  • Committer: Brian Aker
  • Date: 2008-11-11 04:33:12 UTC
  • Revision ID: brian@gir-3.local-20081111043312-3ohwkryi7k10lr4z
Second pass through on replication row patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
438
438
    session->transaction.all.modified_non_trans_table= true;
439
439
 
440
440
  if (mysql_bin_log.is_open())
441
 
  {
442
 
    /*
443
 
      We need to do the job that is normally done inside
444
 
      binlog_query() here, which is to ensure that the pending event
445
 
      is written before tables are unlocked and before any other
446
 
      events are written.  We also need to update the table map
447
 
      version for the binary log to mark that table maps are invalid
448
 
      after this point.
449
 
     */
450
 
    if (session->current_stmt_binlog_row_based)
451
 
      session->binlog_flush_pending_rows_event(true);
452
 
    else
453
 
    {
454
 
      /*
455
 
        As already explained above, we need to call end_io_cache() or the last
456
 
        block will be logged only after Execute_load_query_log_event (which is
457
 
        wrong), when read_info is destroyed.
458
 
      */
459
 
      read_info.end_io_cache();
460
 
      if (lf_info.wrote_create_file)
461
 
      {
462
 
        write_execute_load_query_log_event(session, handle_duplicates, ignore,
463
 
                                           transactional_table,killed_status);
464
 
      }
465
 
    }
466
 
  }
 
441
    session->binlog_flush_pending_rows_event(true);
467
442
 
468
443
  /* ok to client sent only after binlog write and engine commit */
469
444
  my_ok(session, info.copied + info.deleted, 0L, name);