~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/show.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-06-27 16:01:28 UTC
  • mto: This revision was merged to the branch mainline in revision 1079.
  • Revision ID: osullivan.padraig@gmail.com-20090627160128-3svk0atoda85tg2t
Converted the const char * members of InfoSchemaTable to be std::string
instead. Updated any client code based on this change and also removed the
calls to memset in the InnoDB handler on the InfoSchemaTable objects
created. No need for a memset now that InfoSchemaTable is a proper class
with a default constructor.

Show diffs side-by-side

added added

removed removed

Lines of Context:
376
376
  protocol->prepareForResend();
377
377
  {
378
378
    if (table_list->schema_table)
379
 
      protocol->store(table_list->schema_table->getTableName());
 
379
      protocol->store(table_list->schema_table->getTableName().c_str());
380
380
    else
381
381
      protocol->store(table_list->table->alias);
382
382
  }
606
606
      (create_info_arg->options & HA_LEX_CREATE_IF_NOT_EXISTS))
607
607
    packet->append(STRING_WITH_LEN("IF NOT EXISTS "));
608
608
  if (table_list->schema_table)
609
 
    alias= table_list->schema_table->getTableName();
 
609
    alias= table_list->schema_table->getTableName().c_str();
610
610
  else
611
611
    alias= share->table_name.str;
612
612
 
1883
1883
    if (wild)
1884
1884
    {
1885
1885
      if (wild_case_compare(files_charset_info,
1886
 
                            schema_table->getTableName(),
 
1886
                            schema_table->getTableName().c_str(),
1887
1887
                            wild))
1888
1888
        return(0);
1889
1889
    }
1890
1890
  
1891
1891
    if ((file_name= session->make_lex_string(file_name, 
1892
 
                                             schema_table->getTableName(),
1893
 
                                             strlen(schema_table->getTableName()),
 
1892
                                             schema_table->getTableName().c_str(),
 
1893
                                             schema_table->getTableName().length(),
1894
1894
                                             true)) &&
1895
1895
        !file_list->push_back(file_name))
1896
1896
      return(0);
1905
1905
  InfoSchemaTable *tmp_schema_table= schema_tables;
1906
1906
  st_add_schema_table add_data;
1907
1907
 
1908
 
  for (; tmp_schema_table->getTableName(); tmp_schema_table++)
 
1908
  for (; tmp_schema_table->getTableName().length() != 0; tmp_schema_table++)
1909
1909
  {
1910
1910
    if (tmp_schema_table->isHidden())
1911
1911
      continue;
1912
1912
    if (wild)
1913
1913
    {
1914
1914
      if (wild_case_compare(files_charset_info,
1915
 
                            tmp_schema_table->getTableName(),
 
1915
                            tmp_schema_table->getTableName().c_str(),
1916
1916
                            wild))
1917
1917
        continue;
1918
1918
    }
1919
1919
    if ((file_name=
1920
1920
         session->make_lex_string(file_name, 
1921
 
                                  tmp_schema_table->getTableName(),
1922
 
                                  strlen(tmp_schema_table->getTableName()), 
 
1921
                                  tmp_schema_table->getTableName().c_str(),
 
1922
                                  tmp_schema_table->getTableName().length(), 
1923
1923
                                  true)) &&
1924
1924
        !files->push_back(file_name))
1925
1925
      continue;
3512
3512
    : table_name(table_name_arg) {}
3513
3513
  result_type operator() (argument_type schema_table)
3514
3514
  {
3515
 
    return !my_strcasecmp(system_charset_info,
3516
 
                          schema_table->getTableName(),
3517
 
                          table_name);
 
3515
    return ! my_strcasecmp(system_charset_info,
 
3516
                           schema_table->getTableName().c_str(),
 
3517
                           table_name);
3518
3518
  }
3519
3519
};
3520
3520
 
3535
3535
{
3536
3536
  InfoSchemaTable *schema_table= schema_tables;
3537
3537
 
3538
 
  for (; schema_table->getTableName(); schema_table++)
 
3538
  for (; schema_table->getTableName().length() != 0; schema_table++)
3539
3539
  {
3540
 
    if (!my_strcasecmp(system_charset_info,
3541
 
                       schema_table->getTableName(),
3542
 
                       table_name))
 
3540
    if (! my_strcasecmp(system_charset_info,
 
3541
                        schema_table->getTableName().c_str(),
 
3542
                        table_name))
3543
3543
      return(schema_table);
3544
3544
  }
3545
3545
 
3895
3895
  */
3896
3896
  session->make_lex_string(&db, INFORMATION_SCHEMA_NAME.c_str(),
3897
3897
                       INFORMATION_SCHEMA_NAME.length(), 0);
3898
 
  session->make_lex_string(&table, schema_table->getTableName(),
3899
 
                           strlen(schema_table->getTableName()), 0);
 
3898
  session->make_lex_string(&table, schema_table->getTableName().c_str(),
 
3899
                           schema_table->getTableName().length(), 0);
3900
3900
  if (schema_table->oldFormat(session, schema_table) ||   /* Handle old syntax */
3901
3901
      !sel->add_table_to_list(session, new Table_ident(session, db, table, 0),
3902
3902
                              0, 0, TL_READ))