~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_insert.cc

  • Committer: Stewart Smith
  • Date: 2011-01-21 01:09:12 UTC
  • mfrom: (2099 staging)
  • mto: (2099.1.3 build)
  • mto: This revision was merged to the branch mainline in revision 2100.
  • Revision ID: stewart@flamingspork.com-20110121010912-x5ogi8rm08nortxp
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1325
1325
    fill_record(session, table->getFields(), values, true);
1326
1326
}
1327
1327
 
1328
 
void select_insert::send_error(uint32_t errcode,const char *err)
 
1328
void select_insert::send_error(drizzled::error_t errcode,const char *err)
1329
1329
{
1330
 
 
1331
 
 
1332
1330
  my_message(errcode, err, MYF(0));
1333
 
 
1334
 
  return;
1335
1331
}
1336
1332
 
1337
1333
 
1485
1481
                                      List<Item> *items,
1486
1482
                                      bool is_if_not_exists,
1487
1483
                                      DrizzleLock **lock,
1488
 
                                      TableIdentifier &identifier)
 
1484
                                      identifier::Table::const_reference identifier)
1489
1485
{
1490
1486
  TableShare share(message::Table::INTERNAL);
1491
1487
  uint32_t select_field_count= items->elements;
1493
1489
  List_iterator_fast<Item> it(*items);
1494
1490
  Item *item;
1495
1491
  Field *tmp_field;
1496
 
  bool not_used;
1497
1492
 
1498
1493
  if (not (identifier.isTmp()) && create_table->table->db_stat)
1499
1494
  {
1577
1572
  Table *table= 0;
1578
1573
  {
1579
1574
    if (not create_table_no_lock(session,
1580
 
                                       identifier,
1581
 
                                       create_info,
1582
 
                                       table_proto,
1583
 
                                       alter_info,
1584
 
                                       false,
1585
 
                                       select_field_count,
1586
 
                                       is_if_not_exists))
 
1575
                                 identifier,
 
1576
                                 create_info,
 
1577
                                 table_proto,
 
1578
                                 alter_info,
 
1579
                                 false,
 
1580
                                 select_field_count,
 
1581
                                 is_if_not_exists))
1587
1582
    {
1588
1583
      if (create_info->table_existed && not identifier.isTmp())
1589
1584
      {
1607
1602
 
1608
1603
          if (concurrent_table->reopen_name_locked_table(create_table, session))
1609
1604
          {
1610
 
            plugin::StorageEngine::dropTable(*session, identifier);
 
1605
            (void)plugin::StorageEngine::dropTable(*session, identifier);
1611
1606
          }
1612
1607
          else
1613
1608
          {
1616
1611
        }
1617
1612
        else
1618
1613
        {
1619
 
          plugin::StorageEngine::dropTable(*session, identifier);
 
1614
          (void)plugin::StorageEngine::dropTable(*session, identifier);
1620
1615
        }
1621
1616
      }
1622
1617
      else
1639
1634
  }
1640
1635
 
1641
1636
  table->reginfo.lock_type=TL_WRITE;
1642
 
  if (! ((*lock)= session->lockTables(&table, 1, DRIZZLE_LOCK_IGNORE_FLUSH, &not_used)))
 
1637
  if (not ((*lock)= session->lockTables(&table, 1, DRIZZLE_LOCK_IGNORE_FLUSH)))
1643
1638
  {
1644
1639
    if (*lock)
1645
1640
    {
1735
1730
}
1736
1731
 
1737
1732
 
1738
 
void select_create::send_error(uint32_t errcode,const char *err)
 
1733
void select_create::send_error(drizzled::error_t errcode,const char *err)
1739
1734
{
1740
1735
  /*
1741
1736
    This will execute any rollbacks that are necessary before writing
1749
1744
 
1750
1745
  */
1751
1746
  select_insert::send_error(errcode, err);
1752
 
 
1753
 
  return;
1754
1747
}
1755
1748
 
1756
1749