~brianaker/drizzle/bug786515-trunk

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Mark Atwood
  • Date: 2011-05-02 18:32:53 UTC
  • mfrom: (2263.9.2 table-cache2)
  • Revision ID: me@mark.atwood.name-20110502183253-hchjxa5zq00jlsg4
mergeĀ lp:~olafvdspek/drizzle/table-cache2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1476
1476
                                 uint32_t select_field_count,
1477
1477
                                 bool is_if_not_exists)
1478
1478
{
1479
 
  Table *name_lock= NULL;
 
1479
  Table *name_lock= session->lock_table_name_if_not_cached(identifier);
1480
1480
  bool result;
1481
 
 
1482
 
  if (session->lock_table_name_if_not_cached(identifier, &name_lock))
1483
 
  {
1484
 
    result= true;
1485
 
  }
1486
 
  else if (name_lock == NULL)
 
1481
  if (name_lock == NULL)
1487
1482
  {
1488
1483
    if (is_if_not_exists)
1489
1484
    {
2103
2098
  }
2104
2099
  else // Standard table which will require locks.
2105
2100
  {
2106
 
    Table *name_lock= 0;
2107
 
 
2108
 
    if (session->lock_table_name_if_not_cached(destination_identifier, &name_lock))
2109
 
    {
2110
 
      if (name_lock)
2111
 
      {
2112
 
        boost::mutex::scoped_lock lock(table::Cache::mutex()); /* unlink open tables for create table like*/
2113
 
        session->unlink_open_table(name_lock);
2114
 
      }
2115
 
 
2116
 
      return res;
2117
 
    }
2118
 
 
 
2101
    Table *name_lock= session->lock_table_name_if_not_cached(destination_identifier);
2119
2102
    if (not name_lock)
2120
2103
    {
2121
2104
      table_exists= true;