~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/log_event.h

  • Committer: Brian Aker
  • Date: 2008-10-06 00:33:01 UTC
  • mto: This revision was merged to the branch mainline in revision 479.
  • Revision ID: brian@gir-20081006003301-uz4u8tyrws0lxq79
Removed binlog tool (we need to rewrite it) and removed all the hooks for
embedding the server in a client tool (--awful hack).

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#ifndef _log_event_h
33
33
#define _log_event_h
34
34
 
35
 
#if defined(USE_PRAGMA_INTERFACE) && !defined(DRIZZLE_CLIENT)
 
35
#if defined(USE_PRAGMA_INTERFACE)
36
36
#pragma interface                       /* gcc class implementation */
37
37
#endif
38
38
 
39
39
#include <mysys/my_bitmap.h>
40
40
#include "rpl_constants.h"
41
 
#ifndef DRIZZLE_CLIENT
42
41
#include "rpl_record.h"
43
42
#include "rpl_reporting.h"
44
 
#else
45
 
#include "my_decimal.h"
46
 
#endif
47
43
 
48
44
#include <drizzled/sql_string.h>       /* append_query_string() needs String declaration */
49
45
 
551
547
};
552
548
 
553
549
 
554
 
#ifndef DRIZZLE_CLIENT
555
550
class String;
556
551
class DRIZZLE_BIN_LOG;
557
552
class THD;
558
 
#endif
559
553
 
560
554
class Format_description_log_event;
561
555
class Relay_log_info;
562
556
 
563
 
#ifdef DRIZZLE_CLIENT
564
 
enum enum_base64_output_mode {
565
 
  BASE64_OUTPUT_NEVER= 0,
566
 
  BASE64_OUTPUT_AUTO= 1,
567
 
  BASE64_OUTPUT_ALWAYS= 2,
568
 
  BASE64_OUTPUT_UNSPEC= 3,
569
 
  /* insert new output modes here */
570
 
  BASE64_OUTPUT_MODE_COUNT
571
 
};
572
 
 
573
 
/*
574
 
  A structure for mysqlbinlog to know how to print events
575
 
 
576
 
  This structure is passed to the event's print() methods,
577
 
 
578
 
  There are two types of settings stored here:
579
 
  1. Last db, flags2, sql_mode etc comes from the last printed event.
580
 
     They are stored so that only the necessary USE and SET commands
581
 
     are printed.
582
 
  2. Other information on how to print the events, e.g. short_form,
583
 
     hexdump_from.  These are not dependent on the last event.
584
 
*/
585
 
typedef struct st_print_event_info
586
 
{
587
 
  /*
588
 
    Settings for database, sql_mode etc that comes from the last event
589
 
    that was printed.  We cache these so that we don't have to print
590
 
    them if they are unchanged.
591
 
  */
592
 
  // TODO: have the last catalog here ??
593
 
  char db[FN_REFLEN+1]; // TODO: make this a LEX_STRING when thd->db is
594
 
  bool flags2_inited;
595
 
  uint32_t flags2;
596
 
  bool sql_mode_inited;
597
 
  ulong sql_mode;               /* must be same as THD.variables.sql_mode */
598
 
  ulong auto_increment_increment, auto_increment_offset;
599
 
  bool charset_inited;
600
 
  char charset[6]; // 3 variables, each of them storable in 2 bytes
601
 
  char time_zone_str[MAX_TIME_ZONE_NAME_LENGTH];
602
 
  uint32_t lc_time_names_number;
603
 
  uint charset_database_number;
604
 
  uint thread_id;
605
 
  bool thread_id_printed;
606
 
 
607
 
  st_print_event_info();
608
 
 
609
 
  ~st_print_event_info() {
610
 
    close_cached_file(&head_cache);
611
 
    close_cached_file(&body_cache);
612
 
  }
613
 
  bool init_ok() /* tells if construction was successful */
614
 
    { return my_b_inited(&head_cache) && my_b_inited(&body_cache); }
615
 
 
616
 
 
617
 
  /* Settings on how to print the events */
618
 
  bool short_form;
619
 
  enum_base64_output_mode base64_output_mode;
620
 
  /*
621
 
    This is set whenever a Format_description_event is printed.
622
 
    Later, when an event is printed in base64, this flag is tested: if
623
 
    no Format_description_event has been seen, it is unsafe to print
624
 
    the base64 event, so an error message is generated.
625
 
  */
626
 
  bool printed_fd_event;
627
 
  my_off_t hexdump_from;
628
 
  uint8_t common_header_len;
629
 
  char delimiter[16];
630
 
 
631
 
  /*
632
 
     These two caches are used by the row-based replication events to
633
 
     collect the header information and the main body of the events
634
 
     making up a statement.
635
 
   */
636
 
  IO_CACHE head_cache;
637
 
  IO_CACHE body_cache;
638
 
} PRINT_EVENT_INFO;
639
 
#endif
640
 
 
641
557
/**
642
558
  the struct aggregates two paramenters that identify an event
643
559
  uniquely in scope of communication of a particular master and slave couple.
871
787
  */
872
788
  ulong slave_exec_mode;
873
789
 
874
 
#ifndef DRIZZLE_CLIENT
875
790
  THD* thd;
876
791
 
877
792
  Log_event();
899
814
    EVENTS.
900
815
  */
901
816
  static void init_show_field_list(List<Item>* field_list);
902
 
#ifdef HAVE_REPLICATION
903
817
  int net_send(Protocol *protocol, const char* log_name, my_off_t pos);
904
818
 
905
819
  /*
909
823
 
910
824
  virtual void pack_info(Protocol *protocol);
911
825
 
912
 
#endif /* HAVE_REPLICATION */
913
826
  virtual const char* get_db()
914
827
  {
915
828
    return thd ? thd->db : 0;
916
829
  }
917
 
#else
918
 
  Log_event() : temp_buf(0) {}
919
 
    /* avoid having to link mysqlbinlog against libpthread */
