~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.cc

  • Committer: Mark Atwood
  • Date: 2011-10-14 15:59:08 UTC
  • mfrom: (2430.1.12 refactor3a)
  • Revision ID: me@mark.atwood.name-20111014155908-whqmrmaf2grpsg5c
mergeĀ lp:~olafvdspek/drizzle/refactor3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1494
1494
  resetResultsetMessage();
1495
1495
}
1496
1496
 
1497
 
bool Session::copy_db_to(char*& db, size_t& db_length)
 
1497
str_ref Session::copy_db_to() const
1498
1498
{
1499
 
  if (impl_->schema->empty())
1500
 
  {
1501
 
    my_message(ER_NO_DB_ERROR, ER(ER_NO_DB_ERROR), MYF(0));
1502
 
    return true;
1503
 
  }
1504
 
  db= mem.strdup(*impl_->schema);
1505
 
  db_length= impl_->schema->size();
1506
 
  return false;
 
1499
  if (not impl_->schema->empty())
 
1500
    return str_ref(mem.strdup(*impl_->schema), impl_->schema->size());
 
1501
  my_message(ER_NO_DB_ERROR, ER(ER_NO_DB_ERROR), MYF(0));
 
1502
  return str_ref();
1507
1503
}
1508
1504
 
1509
1505
/****************************************************************************
1692
1688
 
1693
1689
user_var_entry *Session::getVariable(lex_string_t &name, bool create_if_not_exists)
1694
1690
{
1695
 
  return getVariable(std::string(name.data(), name.size()), create_if_not_exists);
 
1691
  return getVariable(to_string(name), create_if_not_exists);
1696
1692
}
1697
1693
 
1698
1694
user_var_entry *Session::getVariable(const std::string  &name, bool create_if_not_exists)