~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: David Shrewsbury
  • Date: 2011-01-20 14:08:19 UTC
  • mto: (2109.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 2110.
  • Revision ID: shrewsbury.dave@gmail.com-20110120140819-ctwi0etrhsaaumud
Initial change to use references to Session in TransactionServices methods rather than pointers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
void write_bin_log(Session *session, const std::string &query)
111
111
{
112
112
  TransactionServices &transaction_services= TransactionServices::singleton();
113
 
  transaction_services.rawStatement(session, query);
 
113
  transaction_services.rawStatement(*session, query);
114
114
}
115
115
 
116
116
/*
220
220
        if (plugin::StorageEngine::dropTable(*session, identifier, local_error))
221
221
        {
222
222
          TransactionServices &transaction_services= TransactionServices::singleton();
223
 
          transaction_services.dropTable(session, identifier, if_exists);
 
223
          transaction_services.dropTable(*session, identifier, if_exists);
224
224
        }
225
225
        else
226
226
        {
1394
1394
  if (table_proto.type() == message::Table::STANDARD && not internal_tmp_table)
1395
1395
  {
1396
1396
    TransactionServices &transaction_services= TransactionServices::singleton();
1397
 
    transaction_services.createTable(session, table_proto);
 
1397
    transaction_services.createTable(*session, table_proto);
1398
1398
  }
1399
1399
 
1400
1400
  return false;
1840
1840
      length= snprintf(buff, sizeof(buff), ER(ER_OPEN_AS_READONLY),
1841
1841
                       table_name);
1842
1842
      session->getClient()->store(buff, length);
1843
 
      transaction_services.autocommitOrRollback(session, false);
 
1843
      transaction_services.autocommitOrRollback(*session, false);
1844
1844
      session->endTransaction(COMMIT);
1845
1845
      session->close_thread_tables();
1846
1846
      lex->reset_query_tables_list(false);
1964
1964
        }
1965
1965
      }
1966
1966
    }
1967
 
    transaction_services.autocommitOrRollback(session, false);
 
1967
    transaction_services.autocommitOrRollback(*session, false);
1968
1968
    session->endTransaction(COMMIT);
1969
1969
    session->close_thread_tables();
1970
1970
    table->table=0;                             // For query cache
1976
1976
  return(false);
1977
1977
 
1978
1978
err:
1979
 
  transaction_services.autocommitOrRollback(session, true);
 
1979
  transaction_services.autocommitOrRollback(*session, true);
1980
1980
  session->endTransaction(ROLLBACK);
1981
1981
  session->close_thread_tables();                       // Shouldn't be needed
1982
1982
  if (table)
2069
2069
  if (success && not destination_identifier.isTmp())
2070
2070
  {
2071
2071
    TransactionServices &transaction_services= TransactionServices::singleton();
2072
 
    transaction_services.createTable(&session, new_table_message);
 
2072
    transaction_services.createTable(session, new_table_message);
2073
2073
  }
2074
2074
 
2075
2075
  return success;