~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_insert.cc

  • Committer: Brian Aker
  • Date: 2011-01-06 18:00:47 UTC
  • mto: This revision was merged to the branch mainline in revision 2064.
  • Revision ID: brian@tangent.org-20110106180047-0l214nvry9x1lkxo
Merge in fixes for microtimestamp,

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