~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 22:18:37 UTC
  • mfrom: (77.1.96 codestyle)
  • Revision ID: brian@tangent.org-20080714221837-oceoshx7fjkla9u3
Merge from Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
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:
104
 
        case DRIZZLE_TYPE_STRING:
 
103
        case MYSQL_TYPE_SET:
 
104
        case MYSQL_TYPE_ENUM:
 
105
        case MYSQL_TYPE_STRING:
105
106
        {
106
107
          uint16_t x= field_metadata[index++] << 8U; // real_type
107
108
          x+= field_metadata[index++];            // pack or field length
108
109
          m_field_metadata[i]= x;
109
110
          break;
110
111
        }
111
 
        case DRIZZLE_TYPE_VARCHAR:
 
112
        case MYSQL_TYPE_VARCHAR:
112
113
        {
113
114
          /*
114
115
            These types store two bytes.
118
119
          index= index + 2;
119
120
          break;
120
121
        }
121
 
        case DRIZZLE_TYPE_NEWDECIMAL:
 
122
        case MYSQL_TYPE_NEWDECIMAL:
122
123
        {
123
124
          uint16_t x= field_metadata[index++] << 8U; // precision
124
125
          x+= field_metadata[index++];            // decimals
204
205
    WL#3915) or needs to advance the pointer for the fields in the raw 
205
206
    data from the master to a specific column.
206
207
  */
207
 
  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;
208
209
 
209
210
  /**
210
211
    Decide if the table definition is compatible with a table.