~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/rpl_utility.h

Removed/replaced DBUG symbols and standardized TRUE/FALSE

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
 
139
139
  ~table_def() {
140
140
    my_free(m_memory, MYF(0));
141
 
#ifndef DBUG_OFF
142
141
    m_type= 0;
143
142
    m_size= 0;
144
 
#endif
145
143
  }
146
144
 
147
145
  /**
163
161
   */
164
162
  field_type type(ulong index) const
165
163
  {
166
 
    DBUG_ASSERT(index < m_size);
 
164
    assert(index < m_size);
167
165
    return m_type[index];
168
166
  }
169
167
 
182
180
  */
183
181
  uint16 field_metadata(uint index) const
184
182
  {
185
 
    DBUG_ASSERT(index < m_size);
 
183
    assert(index < m_size);
186
184
    if (m_field_metadata_size)
187
185
      return m_field_metadata[index];
188
186
    else
195
193
  */
196
194
  my_bool maybe_null(uint index) const
197
195
  {
198
 
    DBUG_ASSERT(index < m_size);
 
196
    assert(index < m_size);
199
197
    return ((m_null_bits[(index / 8)] & 
200
198
            (1 << (index % 8))) == (1 << (index %8)));
201
199
  }
271
269
    ~auto_afree_ptr() { if (m_ptr) my_afree(m_ptr); }
272
270
    void assign(Obj* ptr) {
273
271
      /* Only to be called if it hasn't been given a value before. */
274
 
      DBUG_ASSERT(m_ptr == NULL);
 
272
      assert(m_ptr == NULL);
275
273
      m_ptr= ptr;
276
274
    }
277
275
    Obj* get() { return m_ptr; }
279
277
 
280
278
}
281
279
 
282
 
/*
283
 
  One test in mysqldump.test has 330 columns!
284
 
  So have a sufficient buffer and check its limit anyway.
285
 
*/
286
 
#define DBUG_PRINT_BITSET(N,FRM,BS)                             \
287
 
  do {                                                          \
288
 
    char buf[MAX_FIELDS+1];                                     \
289
 
    uint i;                                                     \
290
 
    for (i = 0 ; i < (BS)->n_bits && i < MAX_FIELDS ; ++i)      \
291
 
      buf[i] = bitmap_is_set((BS), i) ? '1' : '0';              \
292
 
    buf[i] = '\0';                                              \
293
 
    DBUG_PRINT((N), ((FRM), buf));                              \
294
 
  } while (0)
295
 
 
296
280
#endif /* RPL_UTILITY_H */