~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_insert.cc

  • Committer: Brian Aker
  • Date: 2010-03-04 08:33:14 UTC
  • mfrom: (1320.1.12 build)
  • Revision ID: brian@gaz-20100304083314-pscg89hdw618s2j5
Merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1454
1454
 
1455
1455
static Table *create_table_from_items(Session *session, HA_CREATE_INFO *create_info,
1456
1456
                                      TableList *create_table,
1457
 
                                      message::Table *table_proto,
 
1457
                                      message::Table &table_proto,
1458
1458
                                      AlterInfo *alter_info,
1459
1459
                                      List<Item> *items,
1460
1460
                                      bool is_if_not_exists,
1470
1470
  Field *tmp_field;
1471
1471
  bool not_used;
1472
1472
 
1473
 
  bool lex_identified_temp_table= (table_proto->type() == message::Table::TEMPORARY);
 
1473
  bool lex_identified_temp_table= (table_proto.type() == message::Table::TEMPORARY);
1474
1474
 
1475
1475
  if (!(lex_identified_temp_table) &&
1476
1476
      create_table->table->db_stat)
1538
1538
    should not cause deadlocks or races.
1539
1539
  */
1540
1540
  {
1541
 
    if (!mysql_create_table_no_lock(session,
 
1541
    if (not mysql_create_table_no_lock(session,
1542
1542
                                    identifier,
1543
1543
                                    create_info,
1544
1544
                                    table_proto,
1559
1559
        return NULL;
1560
1560
      }
1561
1561
 
1562
 
      if (!(lex_identified_temp_table))
 
1562
      if (not lex_identified_temp_table)
1563
1563
      {
1564
1564
        pthread_mutex_lock(&LOCK_open); /* CREATE TABLE... has found that the table already exists for insert and is adapting to use it */
1565
1565
        if (session->reopen_name_locked_table(create_table, false))
1572
1572
      }
1573
1573
      else
1574
1574
      {
1575
 
        if (!(table= session->openTable(create_table, (bool*) 0,
1576
 
                                         DRIZZLE_OPEN_TEMPORARY_ONLY)) &&
1577
 
            !create_info->table_existed)
 
1575
        if (not (table= session->openTable(create_table, (bool*) 0,
 
1576
                                           DRIZZLE_OPEN_TEMPORARY_ONLY)) &&
 
1577
            not create_info->table_existed)
1578
1578
        {
1579
1579
          /*
1580
1580
            This shouldn't happen as creation of temporary table should make
1611
1611
int
1612
1612
select_create::prepare(List<Item> &values, Select_Lex_Unit *u)
1613
1613
{
1614
 
  bool lex_identified_temp_table= (table_proto->type() == message::Table::TEMPORARY);
 
1614
  bool lex_identified_temp_table= (table_proto.type() == message::Table::TEMPORARY);
1615
1615
 
1616
1616
  DRIZZLE_LOCK *extra_lock= NULL;
1617
1617
  /*