~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/show_errors.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:
23
23
#include <drizzled/session.h>
24
24
#include <drizzled/statement/show_errors.h>
25
25
 
 
26
#include <bitset>
 
27
 
 
28
using namespace std;
26
29
using namespace drizzled;
27
30
 
28
31
bool statement::ShowErrors::execute()
29
32
{
30
 
  bool res= mysqld_show_warnings(session, (uint32_t)
31
 
                                (1L << (uint32_t) DRIZZLE_ERROR::WARN_LEVEL_ERROR));
 
33
  bitset<DRIZZLE_ERROR::NUM_ERRORS> warning_levels;
 
34
  warning_levels.set(DRIZZLE_ERROR::WARN_LEVEL_ERROR);
 
35
  bool res= mysqld_show_warnings(session, warning_levels);
32
36
  return res;
33
37
}