~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/transaction_log/module.cc

  • Committer: Olaf van der Spek
  • Date: 2011-03-23 09:26:52 UTC
  • mto: (2247.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 2248.
  • Revision ID: olafvdspek@gmail.com-20110323092652-d3e8lutxy8vu2frb
Remove std::nothrow from new()

Show diffs side-by-side

added added

removed removed

Lines of Context:
160
160
  if (sysvar_transaction_log_enabled)
161
161
  {
162
162
  
163
 
    transaction_log= new (nothrow) TransactionLog(sysvar_transaction_log_file,
 
163
    transaction_log= new TransactionLog(sysvar_transaction_log_file,
164
164
                                                  static_cast<int>(sysvar_transaction_log_flush_frequency),
165
165
                                                  sysvar_transaction_log_checksum_enabled);
166
166
 
182
182
 
183
183
    /* Create and initialize the transaction log index */
184
184
    transaction_log_index= new (nothrow) TransactionLogIndex(*transaction_log);
185
 
    if (transaction_log_index == NULL)
186
 
    {
187
 
      sql_perror(_("Failed to allocate the TransactionLogIndex instance"), sysvar_transaction_log_file);
188
 
      return 1;
189
 
    }
190
 
    else
191
 
    {
192
185
      /* Check to see if the index was not created properly */
193
186
      if (transaction_log_index->hasError())
194
187
      {
196
189
                      transaction_log_index->getErrorMessage().c_str());
197
190
        return 1;
198
191
      }
199
 
    }
200
192
 
201
193
    /* Create the applier plugin and register it */
202
 
    transaction_log_applier= new (nothrow) TransactionLogApplier("transaction_log_applier",
 
194
    transaction_log_applier= new TransactionLogApplier("transaction_log_applier",
203
195
                                                                 transaction_log, 
204
196
                                                                 transaction_log_index, 
205
197
                                                                 static_cast<uint32_t>(sysvar_transaction_log_num_write_buffers));
206
 
    if (transaction_log_applier == NULL)
207
 
    {
208
 
      sql_perror(_("Failed to allocate the TransactionLogApplier instance"), sysvar_transaction_log_file);
209
 
      return 1;
210
 
    }
211
198
    context.add(transaction_log_applier);
212
199
    ReplicationServices &replication_services= ReplicationServices::singleton();
213
200
    replication_services.attachApplier(transaction_log_applier,
215
202
 
216
203
    /* Setup DATA_DICTIONARY views */
217
204
 
218
 
    transaction_log_tool= new (nothrow) TransactionLogTool;
 
205
    transaction_log_tool= new TransactionLogTool;
219
206
    context.add(transaction_log_tool);
220
 
    transaction_log_entries_tool= new (nothrow) TransactionLogEntriesTool;
 
207
    transaction_log_entries_tool= new TransactionLogEntriesTool;
221
208
    context.add(transaction_log_entries_tool);
222
 
    transaction_log_transactions_tool= new (nothrow) TransactionLogTransactionsTool;
 
209
    transaction_log_transactions_tool= new TransactionLogTransactionsTool;
223
210
    context.add(transaction_log_transactions_tool);
224
211
 
225
212
    /* Setup the module's UDFs */