~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_insert.cc

Merge of Jay

Show diffs side-by-side

added added

removed removed

Lines of Context:
240
240
                    values_list.elements > 1);
241
241
 
242
242
  if (session->openTablesLock(table_list))
 
243
  {
 
244
    DRIZZLE_INSERT_DONE(1, 0);
243
245
    return true;
 
246
  }
244
247
 
245
248
  lock_type= table_list->lock_type;
246
249
 
466
469
                   info.copied + info.deleted + info.touched, id, buff);
467
470
  }
468
471
  session->abort_on_warning= 0;
469
 
  DRIZZLE_INSERT_END();
470
 
  return(false);
 
472
  DRIZZLE_INSERT_DONE(0, session->row_count_func);
 
473
  return false;
471
474
 
472
475
abort:
473
476
  if (table != NULL)
475
478
  if (!joins_freed)
476
479
    free_underlaid_joins(session, &session->lex->select_lex);
477
480
  session->abort_on_warning= 0;
478
 
  DRIZZLE_INSERT_END();
479
 
  return(true);
 
481
  DRIZZLE_INSERT_DONE(1, 0);
 
482
  return true;
480
483
}
481
484
 
482
485
 
1336
1339
  if (error)
1337
1340
  {
1338
1341
    table->file->print_error(error,MYF(0));
1339
 
    return(1);
 
1342
    DRIZZLE_INSERT_SELECT_DONE(error, 0);
 
1343
    return 1;
1340
1344
  }
1341
1345
  char buff[160];
1342
1346
  if (info.ignore)
1354
1358
     (info.copied ? autoinc_value_of_last_inserted_row : 0));
1355
1359
  session->my_ok((ulong) session->row_count_func,
1356
1360
                 info.copied + info.deleted + info.touched, id, buff);
1357
 
  return(0);
 
1361
  DRIZZLE_INSERT_SELECT_DONE(0, session->row_count_func);
 
1362
  return 0;
1358
1363
}
1359
1364
 
1360
1365
void select_insert::abort() {
1393
1398
    table->file->ha_release_auto_increment();
1394
1399
  }
1395
1400
 
 
1401
  if (DRIZZLE_INSERT_SELECT_DONE_ENABLED())
 
1402
  {
 
1403
    DRIZZLE_INSERT_SELECT_DONE(0, info.copied + info.deleted + info.updated);
 
1404
  }
 
1405
 
1396
1406
  return;
1397
1407
}
1398
1408