~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/handler/replication_dictionary.cc

  • Committer: Brian Aker
  • Date: 2011-02-22 06:12:02 UTC
  • mfrom: (2190.1.6 drizzle-build)
  • Revision ID: brian@tangent.org-20110222061202-k03czxykqy4x9hjs
List update, header fixes, multiple symbols, and David deletes some code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include "config.h"
 
21
#include <config.h>
22
22
 
23
23
#include "replication_dictionary.h"
24
 
#include "drizzled/current_session.h"
 
24
#include <drizzled/current_session.h>
25
25
 
26
 
extern "C" {
27
26
#include "univ.i"
28
27
#include "btr0sea.h"
29
28
#include "os0file.h"
53
52
#include "ha_prototypes.h"
54
53
#include "ut0mem.h"
55
54
#include "ibuf0ibuf.h"
56
 
#include "mysql_addons.h"
57
55
#include "create_replication.h"
58
56
#include "read_replication.h"
59
 
}
60
57
#include "handler0vars.h"
61
58
 
62
 
#include "drizzled/replication_services.h"
 
59
#include <drizzled/drizzled.h>
 
60
 
 
61
#include <drizzled/replication_services.h>
63
62
 
64
63
#include <google/protobuf/io/zero_copy_stream.h>
65
64
#include <google/protobuf/io/zero_copy_stream_impl.h>
77
76
  plugin::TableFunction("DATA_DICTIONARY", "INNODB_REPLICATION_LOG")
78
77
{
79
78
  add_field("TRANSACTION_ID", plugin::TableFunction::NUMBER, 0, false);
80
 
  add_field("TRANSACTION_MESSAGE_STRING", plugin::TableFunction::STRING, 2048, false);
81
 
  add_field("TRANSACTION_MESSAGE_BINARY", plugin::TableFunction::VARBINARY, 2048, false);
 
79
  add_field("TRANSACTION_SEGMENT_ID", plugin::TableFunction::NUMBER, 0, false);
 
80
  add_field("COMMIT_ID", plugin::TableFunction::NUMBER, 0, false);
 
81
  add_field("END_TIMESTAMP", plugin::TableFunction::NUMBER, 0, false);
 
82
  add_field("TRANSACTION_MESSAGE_STRING", plugin::TableFunction::STRING, transaction_message_threshold, false);
82
83
  add_field("TRANSACTION_LENGTH", plugin::TableFunction::NUMBER, 0, false);
83
84
}
84
85
 
100
101
  if (ret.message == NULL)
101
102
    return false;
102
103
 
103
 
  /* TABLE_NAME */
104
 
  push(static_cast<int64_t>(ret.id));
105
 
 
 
104
  /* Transaction ID */
 
105
  push(static_cast<uint64_t>(ret.id));
 
106
 
 
107
  /* Segment ID */
 
108
  push(static_cast<uint64_t>(ret.seg_id));
 
109
 
 
110
  push(static_cast<uint64_t>(ret.commit_id));
 
111
 
 
112
  push(static_cast<uint64_t>(ret.end_timestamp));
 
113
  
106
114
  /* Message in viewable format */
107
115
  bool result= message.ParseFromArray(ret.message, ret.message_length);
108
116
 
110
118
  {
111
119
    fprintf(stderr, _("Unable to parse transaction. Got error: %s.\n"), message.InitializationErrorString().c_str());
112
120
    push("error");
113
 
    push("error");
114
121
  }
115
122
  else
116
123
  {
117
124
    google::protobuf::TextFormat::PrintToString(message, &transaction_text);
118
125
    push(transaction_text);
119
 
    push(ret.message, ret.message_length);
120
126
  }
121
127
 
122
128
  push(static_cast<int64_t>(ret.message_length));