~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/transaction_log/transaction_log.cc

  • Committer: Jay Pipes
  • Date: 2009-11-26 02:50:58 UTC
  • mto: (1234.1.1 push) (1237.2.10 push)
  • mto: This revision was merged to the branch mainline in revision 1229.
  • Revision ID: jpipes@serialcoder-20091126025058-gb502pid4gq9l7d8
Fixes information schema tests, adds a hexdump UDF for the transaction message.

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
#include "transaction_log_index.h"
76
76
#include "info_schema.h"
77
77
#include "print_transaction_message.h"
 
78
#include "hexdump_transaction_message.h"
78
79
#include "background_worker.h"
79
80
 
80
81
#include <unistd.h>
124
125
extern TransactionLogIndex *transaction_log_index;
125
126
 
126
127
/** Defined in print_transaction_message.cc */
127
 
extern plugin::Create_function<PrintTransactionMessageFunction> *print_transaction_message_func;
 
128
extern plugin::Create_function<PrintTransactionMessageFunction> *print_transaction_message_func_factory;
 
129
extern plugin::Create_function<HexdumpTransactionMessageFunction> *hexdump_transaction_message_func_factory;
128
130
 
129
131
TransactionLog::TransactionLog(string name_arg,
130
132
                               const string &in_log_file_path,
407
409
    registry.add(transaction_log_transactions_view);
408
410
 
409
411
    /* Setup the module's UDFs */
410
 
    print_transaction_message_func=
 
412
    print_transaction_message_func_factory=
411
413
      new plugin::Create_function<PrintTransactionMessageFunction>("print_transaction_message");
412
 
    registry.add(print_transaction_message_func);
 
414
    registry.add(print_transaction_message_func_factory);
 
415
 
 
416
    hexdump_transaction_message_func_factory=
 
417
      new plugin::Create_function<HexdumpTransactionMessageFunction>("hexdump_transaction_message");
 
418
    registry.add(hexdump_transaction_message_func_factory);
413
419
 
414
420
    /* Create and initialize the transaction log index */
415
421
    transaction_log_index= new (nothrow) TransactionLogIndex(*transaction_log);
459
465
    cleanupViews();
460
466
 
461
467
    /* Cleanup module UDFs */
462
 
    registry.remove(print_transaction_message_func);
463
 
    delete print_transaction_message_func;
 
468
    registry.remove(print_transaction_message_func_factory);
 
469
    delete print_transaction_message_func_factory;
 
470
    registry.remove(hexdump_transaction_message_func_factory);
 
471
    delete hexdump_transaction_message_func_factory;
464
472
  }
465
473
 
466
474
  return 0;