~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/rpl_utility.h

  • Committer: Stewart Smith
  • Date: 2008-08-02 07:12:36 UTC
  • mfrom: (258 drizzle)
  • mto: This revision was merged to the branch mainline in revision 408.
  • Revision ID: stewart@flamingspork.com-20080802071236-kbcozl5zm23j6mkn
mergeĀ fromĀ mainline

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
 
    bzero(m_field_metadata, size * sizeof(uint16_t));
 
73
    memset(m_field_metadata, 0, 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 MYSQL_TYPE_BLOB:
93
 
        case MYSQL_TYPE_DOUBLE:
 
92
        case DRIZZLE_TYPE_BLOB:
 
93
        case DRIZZLE_TYPE_DOUBLE:
94
94
        {
95
95
          /*
96
96
            These types store a single byte.
99
99
          index++;
100
100
          break;
101
101
        }
102
 
        case MYSQL_TYPE_SET:
103
 
        case MYSQL_TYPE_ENUM:
104
 
        case MYSQL_TYPE_STRING:
 
102
        case DRIZZLE_TYPE_SET:
 
103
        case DRIZZLE_TYPE_ENUM:
105
104
        {
106
105
          uint16_t x= field_metadata[index++] << 8U; // real_type
107
106
          x+= field_metadata[index++];            // pack or field length
108
107
          m_field_metadata[i]= x;
109
108
          break;
110
109
        }
111
 
        case MYSQL_TYPE_VARCHAR:
 
110
        case DRIZZLE_TYPE_VARCHAR:
112
111
        {
113
112
          /*
114
113
            These types store two bytes.
118
117
          index= index + 2;
119
118
          break;
120
119
        }
121
 
        case MYSQL_TYPE_NEWDECIMAL:
 
120
        case DRIZZLE_TYPE_NEWDECIMAL:
122
121
        {
123
122
          uint16_t x= field_metadata[index++] << 8U; // precision
124
123
          x+= field_metadata[index++];            // decimals