1
/* Copyright (C) 2006 MySQL AB
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 2 of the License.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16
20
#ifndef RPL_UTILITY_H
17
21
#define RPL_UTILITY_H
20
#error "Don't include this C++ header file from a non-C++ file!"
23
#include "mysql_priv.h"
23
#include <drizzled/server_includes.h>
25
25
class Relay_log_info;
70
70
&m_null_bits, (size + 7) / 8,
73
bzero(m_field_metadata, size * sizeof(uint16_t));
73
memset(m_field_metadata, 0, size * sizeof(uint16_t));
76
76
memcpy(m_type, types, size);
190
188
This function returns whether the field on the master can be null.
191
189
This value is derived from field->maybe_null().
193
my_bool maybe_null(uint32_t index) const
191
bool maybe_null(uint32_t index) const
195
193
assert(index < m_size);
196
194
return ((m_null_bits[(index / 8)] &
204
202
WL#3915) or needs to advance the pointer for the fields in the raw
205
203
data from the master to a specific column.
207
uint32 calc_field_size(uint32_t col, unsigned char *master_data) const;
205
uint32_t calc_field_size(uint32_t col, unsigned char *master_data) const;
210
208
Decide if the table definition is compatible with a table.
223
221
@retval 1 if the table definition is not compatible with @c table
224
222
@retval 0 if the table definition is compatible with @c table
226
int compatible_with(Relay_log_info const *rli, TABLE *table) const;
224
int compatible_with(Relay_log_info const *rli, Table *table) const;
229
227
uint32_t m_size; // Number of elements in the types array