~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Olaf van der Spek
  • Date: 2011-08-05 12:55:59 UTC
  • mto: This revision was merged to the branch mainline in revision 2395.
  • Revision ID: olafvdspek@gmail.com-20110805125559-fip89v61zimhde1b
Rename set_db to set_schema

Show diffs side-by-side

added added

removed removed

Lines of Context:
957
957
  }
958
958
  TableList *ptr = (TableList *) session->mem.calloc(sizeof(TableList));
959
959
 
 
960
  char* name;
 
961
  size_t name_size;
960
962
  if (table->db.str)
961
963
  {
962
964
    ptr->setIsFqtn(true);
963
965
    ptr->setSchemaName(table->db);
964
966
  }
965
 
  else if (lex->session->copy_db_to(*ptr->getSchemaNamePtr(), ptr->db_length))
 
967
  else if (lex->session->copy_db_to(name, name_size))
966
968
    return NULL;
967
969
  else
 
970
  {
968
971
    ptr->setIsFqtn(false);
 
972
    ptr->setSchemaName(str_ref(name, name_size));
 
973
  }
969
974
 
970
975
  ptr->alias= alias_str;
971
976
  ptr->setIsAlias(alias ? true : false);