~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_error.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-08-10 18:16:21 UTC
  • mto: (1115.3.4 captain)
  • mto: This revision was merged to the branch mainline in revision 1117.
  • Revision ID: osullivan.padraig@gmail.com-20090810181621-rp0f7jw1zuc5jt4w
Updated mysql_show_warnings to take a std::bitset instead of a uint32_t to
represent what warning flags have been set. This cleaned up some other code
that called this function a good bit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
195
195
  { C_STRING_WITH_LEN("?") }
196
196
};
197
197
 
198
 
bool mysqld_show_warnings(Session *session, uint32_t levels_to_show)
 
198
bool mysqld_show_warnings(Session *session,
 
199
                          bitset<DRIZZLE_ERROR::NUM_ERRORS> &levels_to_show)
199
200
{
200
201
  List<Item> field_list;
201
202
 
219
220
  while ((err= it++))
220
221
  {
221
222
    /* Skip levels that the user is not interested in */
222
 
    if (!(levels_to_show & ((ulong) 1 << err->level)))
 
223
    if (! levels_to_show.test(err->level))
223
224
      continue;
224
225
    if (++idx <= unit->offset_limit_cnt)
225
226
      continue;