~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Brian Aker
  • Date: 2010-10-24 01:44:25 UTC
  • mfrom: (1874.1.2 catalogs)
  • Revision ID: brian@tangent.org-20101024014425-exsst7015tqgbw7x
TableĀ encapsulateĀ merge.

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);
968
968
  ptr->setIsAlias(alias ? true : false);
969
969
  if (table->table.length)
970
970
    table->table.length= my_casedn_str(files_charset_info, table->table.str);
971
 
  ptr->table_name=table->table.str;
 
971
  ptr->setTableName(table->table.str);
972
972
  ptr->table_name_length=table->table.length;
973
973
  ptr->lock_type=   lock_type;
974
974
  ptr->force_index= table_options.test(TL_OPTION_FORCE_INDEX);
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;