~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/cursor.cc

  • Committer: Jay Pipes
  • Date: 2010-04-20 18:14:52 UTC
  • mto: This revision was merged to the branch mainline in revision 1501.
  • Revision ID: jpipes@serialcoder-20100420181452-l57dtelwond5xt6g
Cursor::write_row() -> Cursor::doInsertRecord().  Cursor::ha_write_row() -> Cursor::insertRecord()

Show diffs side-by-side

added added

removed removed

Lines of Context:
1344
1344
    /*
1345
1345
     * This is a total hack because of the code that is
1346
1346
     * in write_record() in sql_insert.cc. During
1347
 
     * a REPLACE statement, a call to ha_write_row() is
 
1347
     * a REPLACE statement, a call to insertRecord() is
1348
1348
     * called.  If it fails, then a call to ha_delete_row()
1349
1349
     * is called, followed by a repeat of the original
1350
 
     * call to ha_write_row().  So, log_row_for_replication
 
1350
     * call to insertRecord().  So, log_row_for_replication
1351
1351
     * could be called either once or twice for a REPLACE
1352
1352
     * statement.  The below looks at the values of before_record
1353
1353
     * and after_record to determine which call to this
1485
1485
}
1486
1486
 
1487
1487
 
1488
 
int Cursor::ha_write_row(unsigned char *buf)
 
1488
int Cursor::insertRecord(unsigned char *buf)
1489
1489
{
1490
1490
  int error;
1491
1491
 
1500
1500
 
1501
1501
  DRIZZLE_INSERT_ROW_START(table_share->getSchemaName(), table_share->getTableName());
1502
1502
  setTransactionReadWrite();
1503
 
  error= write_row(buf);
 
1503
  error= doInsertRecord(buf);
1504
1504
  DRIZZLE_INSERT_ROW_DONE(error);
1505
1505
 
1506
1506
  if (unlikely(error))