~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Lee Bieber
  • Date: 2010-12-23 23:11:00 UTC
  • mfrom: (2024.1.1 clean)
  • Revision ID: kalebral@gmail.com-20101223231100-0rqirgz7ugkl10yp
Merge Brian - session list cleanup

Show diffs side-by-side

added added

removed removed

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