920
 
  static Log_event* read_log_event(IO_CACHE* file,
921
 
                                   const Format_description_log_event
922
 
                                   *description_event);
923
 
  /* print*() functions are used by mysqlbinlog */
924
 
  virtual void print(FILE* file, PRINT_EVENT_INFO* print_event_info) = 0;
925
 
  void print_timestamp(IO_CACHE* file, time_t *ts = 0);
926
 
  void print_header(IO_CACHE* file, PRINT_EVENT_INFO* print_event_info,
927
 
                    bool is_more);
928
 
  void print_base64(IO_CACHE* file, PRINT_EVENT_INFO* print_event_info,
929
 
                    bool is_more);
930
 
#endif
931
830
 
932
831
  static void *operator new(size_t size)
933
832
  {
944
843
  static void *operator new(size_t, void* ptr) { return ptr; }
945
844
  static void operator delete(void*, void*) { }
946
845
 
947
 
#ifndef DRIZZLE_CLIENT
948
846
  bool write_header(IO_CACHE* file, ulong data_length);
949
847
  virtual bool write(IO_CACHE* file)
950
848
  {
967
865
      return tmp_thd->start_time;
968
866
    return my_time(0);
969
867
  }
970
 
#endif
971
868
  virtual Log_event_type get_type_code() = 0;
972
869
  virtual bool is_valid() const = 0;
973
870
  virtual bool is_artificial_event() { return 0; }
1004
901
 
1005
902
  /* Return start of query time or current time */
1006
903
 
1007
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
1008
904
public:
1009
905
 
1010
906
  /**
1143
1039
     non-zero. The caller shall decrease the counter by one.
1144
1040
   */
1145
1041
  virtual enum_skip_reason do_shall_skip(Relay_log_info *rli);
1146
 
#endif
1147
1042
};
1148
1043
 
1149
1044
 
1558
1453
  uint lc_time_names_number; /* 0 means en_US */
1559
1454
  uint charset_database_number;
1560
1455
 
1561
 
#ifndef DRIZZLE_CLIENT
1562
1456
 
1563
1457
  Query_log_event(THD* thd_arg, const char* query_arg, ulong query_length,
1564
1458
                  bool using_trans, bool suppress_use,
1565
1459
                  THD::killed_state killed_err_arg= THD::KILLED_NO_VALUE);
1566
1460
  const char* get_db() { return db; }
1567
 
#ifdef HAVE_REPLICATION
1568
1461
  void pack_info(Protocol* protocol);
1569
 
#endif /* HAVE_REPLICATION */
1570
 
#else
1571
 
  void print_query_header(IO_CACHE* file, PRINT_EVENT_INFO* print_event_info);
1572
 
  void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
1573
 
#endif
1574
1462
 
1575
1463
  Query_log_event();
1576
1464
  Query_log_event(const char* buf, uint event_len,
1582
1470
      my_free((uchar*) data_buf, MYF(0));
1583
1471
  }
1584
1472
  Log_event_type get_type_code() { return QUERY_EVENT; }
1585
 
#ifndef DRIZZLE_CLIENT
1586
1473
  bool write(IO_CACHE* file);
1587
1474
  virtual bool write_post_header_for_derived(IO_CACHE* file __attribute__((unused)))
1588
1475
  { return false; }
1589
 
#endif
1590
1476
  bool is_valid() const { return query != 0; }
1591
1477
 
1592
1478
  /*
1597
1483
  /* Writes derived event-specific part of post header. */
1598
1484
 
1599
1485
public:        /* !!! Public in this patch to allow old usage */
1600
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
1601
1486
  virtual enum_skip_reason do_shall_skip(Relay_log_info *rli);
1602
1487
  virtual int do_apply_event(Relay_log_info const *rli);
1603
1488
  virtual int do_update_pos(Relay_log_info *rli);
1605
1490
  int do_apply_event(Relay_log_info const *rli,
1606
1491
                       const char *query_arg,
1607
1492
                       uint32_t q_len_arg);
1608
 
#endif /* HAVE_REPLICATION */
1609
1493
};
1610
1494
 
1611
1495
 
1612
 
#ifdef HAVE_REPLICATION
1613
 
 
1614
1496
/**
1615
1497
  @class Slave_log_event
1616
1498
 
1672
1554
  int master_log_len;
1673
1555
  uint16_t master_port;
1674
1556
 
1675
 
#ifndef DRIZZLE_CLIENT
1676
1557
  Slave_log_event(THD* thd_arg, Relay_log_info* rli);
1677
1558
  void pack_info(Protocol* protocol);
1678
 
#else
1679
 
  void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
1680
 
#endif
1681
1559
 
1682
1560
  Slave_log_event(const char* buf, uint event_len);
1683
1561
  ~Slave_log_event();
1684
1562
  int get_data_size();
1685
1563
  bool is_valid() const { return master_host != 0; }
1686
1564
  Log_event_type get_type_code() { return SLAVE_EVENT; }
1687
 
#ifndef DRIZZLE_CLIENT
1688
1565
  bool write(IO_CACHE* file);
1689
 
#endif
1690
1566
 
1691
1567
private:
1692
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
1693
1568
  virtual int do_apply_event(Relay_log_info const* rli);
1694
 
#endif
1695
1569
};
1696
1570
 
1697
 
#endif /* HAVE_REPLICATION */
1698
 
 
1699
1571
 
1700
1572
/**
1701
1573
  @class Load_log_event
1943
1815
    return local_fname;
1944
1816
  }
1945
1817
 
1946
 
#ifndef DRIZZLE_CLIENT
1947
1818
  String field_lens_buf;
1948
1819
  String fields_buf;
1949
1820
 
1954
1825
  void set_fields(const char* db, List<Item> &fields_arg,
1955
1826
                  Name_resolution_context *context);
1956
1827
  const char* get_db() { return db; }
1957
 
#ifdef HAVE_REPLICATION
1958
1828
  void pack_info(Protocol* protocol);
1959
 
#endif /* HAVE_REPLICATION */
1960
 
#else
1961
 
  void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
