~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.cc

  • Committer: Lee Bieber
  • Date: 2011-02-02 17:06:06 UTC
  • mfrom: (2136.1.3 build)
  • Revision ID: kalebral@gmail.com-20110202170606-gdueaj1a3utc5wkp
Merge Andrew - 710947: Valgrind warning in hello_events.table test      
Merge Vijay - 709653: invalid command line option in dbqp.py does not display the entire usage menu
Merge Andrew - 686135: data_dictionary table for protocol counters need to be added
Merge Andrew - 710572: Slight change needed in Ubuntu install docs^

Show diffs side-by-side

added added

removed removed

Lines of Context:
1814
1814
 
1815
1815
user_var_entry *Session::getVariable(const std::string  &name, bool create_if_not_exists)
1816
1816
{
1817
 
  UserVarsRange ppp= user_vars.equal_range(name);
 
1817
  if (cleanup_done)
 
1818
    return NULL;
1818
1819
 
1819
 
  for (UserVars::iterator iter= ppp.first;
1820
 
       iter != ppp.second; ++iter)
1821
 
  {
 
1820
  UserVars::iterator iter= user_vars.find(name);
 
1821
  if (iter != user_vars.end())
1822
1822
    return (*iter).second;
1823
 
  }
1824
1823
 
1825
1824
  if (not create_if_not_exists)
1826
1825
    return NULL;
1844
1843
void Session::setVariable(const std::string &name, const std::string &value)
1845
1844
{
1846
1845
  user_var_entry *updateable_var= getVariable(name.c_str(), true);
1847
 
 
1848
 
  updateable_var->update_hash(false,
1849
 
                              (void*)value.c_str(),
1850
 
                              static_cast<uint32_t>(value.length()), STRING_RESULT,
1851
 
                              &my_charset_bin,
1852
 
                              DERIVATION_IMPLICIT, false);
 
1846
  if (updateable_var)
 
1847
  {
 
1848
    updateable_var->update_hash(false,
 
1849
                                (void*)value.c_str(),
 
1850
                                static_cast<uint32_t>(value.length()), STRING_RESULT,
 
1851
                                &my_charset_bin,
 
1852
                                DERIVATION_IMPLICIT, false);
 
1853
  }
1853
1854
}
1854
1855
 
1855
1856
void Open_tables_state::mark_temp_tables_as_free_for_reuse()