~drizzle-trunk/drizzle/development

1143.3.4 by Jay Pipes
Adds INFORMATION_SCHEMA views for the transaction log:
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 *
4
 *  Copyright (C) 2008-2009 Sun Microsystems
5
 *
6
 *  Authors:
7
 *
8
 *  Jay Pipes <joinfu@sun.com>
9
 *
10
 *  This program is free software; you can redistribute it and/or modify
11
 *  it under the terms of the GNU General Public License as published by
12
 *  the Free Software Foundation; either version 2 of the License, or
13
 *  (at your option) any later version.
14
 *
15
 *  This program is distributed in the hope that it will be useful,
16
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 *  GNU General Public License for more details.
19
 *
20
 *  You should have received a copy of the GNU General Public License
21
 *  along with this program; if not, write to the Free Software
22
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
23
 */
24
25
/**
26
 * @file
27
 *
28
 * Defines the PRINT_TRANSACTION_MESSAGE() UDF
29
 *
30
 * @details
31
 *
32
 * PRINT_TRANSACTION_MESSAGE(filename, offset);
33
 *
34
 * prints a text representation of the transaction message
35
 * in the logfile at the supplied offset
36
 */
37
38
#ifndef PLUGIN_TRANSACTION_LOG_PRINT_TRANSACTION_MESSAGE_H
39
#define PLUGIN_TRANSACTION_LOG_PRINT_TRANSACTION_MESSAGE_H
40
41
#include <drizzled/item/func.h>
42
#include <drizzled/function/str/strfunc.h>
43
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
44
class PrintTransactionMessageFunction : public drizzled::Item_str_func
1143.3.4 by Jay Pipes
Adds INFORMATION_SCHEMA views for the transaction log:
45
{
46
public:
47
  PrintTransactionMessageFunction() : Item_str_func() {}
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
48
  drizzled::String *val_str(drizzled::String*);
1143.3.4 by Jay Pipes
Adds INFORMATION_SCHEMA views for the transaction log:
49
50
  void fix_length_and_dec();
51
52
  const char *func_name() const
53
  {
54
    return "print_transaction_message";
55
  }
56
57
  bool check_argument_count(int n)
58
  {
59
    return (n == 2);
60
  }
61
};
62
63
#endif /* PLUGIN_TRANSACTION_LOG_PRINT_TRANSACTION_MESSAGE_H */