1962
 
  void print(FILE* file, PRINT_EVENT_INFO* print_event_info, bool commented);
1963
 
#endif
1964
1829
 
1965
1830
  /*
1966
1831
    Note that for all the events related to LOAD DATA (Load_log_event,
1976
1841
  {
1977
1842
    return sql_ex.new_format() ? NEW_LOAD_EVENT: LOAD_EVENT;
1978
1843
  }
1979
 
#ifndef DRIZZLE_CLIENT
1980
1844
  bool write_data_header(IO_CACHE* file);
1981
1845
  bool write_data_body(IO_CACHE* file);
1982
 
#endif
1983
1846
  bool is_valid() const { return table_name != 0; }
1984
1847
  int get_data_size()
1985
1848
  {
1989
1852
  }
1990
1853
 
1991
1854
public:        /* !!! Public in this patch to allow old usage */
1992
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
1993
1855
  virtual int do_apply_event(Relay_log_info const* rli)
1994
1856
  {
1995
1857
    return do_apply_event(thd->slave_net,rli,0);
1997
1859
 
1998
1860
  int do_apply_event(NET *net, Relay_log_info const *rli,
1999
1861
                     bool use_rli_only_for_errors);
2000
 
#endif
2001
1862
};
2002
1863
 
2003
1864
extern char server_version[SERVER_VERSION_LENGTH];
2057
1918
  */
2058
1919
  bool dont_set_created;
2059
1920
 
2060
 
#ifndef DRIZZLE_CLIENT
2061
1921
  Start_log_event_v3();
2062
 
#ifdef HAVE_REPLICATION
2063
1922
  void pack_info(Protocol* protocol);
2064
 
#endif /* HAVE_REPLICATION */
2065
 
#else
2066
 
  Start_log_event_v3() {}
2067
 
  void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
2068
 
#endif
2069
1923
 
2070
1924
  Start_log_event_v3(const char* buf,
2071
1925
                     const Format_description_log_event* description_event);
2072
1926
  ~Start_log_event_v3() {}
2073
1927
  Log_event_type get_type_code() { return START_EVENT_V3;}
2074
 
#ifndef DRIZZLE_CLIENT
2075
1928
  bool write(IO_CACHE* file);
2076
 
#endif
2077
1929
  bool is_valid() const { return 1; }
2078
1930
  int get_data_size()
2079
1931
  {
2082
1934
  virtual bool is_artificial_event() { return artificial_event; }
2083
1935
 
2084
1936
protected:
2085
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
2086
1937
  virtual int do_apply_event(Relay_log_info const *rli);
2087
1938
  virtual enum_skip_reason do_shall_skip(Relay_log_info*)
2088
1939
  {
2095
1946
    else
2096
1947
      return Log_event::EVENT_SKIP_NOT;
2097
1948
  }
2098
 
#endif
2099
1949
};
2100
1950
 
2101
1951
 
2134
1984
    my_free((uchar*)post_header_len, MYF(MY_ALLOW_ZERO_PTR));
2135
1985
  }
2136
1986
  Log_event_type get_type_code() { return FORMAT_DESCRIPTION_EVENT;}
2137
 
#ifndef DRIZZLE_CLIENT
2138
1987
  bool write(IO_CACHE* file);
2139
 
#endif
2140
1988
  bool is_valid() const
