~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Brian Aker
  • Date: 2010-10-23 22:28:30 UTC
  • mto: This revision was merged to the branch mainline in revision 1875.
  • Revision ID: brian@tangent.org-20101023222830-em4idhbau96l37zt
Encapsulate schema_name it table_list.

Show diffs side-by-side

added added

removed removed

Lines of Context:
911
911
                                                             List<Index_hint> *index_hints_arg,
912
912
                                         LEX_STRING *option)
913
913
{
914
 
  register TableList *ptr;
 
914
  TableList *ptr;
915
915
  TableList *previous_table_ref; /* The table preceding the current one. */
916
916
  char *alias_str;
917
917
  LEX *lex= session->lex;
956
956
  if (table->db.str)
957
957
  {
958
958
    ptr->setIsFqtn(true);
959
 
    ptr->db= table->db.str;
 
959
    ptr->setSchemaName(table->db.str);
960
960
    ptr->db_length= table->db.length;
961
961
  }
962
 
  else if (lex->copy_db_to(&ptr->db, &ptr->db_length))
 
962
  else if (lex->copy_db_to(ptr->getSchemaNamePtr(), &ptr->db_length))
963
963
    return NULL;
964
964
  else
965
965
    ptr->setIsFqtn(false);
986
986
         tables=tables->next_local)
987
987
    {
988
988
      if (!my_strcasecmp(table_alias_charset, alias_str, tables->alias) &&
989
 
          !strcasecmp(ptr->db, tables->db))
 
989
          !strcasecmp(ptr->getSchemaName(), tables->getSchemaName()))
990
990
      {
991
991
        my_error(ER_NONUNIQ_TABLE, MYF(0), alias_str);
992
992
        return NULL;