~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/rpl_utility.h

  • Committer: Brian Aker
  • Date: 2008-07-14 04:46:28 UTC
  • Revision ID: brian@tangent.org-20080714044628-mk3nt2rbaeqt8oe9
Removed oddball types in my_global.h

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#error "Don't include this C++ header file from a non-C++ file!"
21
21
#endif
22
22
 
23
 
#include <drizzled/server_includes.h>
 
23
#include "mysql_priv.h"
24
24
 
25
25
class Relay_log_info;
26
26
 
70
70
                                       &m_null_bits, (size + 7) / 8,
71
71
                                       NULL);
72
72
 
73
 
    memset(m_field_metadata, 0, size * sizeof(uint16_t));
 
73
    bzero(m_field_metadata, size * sizeof(uint16_t));
74
74
 
75
75
    if (m_type)
76
76
      memcpy(m_type, types, size);
89
89
      for (unsigned int i= 0; i < m_size; i++)
90
90
      {
91
91
        switch (m_type[i]) {
92
 
        case DRIZZLE_TYPE_BLOB:
93
 
        case DRIZZLE_TYPE_DOUBLE:
 
92
        case MYSQL_TYPE_BLOB:
 
93
        case MYSQL_TYPE_DOUBLE:
 
94
        case MYSQL_TYPE_FLOAT:
94
95
        {
95
96
          /*
96
97
            These types store a single byte.
99
100
          index++;
100
101
          break;
101
102
        }
102
 
        case DRIZZLE_TYPE_SET:
103
 
        case DRIZZLE_TYPE_ENUM:
 
103
        case MYSQL_TYPE_SET:
 
104
        case MYSQL_TYPE_ENUM:
 
105
        case MYSQL_TYPE_STRING:
104
106
        {
105
107
          uint16_t x= field_metadata[index++] << 8U; // real_type
106
108
          x+= field_metadata[index++];            // pack or field length
107
109
          m_field_metadata[i]= x;
108
110
          break;
109
111
        }
110
 
        case DRIZZLE_TYPE_VARCHAR:
 
112
        case MYSQL_TYPE_VARCHAR:
111
113
        {
112
114
          /*
113
115
            These types store two bytes.
117
119
          index= index + 2;
118
120
          break;
119
121
        }
120
 
        case DRIZZLE_TYPE_NEWDECIMAL:
 
122
        case MYSQL_TYPE_NEWDECIMAL:
121
123
        {
122
124
          uint16_t x= field_metadata[index++] << 8U; // precision
123
125
          x+= field_metadata[index++];            // decimals
189
191
    This function returns whether the field on the master can be null.
190
192
    This value is derived from field->maybe_null().
191
193
  */
192
 
  bool maybe_null(uint32_t index) const
 
194
  my_bool maybe_null(uint32_t index) const
193
195
  {
194
196
    assert(index < m_size);
195
197
    return ((m_null_bits[(index / 8)] & 
203
205
    WL#3915) or needs to advance the pointer for the fields in the raw 
204
206
    data from the master to a specific column.
205
207
  */
206
 
  uint32_t calc_field_size(uint32_t col, unsigned char *master_data) const;
 
208
  uint32 calc_field_size(uint32_t col, unsigned char *master_data) const;
207
209
 
208
210
  /**
209
211
    Decide if the table definition is compatible with a table.