2141
1989
  {
2142
1990
    return ((common_header_len >= ((binlog_version==1) ? OLD_HEADER_LEN :
2156
2004
  void calc_server_version_split();
2157
2005
 
2158
2006
protected:
2159
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
2160
2007
  virtual int do_apply_event(Relay_log_info const *rli);
2161
2008
  virtual int do_update_pos(Relay_log_info *rli);
2162
2009
  virtual enum_skip_reason do_shall_skip(Relay_log_info *rli);
2163
 
#endif
2164
2010
};
2165
2011
 
2166
2012
 
2207
2053
  uint64_t val;
2208
2054
  uchar type;
2209
2055
 
2210
 
#ifndef DRIZZLE_CLIENT
2211
2056
  Intvar_log_event(THD* thd_arg,uchar type_arg, uint64_t val_arg)
2212
2057
    :Log_event(thd_arg,0,0),val(val_arg),type(type_arg)
2213
2058
  {}
2214
 
#ifdef HAVE_REPLICATION
2215
2059
  void pack_info(Protocol* protocol);
2216
 
#endif /* HAVE_REPLICATION */
2217
 
#else
2218
 
  void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
2219
 
#endif
2220
2060
 
2221
2061
  Intvar_log_event(const char* buf,
2222
2062
                   const Format_description_log_event *description_event);
2224
2064
  Log_event_type get_type_code() { return INTVAR_EVENT;}
2225
2065
  const char* get_var_type_name();
2226
2066
  int get_data_size() { return  9; /* sizeof(type) + sizeof(val) */;}
2227
 
#ifndef DRIZZLE_CLIENT
2228
2067
  bool write(IO_CACHE* file);
2229
 
#endif
2230
2068
  bool is_valid() const { return 1; }
2231
2069
 
2232
2070
private:
2233
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
2234
2071
  virtual int do_apply_event(Relay_log_info const *rli);
2235
2072
  virtual int do_update_pos(Relay_log_info *rli);
2236
2073
  virtual enum_skip_reason do_shall_skip(Relay_log_info *rli);
2237
 
#endif
2238
2074
};
2239
2075
 
2240
2076
 
2282
2118
  uint64_t seed1;
2283
2119
  uint64_t seed2;
2284
2120
 
2285
 
#ifndef DRIZZLE_CLIENT
2286
2121
  Rand_log_event(THD* thd_arg, uint64_t seed1_arg, uint64_t seed2_arg)
2287
2122
    :Log_event(thd_arg,0,0),seed1(seed1_arg),seed2(seed2_arg)
2288
2123
  {}
2289
 
#ifdef HAVE_REPLICATION
2290
2124
  void pack_info(Protocol* protocol);
2291
 
#endif /* HAVE_REPLICATION */
2292
 
#else
2293
 
  void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
2294
 
#endif
2295
2125
 
2296
2126
  Rand_log_event(const char* buf,
2297
2127
                 const Format_description_log_event *description_event);
2298
2128
  ~Rand_log_event() {}
2299
2129
  Log_event_type get_type_code() { return RAND_EVENT;}
2300
2130
  int get_data_size() { return 16; /* sizeof(uint64_t) * 2*/ }
2301
 
#ifndef DRIZZLE_CLIENT
2302
2131
  bool write(IO_CACHE* file);
2303
 
#endif
2304
2132
  bool is_valid() const { return 1; }
2305
2133
 
2306
2134
private:
2307
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
2308
2135
  virtual int do_apply_event(Relay_log_info const *rli);
2309
2136
  virtual int do_update_pos(Relay_log_info *rli);
2310
2137
  virtual enum_skip_reason do_shall_skip(Relay_log_info *rli);
2311
 
#endif
2312
2138
};
2313
2139
 
2314
2140
/**
2319
2145
 
2320
2146
  @section Xid_log_event_binary_format Binary Format  
2321
2147
*/
2322
 
#ifdef DRIZZLE_CLIENT
2323
 
typedef uint64_t my_xid; // this line is the same as in handler.h
2324
 
#endif
2325
 
 
2326
2148
class Xid_log_event: public Log_event
2327
2149
{
2328
2150
 public:
2329
2151
   my_xid xid;
2330
2152
 
2331
 
#ifndef DRIZZLE_CLIENT
2332
2153
  Xid_log_event(THD* thd_arg, my_xid x): Log_event(thd_arg,0,0), xid(x) {}
2333
 
#ifdef HAVE_REPLICATION
2334
2154
  void pack_info(Protocol* protocol);
2335
 
#endif /* HAVE_REPLICATION */
2336
 
#else
2337
 
  void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
2338
 
#endif
2339
2155
 
2340
2156
  Xid_log_event(const char* buf,
2341
2157
                const Format_description_log_event *description_event);
2342
2158
  ~Xid_log_event() {}
2343
2159
  Log_event_type get_type_code() { return XID_EVENT;}
2344
2160
  int get_data_size() { return sizeof(xid); }
2345
 
#ifndef DRIZZLE_CLIENT
2346
2161
  bool write(IO_CACHE* file);
2347
 
#endif
2348
2162
  bool is_valid() const { return 1; }
2349
2163
 
2350
2164
private:
2351
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
2352
2165
  virtual int do_apply_event(Relay_log_info const *rli);
2353
2166
  enum_skip_reason do_shall_skip(Relay_log_info *rli);
2354
 
#endif
2355
2167
};
2356
2168
 
2357
2169
/**
2373
2185
  Item_result type;
2374
2186
  uint charset_number;
2375
2187
  bool is_null;
2376
 
#ifndef DRIZZLE_CLIENT
2377
2188
  User_var_log_event(THD* thd_arg __attribute__((unused)),
2378
2189
                     char *name_arg, uint name_len_arg,
2379
2190
                     char *val_arg, ulong val_len_arg, Item_result type_arg,
2382
2193
    val_len(val_len_arg), type(type_arg), charset_number(charset_number_arg)
2383
2194
    { is_null= !val; }
2384
2195
  void pack_info(Protocol* protocol);
2385
 
#else
2386
 
  void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
2387
 
#endif
2388
2196
 
2389
2197
  User_var_log_event(const char* buf,
2390
2198
                     const Format_description_log_event *description_event);
2391
2199
  ~User_var_log_event() {}
2392
2200
  Log_event_type get_type_code() { return USER_VAR_EVENT;}
2393
 
#ifndef DRIZZLE_CLIENT
2394
2201
  bool write(IO_CACHE* file);
2395
 
#endif
2396
2202
  bool is_valid() const { return 1; }
2397
2203
 
2398
2204
private:
2399
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
2400
2205
  virtual int do_apply_event(Relay_log_info const *rli);
2401
2206
  virtual int do_update_pos(Relay_log_info *rli);
2402
2207
  virtual enum_skip_reason do_shall_skip(Relay_log_info *rli);
2403
 
#endif
2404
2208
};
2405
2209
 
2406
2210
 
2415
2219
class Stop_log_event: public Log_event
2416
2220
{
2417
2221
public:
2418
 
#ifndef DRIZZLE_CLIENT
2419
2222
  Stop_log_event() :Log_event()
2420
2223
  {}
2421
 
#else
2422
 
  void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
2423
 
#endif
2424
2224
 
2425
2225
  Stop_log_event(const char* buf,
2426
2226
                 const Format_description_log_event *description_event):
2431
2231
  bool is_valid() const { return 1; }
2432
2232
 
2433
2233
private:
2434
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
2435
2234
  virtual int do_update_pos(Relay_log_info *rli);
2436
2235
  virtual enum_skip_reason do_shall_skip(Relay_log_info *rli __attribute__((unused)))
2437
2236
  {
2444
2243
    else
2445
2244
      return Log_event::EVENT_SKIP_NOT;
2446
2245
  }
2447
 
#endif
2448
2246
};
2449
2247
 
2450
2248
/**
2506
2304
  uint64_t pos;
2507
2305
  uint ident_len;
2508
2306
  uint flags;
2509
 
#ifndef DRIZZLE_CLIENT
2510
2307
  Rotate_log_event(const char* new_log_ident_arg,
2511
2308
                   uint ident_len_arg,
2512
2309
                   uint64_t pos_arg, uint flags);
2513
 
#ifdef HAVE_REPLICATION
2514
2310
  void pack_info(Protocol* protocol);
2515
 
#endif /* HAVE_REPLICATION */
2516
 
#else
2517
 
  void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
2518
 
#endif
2519
2311
 
2520
2312
  Rotate_log_event(const char* buf, uint event_len,
2521
2313
                   const Format_description_log_event* description_event);
2527
2319
  Log_event_type get_type_code() { return ROTATE_EVENT;}
2528
2320
  int get_data_size() { return  ident_len + ROTATE_HEADER_LEN;}
2529
2321
  bool is_valid() const { return new_log_ident != 0; }
2530
 
#ifndef DRIZZLE_CLIENT
2531
2322
  bool write(IO_CACHE* file);
2532
 
#endif
2533
2323
 
2534
2324
private:
2535
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
2536
2325
  virtual int do_update_pos(Relay_log_info *rli);
2537
2326
  virtual enum_skip_reason do_shall_skip(Relay_log_info *rli);
2538
 
#endif
2539
2327
};
2540
2328
 
