~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/transaction_services.h

MergeĀ fromĀ lp:~jaypipes/drizzle/serial_event_log

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 *
4
4
 *  Copyright (C) 2008-2009 Sun Microsystems
5
5
 *
 
6
 *  Authors:
 
7
 *
 
8
 *    Jay Pipes <joinfu@sun.com>
 
9
 *
6
10
 *  This program is free software; you can redistribute it and/or modify
7
11
 *  it under the terms of the GNU General Public License as published by
8
12
 *  the Free Software Foundation; version 2 of the License.
17
21
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
22
 */
19
23
 
20
 
#ifndef DRIZZLED_REPLICATOR_H
21
 
#define DRIZZLED_REPLICATOR_H
 
24
#ifndef DRIZZLED_TRANSACTION_SERVICES_H
 
25
#define DRIZZLED_TRANSACTION_SERVICES_H
22
26
 
23
27
#include "drizzled/atomics.h"
24
28
#include <vector>
160
164
   *
161
165
   * @param Pointer to the Session which has updated a record
162
166
   * @param Pointer to the Table containing update information
 
167
   * @param Pointer to the raw bytes representing the old record/row
 
168
   * @param Pointer to the raw bytes representing the new record/row 
163
169
   */
164
 
  void updateRecord(Session *in_session, Table *in_table, const unsigned char *, const unsigned char *);
 
170
  void updateRecord(Session *in_session, 
 
171
                    Table *in_table, 
 
172
                    const unsigned char *old_record, 
 
173
                    const unsigned char *new_record);
165
174
  /**
166
175
   * Creates a new DeleteRecord GPB message and pushes it to
167
176
   * replicators.
188
197
 
189
198
} /* end namespace drizzled */
190
199
 
191
 
#ifdef oldcode
192
 
/* todo, fill in this API */
193
 
/* these are the functions called by the rest of the drizzle server
194
 
   to do whatever this plugin does. */
195
 
bool replicator_session_init (Session *session);
196
 
bool replicator_write_row(Session *session, Table *table);
197
 
bool replicator_update_row(Session *session, Table *table,
198
 
                           const unsigned char *before,
199
 
                           const unsigned char *after);
200
 
bool replicator_delete_row(Session *session, Table *table);
201
 
 
202
 
/* The below control transactions */
203
 
bool replicator_end_transaction(Session *session, bool autocommit, bool commit);
204
 
bool replicator_prepare(Session *session);
205
 
bool replicator_statement(Session *session, const char *query, size_t query_length);
206
 
#endif /* oldcode */
207
 
#endif /* DRIZZLED_REPLICATOR_H */
 
200
#endif /* DRIZZLED_TRANSACTION_SERVICES_H */