~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Brian Aker
  • Date: 2010-10-10 11:41:42 UTC
  • mfrom: (1812.3.8 refactor)
  • Revision ID: brian@tangent.org-20101010114142-qfvzs75hz6kxjdcg
Merge in shared_ptr usage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1445
1445
                                 &key_info_buffer, &key_count,
1446
1446
                                 select_field_count))
1447
1447
  {
1448
 
    boost::mutex::scoped_lock lock(LOCK_open); /* CREATE TABLE (some confussion on naming, double check) */
 
1448
    boost_unique_lock_t lock(LOCK_open); /* CREATE TABLE (some confussion on naming, double check) */
1449
1449
    error= locked_create_event(session,
1450
1450
                               identifier,
1451
1451
                               create_info,
1511
1511
 
1512
1512
  if (name_lock)
1513
1513
  {
1514
 
    boost::mutex::scoped_lock lock(LOCK_open); /* Lock for removing name_lock during table create */
 
1514
    boost_unique_lock_t lock(LOCK_open); /* Lock for removing name_lock during table create */
1515
1515
    session->unlink_open_table(name_lock);
1516
1516
  }
1517
1517
 
1935
1935
        }
1936
1936
        else
1937
1937
        {
1938
 
          boost::mutex::scoped_lock lock(LOCK_open);
 
1938
          boost::unique_lock<boost::mutex> lock(LOCK_open);
1939
1939
          TableIdentifier identifier(table->table->getMutableShare()->getSchemaName(), table->table->getMutableShare()->getTableName());
1940
1940
          remove_table_from_cache(session, identifier, RTFC_NO_FLAG);
1941
1941
        }
2122
2122
    {
2123
2123
      if (name_lock)
2124
2124
      {
2125
 
        boost::mutex::scoped_lock lock(LOCK_open); /* unlink open tables for create table like*/
 
2125
        boost_unique_lock_t lock(LOCK_open); /* unlink open tables for create table like*/
2126
2126
        session->unlink_open_table(name_lock);
2127
2127
      }
2128
2128
 
2141
2141
    {
2142
2142
      bool was_created;
2143
2143
      {
2144
 
        boost::mutex::scoped_lock lock(LOCK_open); /* We lock for CREATE TABLE LIKE to copy table definition */
 
2144
        boost_unique_lock_t lock(LOCK_open); /* We lock for CREATE TABLE LIKE to copy table definition */
2145
2145
        was_created= create_table_wrapper(*session, create_table_proto, destination_identifier,
2146
2146
                                               src_identifier, is_engine_set);
2147
2147
      }
2160
2160
 
2161
2161
    if (name_lock)
2162
2162
    {
2163
 
      boost::mutex::scoped_lock lock(LOCK_open); /* unlink open tables for create table like*/
 
2163
      boost_unique_lock_t lock(LOCK_open); /* unlink open tables for create table like*/
2164
2164
      session->unlink_open_table(name_lock);
2165
2165
    }
2166
2166
  }