~patrick-crews/drizzle/qp-merge2

« back to all changes in this revision

Viewing changes to drizzled/sql_insert.cc

  • Committer: Patrick Crews
  • Date: 2012-02-20 22:04:21 UTC
  • mfrom: (2483.1.30 drizzle)
  • Revision ID: gleebix@gmail.com-20120220220421-9a77n2wnglo211r0
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1342
1342
 
1343
1343
  if ((changed= (info.copied || info.deleted || info.updated)))
1344
1344
  {
1345
 
    /*
1346
 
      We must invalidate the table in the query cache before binlog writing
1347
 
      and autocommitOrRollback.
1348
 
    */
1349
1345
    if (session->transaction.stmt.hasModifiedNonTransData())
1350
1346
      session->transaction.all.markModifiedNonTransData();
1351
1347
  }
1396
1392
 
1397
1393
    table->cursor->ha_end_bulk_insert();
1398
1394
 
1399
 
    /*
1400
 
      If at least one row has been inserted/modified and will stay in
1401
 
      the table (the table doesn't have transactions) we must write to
1402
 
      the binlog (and the error code will make the slave stop).
1403
 
 
1404
 
      For many errors (example: we got a duplicate key error while
1405
 
      inserting into a MyISAM table), no row will be added to the table,
1406
 
      so passing the error to the slave will not help since there will
1407
 
      be an error code mismatch (the inserts will succeed on the slave
1408
 
      with no error).
1409
 
 
1410
 
      If table creation failed, the number of rows modified will also be
1411
 
      zero, so no check for that is made.
1412
 
    */
1413
1395
    changed= (info.copied || info.deleted || info.updated);
1414
1396
    transactional_table= table->cursor->has_transactions();
1415
1397
    assert(transactional_table || !changed ||