~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

Extracted the SHOW WARNINGS command from the huge switch statement into its
own implementation and header file. Created the ShowWarnings class to
represent this command and removed the corresponding case label from the
switch statement.

Show diffs side-by-side

added added

removed removed

Lines of Context:
487
487
 
488
488
 
489
489
  switch (lex->sql_command) {
490
 
  case SQLCOM_SHOW_WARNS:
491
 
  {
492
 
    res= mysqld_show_warnings(session, (uint32_t)
493
 
                              ((1L << (uint32_t) DRIZZLE_ERROR::WARN_LEVEL_NOTE) |
494
 
                               (1L << (uint32_t) DRIZZLE_ERROR::WARN_LEVEL_WARN) |
495
 
                               (1L << (uint32_t) DRIZZLE_ERROR::WARN_LEVEL_ERROR)
496
 
                               ));
497
 
    break;
498
 
  }
499
490
  case SQLCOM_SHOW_ERRORS:
500
491
  {
501
492
    res= mysqld_show_warnings(session, (uint32_t)