2541
2329
 
2563
2351
  uint file_id;
2564
2352
  bool inited_from_old;
2565
2353
 
2566
 
#ifndef DRIZZLE_CLIENT
2567
2354
  Create_file_log_event(THD* thd, sql_exchange* ex, const char* db_arg,
2568
2355
                        const char* table_name_arg,
2569
2356
                        List<Item>& fields_arg,
2570
2357
                        enum enum_duplicates handle_dup, bool ignore,
2571
2358
                        uchar* block_arg, uint block_len_arg,
2572
2359
                        bool using_trans);
2573
 
#ifdef HAVE_REPLICATION
2574
2360
  void pack_info(Protocol* protocol);
2575
 
#endif /* HAVE_REPLICATION */
2576
 
#else
2577
 
  void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
2578
 
  void print(FILE* file, PRINT_EVENT_INFO* print_event_info,
2579
 
             bool enable_local);
2580
 
#endif
2581
2361
 
2582
2362
  Create_file_log_event(const char* buf, uint event_len,
2583
2363
                        const Format_description_log_event* description_event);
2597
2377
            4 + 1 + block_len);
2598
2378
  }
2599
2379
  bool is_valid() const { return inited_from_old || block != 0; }
2600
 
#ifndef DRIZZLE_CLIENT
2601
2380
  bool write_data_header(IO_CACHE* file);
2602
2381
  bool write_data_body(IO_CACHE* file);
2603
2382
  /*
2605
2384
    write it as Load event - used on the slave
2606
2385
  */
2607
2386
  bool write_base(IO_CACHE* file);
2608
 
#endif
2609
2387
 
2610
2388
private:
2611
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
2612
2389
  virtual int do_apply_event(Relay_log_info const *rli);
2613
 
#endif
2614
2390
};
2615
2391
 
2616
2392
 
2639
2415
  */
2640
2416
  const char* db;
2641
2417
 
2642
 
#ifndef DRIZZLE_CLIENT
2643
2418
  Append_block_log_event(THD* thd, const char* db_arg, uchar* block_arg,
2644
2419
                         uint block_len_arg, bool using_trans);
2645
 
#ifdef HAVE_REPLICATION
2646
2420
  void pack_info(Protocol* protocol);
2647
2421
  virtual int get_create_or_append() const;
2648
 
#endif /* HAVE_REPLICATION */
2649
 
#else
2650
 
  void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
2651
 
#endif
2652
2422
 
2653
2423
  Append_block_log_event(const char* buf, uint event_len,
2654
2424
                         const Format_description_log_event
2657
2427
  Log_event_type get_type_code() { return APPEND_BLOCK_EVENT;}
2658
2428
  int get_data_size() { return  block_len + APPEND_BLOCK_HEADER_LEN ;}
2659
2429
  bool is_valid() const { return block != 0; }
2660
 
#ifndef DRIZZLE_CLIENT
2661
2430
  bool write(IO_CACHE* file);
2662
2431
  const char* get_db() { return db; }
2663
 
#endif
2664
2432
 
2665
2433
private:
2666
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
2667
2434
  virtual int do_apply_event(Relay_log_info const *rli);
2668
 
#endif
2669
2435
};
2670
2436
 
2671
2437
 
2681
2447
  uint file_id;
2682
2448
  const char* db; /* see comment in Append_block_log_event */
2683
2449
 
2684
 
#ifndef DRIZZLE_CLIENT
2685
2450
  Delete_file_log_event(THD* thd, const char* db_arg, bool using_trans);
2686
 
#ifdef HAVE_REPLICATION
2687
2451
  void pack_info(Protocol* protocol);
2688
 
#endif /* HAVE_REPLICATION */
2689
 
#else
2690
 
  void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
2691
 
  void print(FILE* file, PRINT_EVENT_INFO* print_event_info,
2692
 
             bool enable_local);
2693
 
#endif
2694
2452
 
2695
2453
  Delete_file_log_event(const char* buf, uint event_len,
2696
2454
                        const Format_description_log_event* description_event);
2698
2456
  Log_event_type get_type_code() { return DELETE_FILE_EVENT;}
2699
2457
  int get_data_size() { return DELETE_FILE_HEADER_LEN ;}
2700
2458
  bool is_valid() const { return file_id != 0; }
2701
 
#ifndef DRIZZLE_CLIENT
2702
2459
  bool write(IO_CACHE* file);
2703
2460
  const char* get_db() { return db; }
2704
 
#endif
2705
2461
 
2706
2462
private:
2707
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
2708
2463
  virtual int do_apply_event(Relay_log_info const *rli);
2709
 
#endif
2710
2464
};
2711
2465
 
2712
2466
 
2722
2476
  uint file_id;
2723
2477
  const char* db; /* see comment in Append_block_log_event */
2724
2478
 
2725
 
#ifndef DRIZZLE_CLIENT
2726
2479
  Execute_load_log_event(THD* thd, const char* db_arg, bool using_trans);
2727
 
#ifdef HAVE_REPLICATION
2728
2480
  void pack_info(Protocol* protocol);
2729
 
#endif /* HAVE_REPLICATION */
2730
 
#else
2731
 
  void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
2732
 
#endif
2733
2481
 
