~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/sql_binlog.cc

  • Committer: Monty Taylor
  • Date: 2008-07-15 21:40:58 UTC
  • mfrom: (77.1.113 codestyle32)
  • mto: This revision was merged to the branch mainline in revision 176.
  • Revision ID: mordred@camelot-20080715214058-rm3phulldos9xehv
Merged from codestyle.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
   along with this program; if not, write to the Free Software
14
14
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
15
15
 
16
 
#include <drizzled/server_includes.h>
 
16
#include "mysql_priv.h"
17
17
#include "rpl_rli.h"
18
 
#include <mysys/base64.h>
 
18
#include "base64.h"
19
19
 
20
20
/**
21
21
  Execute a BINLOG statement
43
43
    one here.  In this case, the first event we read must be a
44
44
    Format_description_event.
45
45
  */
46
 
  bool have_fd_event= true;
 
46
  my_bool have_fd_event= true;
47
47
  if (!thd->rli_fake)
48
48
  {
49
49
    thd->rli_fake= new Relay_log_info;
116
116
      /*
117
117
        Checking that the first event in the buffer is not truncated.
118
118
      */
119
 
      uint32_t event_len= uint4korr(bufptr + EVENT_LEN_OFFSET);
 
119
      ulong event_len= uint4korr(bufptr + EVENT_LEN_OFFSET);
120
120
      if (bytes_decoded < EVENT_LEN_OFFSET || (uint) bytes_decoded < event_len)
121
121
      {
122
122
        my_error(ER_SYNTAX_ERROR, MYF(0));
167
167
        not used at all: the rli_fake instance is used only for error
168
168
        reporting.
169
169
      */
 
170
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
170
171
      if (apply_event_and_update_pos(ev, thd, thd->rli_fake, false))
171
172
      {
172
173
        /*
176
177
        my_error(ER_UNKNOWN_ERROR, MYF(0), "Error executing BINLOG statement");
177
178
        goto end;
178
179
      }
 
180
#endif
179
181
 
180
182
      /*
181
183
        Format_description_log_event should not be deleted because it
193
195
 
194
196
end:
195
197
  thd->rli_fake->clear_tables_to_lock();
196
 
  free(buf);
 
198
  my_free(buf, MYF(MY_ALLOW_ZERO_PTR));
197
199
  return;
198
200
}