~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/show.cc

  • Committer: Andrew Hutchings
  • Date: 2011-02-07 17:20:59 UTC
  • mfrom: (2148 staging)
  • mto: (2148.2.3 build)
  • mto: This revision was merged to the branch mainline in revision 2149.
  • Revision ID: andrew@linuxjedi.co.uk-20110207172059-dyeahrgzrlincoe3
Merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
345
345
    drizzled::identifier::Table identifier(select->getShowSchema().c_str(), table_ident->table.str);
346
346
    if (not plugin::StorageEngine::doesTableExist(*session, identifier))
347
347
    {
348
 
      my_error(ER_NO_SUCH_TABLE, MYF(0),
349
 
               select->getShowSchema().c_str(), 
350
 
               table_ident->table.str);
 
348
      my_error(ER_TABLE_UNKNOWN, identifier);
351
349
    }
352
350
  }
353
351
 
362
360
  return true;
363
361
}
364
362
 
365
 
bool buildWarnings(Session *session)
 
363
void buildSelectWarning(Session *session)
 
364
{
 
365
  (void) create_select_for_variable(session, "warning_count");
 
366
  session->getLex()->statement= new statement::Show(session);
 
367
}
 
368
 
 
369
void buildSelectError(Session *session)
 
370
{
 
371
  (void) create_select_for_variable(session, "error_count");
 
372
  session->getLex()->statement= new statement::Show(session);
 
373
}
 
374
 
 
375
void buildWarnings(Session *session)
366
376
{
367
377
  session->getLex()->statement= new statement::ShowWarnings(session);
368
 
 
369
 
  return true;
370
378
}
371
379
 
372
 
bool buildErrors(Session *session)
 
380
void buildErrors(Session *session)
373
381
{
374
382
  session->getLex()->statement= new statement::ShowErrors(session);
375
 
 
376
 
  return true;
377
383
}
378
384
 
379
385
bool buildIndex(Session *session, const char *schema_ident, Table_ident *table_ident)
405
411
    drizzled::identifier::Table identifier(select->getShowSchema().c_str(), table_ident->table.str);
406
412
    if (not plugin::StorageEngine::doesTableExist(*session, identifier))
407
413
    {
408
 
      my_error(ER_NO_SUCH_TABLE, MYF(0),
409
 
               select->getShowSchema().c_str(), 
410
 
               table_ident->table.str);
 
414
      my_error(ER_TABLE_UNKNOWN, identifier);
411
415
    }
412
416
  }
413
417
 
630
634
    drizzled::identifier::Table identifier(select->getShowSchema().c_str(), ident->table.str);
631
635
    if (not plugin::StorageEngine::doesTableExist(*session, identifier))
632
636
    {
633
 
      my_error(ER_NO_SUCH_TABLE, MYF(0),
634
 
               select->getShowSchema().c_str(), 
635
 
               ident->table.str);
 
637
      my_error(ER_TABLE_UNKNOWN, identifier);
636
638
    }
637
639
  }
638
640