2734
2482
  Execute_load_log_event(const char* buf, uint event_len,
2735
2483
                         const Format_description_log_event
2738
2486
  Log_event_type get_type_code() { return EXEC_LOAD_EVENT;}
2739
2487
  int get_data_size() { return  EXEC_LOAD_HEADER_LEN ;}
2740
2488
  bool is_valid() const { return file_id != 0; }
2741
 
#ifndef DRIZZLE_CLIENT
2742
2489
  bool write(IO_CACHE* file);
2743
2490
  const char* get_db() { return db; }
2744
 
#endif
2745
2491
 
2746
2492
private:
2747
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
2748
2493
  virtual int do_apply_event(Relay_log_info const *rli);
2749
 
#endif
2750
2494
};
2751
2495
 
2752
2496
 
2762
2506
class Begin_load_query_log_event: public Append_block_log_event
2763
2507
{
2764
2508
public:
2765
 
#ifndef DRIZZLE_CLIENT
2766
2509
  Begin_load_query_log_event(THD* thd_arg, const char *db_arg,
2767
2510
                             uchar* block_arg, uint block_len_arg,
2768
2511
                             bool using_trans);
2769
 
#ifdef HAVE_REPLICATION
2770
2512
  Begin_load_query_log_event(THD* thd);
2771
2513
  int get_create_or_append() const;
2772
 
#endif /* HAVE_REPLICATION */
2773
 
#endif
2774
2514
  Begin_load_query_log_event(const char* buf, uint event_len,
2775
2515
                             const Format_description_log_event
2776
2516
                             *description_event);
2777
2517
  ~Begin_load_query_log_event() {}
2778
2518
  Log_event_type get_type_code() { return BEGIN_LOAD_QUERY_EVENT; }
2779
2519
private:
2780
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
2781
2520
  virtual enum_skip_reason do_shall_skip(Relay_log_info *rli);
2782
 
#endif
2783
2521
};
2784
2522
 
2785
2523
 
2813
2551
  */
2814
2552
  enum_load_dup_handling dup_handling;
2815
2553
 
2816
 
#ifndef DRIZZLE_CLIENT
2817
2554
  Execute_load_query_log_event(THD* thd, const char* query_arg,
2818
2555
                               ulong query_length, uint fn_pos_start_arg,
2819
2556
                               uint fn_pos_end_arg,
2821
2558
                               bool using_trans, bool suppress_use,
2822
2559
                               THD::killed_state
2823
2560
                               killed_err_arg= THD::KILLED_NO_VALUE);
2824
 
#ifdef HAVE_REPLICATION
2825
2561
  void pack_info(Protocol* protocol);
2826
 
#endif /* HAVE_REPLICATION */
2827
 
#else
2828
 
  void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
2829
 
  /* Prints the query as LOAD DATA LOCAL and with rewritten filename */
2830
 
  void print(FILE* file, PRINT_EVENT_INFO* print_event_info,
2831
 
             const char *local_fname);
2832
 
#endif
2833
2562
  Execute_load_query_log_event(const char* buf, uint event_len,
2834
2563
                               const Format_description_log_event
2835
2564
                               *description_event);
2839
2568
  bool is_valid() const { return Query_log_event::is_valid() && file_id != 0; }
2840
2569
 
2841
2570
  ulong get_post_header_size_for_derived();
2842
 
#ifndef DRIZZLE_CLIENT
2843
2571
  bool write_post_header_for_derived(IO_CACHE* file);
2844
 
#endif
2845
2572
 
2846
2573
private:
2847
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
2848
2574
  virtual int do_apply_event(Relay_log_info const *rli);
2849
 
#endif
2850
 
};
2851
 
 
2852
 
 
2853
 
#ifdef DRIZZLE_CLIENT
2854
 
/**
2855
 
  @class Unknown_log_event
2856
 
 
2857
 
  @section Unknown_log_event_binary_format Binary Format
2858
 
*/
2859
 
class Unknown_log_event: public Log_event
2860
 
{
2861
 
public:
2862
 
  /*
2863
 
    Even if this is an unknown event, we still pass description_event to
2864
 
    Log_event's ctor, this way we can extract maximum information from the
2865
 
    event's header (the unique ID for example).
2866
 
  */
2867
 
  Unknown_log_event(const char* buf,
2868
 
                    const Format_description_log_event *description_event):
2869
 
    Log_event(buf, description_event)
2870
 
  {}
2871
 
  ~Unknown_log_event() {}
2872
 
  void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
2873
 
  Log_event_type get_type_code() { return UNKNOWN_EVENT;}
2874
 
  bool is_valid() const { return 1; }
2875
 
};
2876
 
#endif
 
2575
};
 
2576
 
 
2577
 
2877
2578
char *str_to_hex(char *to, const char *from, uint len);
2878
2579
 
2879
2580
/**
3167
2868
  void clear_flags(flag_set flag) { m_flags &= ~flag; }
3168
2869
  flag_set get_flags(flag_set flag) const { return m_flags & flag; }
3169
2870
 
3170
 
#ifndef DRIZZLE_CLIENT
3171
2871
  Table_map_log_event(THD *thd, Table *tbl, ulong tid, 
3172
2872
                      bool is_transactional, uint16_t flags);
3173
 
#endif
3174
 
#ifdef HAVE_REPLICATION
3175
2873
  Table_map_log_event(const char *buf, uint event_len, 
3176
2874
                      const Format_description_log_event *description_event);
3177
 
#endif
3178
2875
 
3179
2876
  ~Table_map_log_event();
3180
2877
 
3182
2879
  virtual bool is_valid() const { return m_memory != NULL; /* we check malloc */ }
3183
2880
 
3184
2881
  virtual int get_data_size() { return m_data_size; } 
3185
 
#ifndef DRIZZLE_CLIENT
3186
2882
  virtual int save_field_metadata();
3187
2883
  virtual bool write_data_header(IO_CACHE *file);
3188
2884
  virtual bool write_data_body(IO_CACHE *file);
3189
2885
  virtual const char *get_db() { return m_dbnam; }
3190
 
#endif
3191
 
 
3192
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
3193
2886
  virtual void pack_info(Protocol *protocol);
3194
 
#endif
3195
 
 
3196
 
