~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-10-14 10:40:47 UTC
  • mto: This revision was merged to the branch mainline in revision 2438.
  • Revision ID: olafvdspek@gmail.com-20111014104047-gnubuxpobzese9t9
Add const

Show diffs side-by-side

added added

removed removed

Lines of Context:
932
932
  }
933
933
  TableList *ptr = (TableList *) session->mem.calloc(sizeof(TableList));
934
934
 
935
 
  char* name;
936
 
  size_t name_size;
937
935
  if (table->db.data())
938
936
  {
939
937
    ptr->setIsFqtn(true);
940
938
    ptr->setSchemaName(table->db.data());
941
939
  }
942
 
  else if (lex->session->copy_db_to(name, name_size))
943
 
    return NULL;
944
 
  else
 
940
  else 
945
941
  {
 
942
    str_ref schema = lex->session->copy_db_to();
 
943
    if (schema.empty())
 
944
      return NULL;
946
945
    ptr->setIsFqtn(false);
947
 
    ptr->setSchemaName(name);
 
946
    ptr->setSchemaName(schema.data());
948
947
  }
949
948
 
950
949
  ptr->alias= alias_str;