~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/user_var_entry.cc

  • Committer: Olaf van der Spek
  • Date: 2011-07-05 11:31:30 UTC
  • mto: This revision was merged to the branch mainline in revision 2367.
  • Revision ID: olafvdspek@gmail.com-20110705113130-4108s0gpx0b6txqa
Use assert(false) instead of assert(1)

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
    return internal::my_atof(value);                      // This is null terminated
53
53
 
54
54
  case ROW_RESULT:
55
 
    assert(1);                          // Impossible
 
55
    assert(false);                              // Impossible
56
56
    break;
57
57
  }
58
58
  return 0.0;                                   // Impossible
87
87
    }
88
88
 
89
89
  case ROW_RESULT:
90
 
    assert(1);                          // Impossible
 
90
    assert(false);                              // Impossible
91
91
    break;
92
92
  }
93
93
 
100
100
String *user_var_entry::val_str(bool *null_value, String *str,
101
101
                                uint32_t decimals)
102
102
{
103
 
  if ((*null_value= (value == 0)))
104
 
    return (String*) 0;
 
103
  if ((*null_value= not value))
 
104
    return NULL;
105
105
 
106
 
  switch (type) {
 
106
  switch (type) 
 
107
  {
107
108
  case REAL_RESULT:
108
109
    str->set_real(*(double*) value, decimals, &my_charset_bin);
109
110
    break;
121
122
 
122
123
  case STRING_RESULT:
123
124
    str->copy(value, length, collation.collation);
124
 
    // break missing?
 
125
    break;
125
126
 
126
127
  case ROW_RESULT:
127
 
    assert(1);                          // Impossible
 
128
    assert(false);                              // Impossible
128
129
    break;
129
130
  }
130
131
 
156
157
    break;
157
158
 
158
159
  case ROW_RESULT:
159
 
    assert(1);                          // Impossible
 
160
    assert(false);                              // Impossible
160
161
    break;
161
162
  }
162
163