#ifdef DRIZZLE_CLIENT
3197
 
  virtual void print(FILE *file, PRINT_EVENT_INFO *print_event_info);
3198
 
#endif
3199
 
 
3200
2887
 
3201
2888
private:
3202
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
3203
2889
  virtual int do_apply_event(Relay_log_info const *rli);
3204
2890
  virtual int do_update_pos(Relay_log_info *rli);
3205
2891
  virtual enum_skip_reason do_shall_skip(Relay_log_info *rli);
3206
 
#endif
3207
2892
 
3208
 
#ifndef DRIZZLE_CLIENT
3209
2893
  Table         *m_table;
3210
 
#endif
3211
2894
  char const    *m_dbnam;
3212
2895
  size_t         m_dblen;
3213
2896
  char const    *m_tblnam;
3301
2984
  void clear_flags(flag_set flags_arg) { m_flags &= ~flags_arg; }
3302
2985
  flag_set get_flags(flag_set flags_arg) const { return m_flags & flags_arg; }
3303
2986
 
3304
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
3305
2987
  virtual void pack_info(Protocol *protocol);
3306
 
#endif
3307
 
 
3308
 
#ifdef DRIZZLE_CLIENT
3309
 
  /* not for direct call, each derived has its own ::print() */
3310
 
  virtual void print(FILE *file, PRINT_EVENT_INFO *print_event_info)= 0;
3311
 
#endif
3312
 
 
3313
 
#ifndef DRIZZLE_CLIENT
 
2988
 
3314
2989
  int add_row_data(uchar *data, size_t length)
3315
2990
  {
3316
2991
    return do_add_row_data(data,length); 
3317
2992
  }
3318
 
#endif
3319
2993
 
3320
2994
  /* Member functions to implement superclass interface */
3321
2995
  virtual int get_data_size();
3324
2998
  size_t get_width() const          { return m_width; }
3325
2999
  ulong get_table_id() const        { return m_table_id; }
3326
3000
 
3327
 
#ifndef DRIZZLE_CLIENT
3328
3001
  virtual bool write_data_header(IO_CACHE *file);
3329
3002
  virtual bool write_data_body(IO_CACHE *file);
3330
3003
  virtual const char *get_db() { return m_table->s->db.str; }
3331
 
#endif
3332
3004
  /*
3333
3005
    Check that malloc() succeeded in allocating memory for the rows
3334
3006
    buffer and the COLS vector. Checking that an Update_rows_log_event
3347
3019
     The constructors are protected since you're supposed to inherit
3348
3020
     this class, not create instances of this class.
3349
3021
  */
3350
 
#ifndef DRIZZLE_CLIENT
3351
3022
  Rows_log_event(THD*, Table*, ulong table_id, 
3352
3023
                 MY_BITMAP const *cols, bool is_transactional);
3353
 
#endif
3354
3024
  Rows_log_event(const char *row_data, uint event_len, 
3355
3025
                 Log_event_type event_type,
3356
3026
                 const Format_description_log_event *description_event);
3357
3027
 
3358
 
#ifdef DRIZZLE_CLIENT
3359
 
  void print_helper(FILE *, PRINT_EVENT_INFO *, char const *const name);
3360
 
#endif
3361
 
 
3362
 
#ifndef DRIZZLE_CLIENT
3363
3028
  virtual int do_add_row_data(uchar *data, size_t length);
3364
 
#endif
3365
3029
 
3366
 
#ifndef DRIZZLE_CLIENT
3367
3030
  Table *m_table;               /* The table the rows belong to */
3368
 
#endif
3369
3031
  ulong       m_table_id;       /* Table ID */
3370
3032
  MY_BITMAP   m_cols;           /* Bitmap denoting columns available */
3371
3033
  ulong       m_width;          /* The width of the columns bitmap */
3392
3054
 
3393
3055
  /* helper functions */
3394
3056
 
3395
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
3396
3057
  const uchar *m_curr_row;     /* Start of the row being processed */
3397
3058
  const uchar *m_curr_row_end; /* One-after the end of the current row */
3398
3059
  uchar    *m_key;      /* Buffer to keep key value during searches */
3413
3074
    ASSERT_OR_RETURN_ERROR(m_curr_row_end <= m_rows_end, HA_ERR_CORRUPT_EVENT);
3414
3075
    return result;
3415
3076
  }
3416
 
#endif
3417
3077
 
3418
3078
private:
3419
3079
 
3420
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
3421
3080
  virtual int do_apply_event(Relay_log_info const *rli);
3422
3081
  virtual int do_update_pos(Relay_log_info *rli);
3423
3082
  virtual enum_skip_reason do_shall_skip(Relay_log_info *rli);
3472
3131
      
3473
3132
  */
3474
3133
  virtual int do_exec_row(const Relay_log_info *const rli) = 0;
3475
 
#endif /* !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION) */
3476
3134
 
3477
3135
  friend class Old_rows_log_event;
3478
3136
};
3495
3153
    TYPE_CODE = WRITE_ROWS_EVENT
3496
3154
  };
3497
3155
 
3498
 
#if !defined(DRIZZLE_CLIENT)
3499
3156
  Write_rows_log_event(THD*, Table*, ulong table_id, 
3500
3157
                       bool is_transactional);
3501
 
#endif
3502
 
#ifdef HAVE_REPLICATION
3503
3158
  Write_rows_log_event(const char *buf, uint event_len, 
3504
3159
                       const Format_description_log_event *description_event);
3505
 
#endif
3506
 
#if !defined(DRIZZLE_CLIENT) 
3507
3160
  static bool binlog_row_logging_function(THD *thd, Table *table,
3508
3161
                                          bool is_transactional,
3509
3162
                                          const uchar *before_record
3512
3165
  {
3513
3166
    return thd->binlog_write_row(table, is_transactional, after_record);
3514
3167
  }
3515
 
#endif
3516
3168
 
3517
3169
private:
3518
3170
  virtual Log_event_type get_type_code() { return (Log_event_type)TYPE_CODE; }
3519
3171
 
3520
 
#ifdef DRIZZLE_CLIENT
3521
 
  void print(FILE *file, PRINT_EVENT_INFO *print_event_info);
3522
 
#endif
3523
 
 
3524
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
3525
3172
  virtual int do_before_row_operations(const Slave_reporting_capability *const);
3526
3173
  virtual int do_after_row_operations(const Slave_reporting_capability *const,int);
3527
3174
  virtual int do_exec_row(const Relay_log_info *const);
3528
 
#endif
3529
3175
};
3530
3176
 
3531
3177
 
3550
3196
    TYPE_CODE = UPDATE_ROWS_EVENT
3551
3197
  };
3552
3198
 
3553
 
#ifndef DRIZZLE_CLIENT
3554
3199
  Update_rows_log_event(THD*, Table*, ulong table_id,
3555
3200
                        bool is_transactional);
3556
3201
 
3557
3202
  void init(MY_BITMAP const *cols);
3558
 
#endif
3559
3203
 
3560
3204
  virtual ~Update_rows_log_event();
3561
3205
 
3562
 
#ifdef HAVE_REPLICATION
3563
3206
  Update_rows_log_event(const char *buf, uint event_len, 
3564
3207
                        const Format_description_log_event *description_event);
3565
 
#endif
3566
3208
 
3567
 
#if !defined(DRIZZLE_CLIENT) 
3568
3209
  static bool binlog_row_logging_function(THD *thd, Table *table,
3569
3210
                                          bool is_transactional,
3570
3211
                                          const uchar *before_record,
3573
3214
    return thd->binlog_update_row(table, is_transactional,
3574
3215
                                  before_record, after_record);
3575
3216
  }
3576
 
#endif
3577
3217
 
3578
3218
  virtual bool is_valid() const
3579
3219
  {
3583
3223
protected:
3584
3224
  virtual Log_event_type get_type_code() { return (Log_event_type)TYPE_CODE; }
3585
3225
 
3586
 
#ifdef DRIZZLE_CLIENT
3587
 
  void print(FILE *file, PRINT_EVENT_INFO *print_event_info);
3588
 
#endif
3589
 
 
3590
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
3591
3226
  virtual int do_before_row_operations(const Slave_reporting_capability *const);
3592
3227
  virtual int do_after_row_operations(const Slave_reporting_capability *const,int);
3593
3228
  virtual int do_exec_row(const Relay_log_info *const);
3594
 
#endif /* !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION) */
3595
3229
};
3596
3230
 
3597
3231
/**
3623
3257
    TYPE_CODE = DELETE_ROWS_EVENT
3624
3258
  };
3625
3259
 
3626
 
#ifndef DRIZZLE_CLIENT
3627
3260
  Delete_rows_log_event(THD*, Table*, ulong, 
3628
3261
                        bool is_transactional);
3629
 
#endif
3630
 
#ifdef HAVE_REPLICATION
3631
3262
  Delete_rows_log_event(const char *buf, uint event_len, 
3632
3263
                        const Format_description_log_event *description_event);
3633
 
#endif
3634
 
#if !defined(DRIZZLE_CLIENT) 
3635
3264
  static bool binlog_row_logging_function(THD *thd, Table *table,
3636
3265
                                          bool is_transactional,
3637
3266
                                          const uchar *before_record,
3640
3269
  {
3641
3270
    return thd->binlog_delete_row(table, is_transactional, before_record);
3642
3271
  }
3643
 
#endif
3644
3272
  
3645
3273
protected:
3646
3274
  virtual Log_event_type get_type_code() { return (Log_event_type)TYPE_CODE; }
3647
3275
 
3648
 
#ifdef DRIZZLE_CLIENT
3649
 
  void print(FILE *file, PRINT_EVENT_INFO *print_event_info);
3650
 
#endif
3651
 
 
3652
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
3653
3276
  virtual int do_before_row_operations(const Slave_reporting_capability *const);
3654
3277
  virtual int do_after_row_operations(const Slave_reporting_capability *const,int);
3655
3278
  virtual int do_exec_row(const Relay_log_info *const);
3656
 
#endif
3657
3279
};
3658
3280
 
3659
3281
 
3695
3317
*/
3696
3318
class Incident_log_event : public Log_event {
3697
3319
public:
3698
 
#ifndef DRIZZLE_CLIENT
3699
3320
  Incident_log_event(THD *thd_arg, Incident incident)
3700
3321
    : Log_event(thd_arg, 0, false), m_incident(incident)
3701
3322
  {
3710
3331
    m_message= msg;
3711
3332
    return;
3712
3333
  }
3713
 
#endif
3714
3334
 
3715
 
#ifndef DRIZZLE_CLIENT
3716
3335
  void pack_info(Protocol*);
3717
 
#endif
3718
3336
 
3719
3337
  Incident_log_event(const char *buf, uint event_len,
3720
3338
                     const Format_description_log_event *descr_event);
3721
3339
 
3722
3340
  virtual ~Incident_log_event();
3723
3341
 
3724
 
#ifdef DRIZZLE_CLIENT
3725
 
  virtual void print(FILE *file, PRINT_EVENT_INFO *print_event_info);
3726
 
#endif
3727
 
 
3728
 
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
3729
3342
  virtual int do_apply_event(Relay_log_info const *rli);
3730
 
#endif
3731
3343
 
3732
3344
  virtual bool write_data_header(IO_CACHE *file);
3733
3345
  virtual bool write_data_body(IO_CACHE *file);
3757
3369
    reinit_io_cache(cache, WRITE_CACHE, 0, false, true);
3758
3370
}
3759
3371
 
3760
 
#ifndef DRIZZLE_CLIENT
3761
3372
/*****************************************************************************
3762
3373
 
3763
3374
  Heartbeat Log Event class
3791
3402
  const char* log_ident;
3792
3403
  uint ident_len;
3793
3404
};
3794
 
#endif
3795
3405
 
3796
3406
/**
3797
3407
  @} (end of group Replication)