~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.cc

  • Committer: lbieber at stabletransit
  • Date: 2010-10-18 20:26:50 UTC
  • mfrom: (1859.1.4 build)
  • Revision ID: lbieber@drizzle-build-n02.wc1.dfw1.stabletransit.com-20101018202650-hcvsp7yuaf1xy04s
Merge Monty - Adds support for a const std::string sys_var type.
Merge Monty - Make it possible to use sys_var directly from plugins.
Merge Padraig - Replaced a few unit8_t types that were being used as bitmaps with std::bitset

Show diffs side-by-side

added added

removed removed

Lines of Context:
626
626
  return true;
627
627
}
628
628
 
629
 
bool Session::checkUser(const char *passwd, uint32_t passwd_len, const char *in_db)
 
629
bool Session::checkUser(const std::string &passwd_str,
 
630
                        const std::string &in_db)
630
631
{
631
 
  const string passwd_str(passwd, passwd_len);
632
632
  bool is_authenticated=
633
633
    plugin::Authentication::isAuthenticated(getSecurityContext(),
634
634
                                            passwd_str);
641
641
  }
642
642
 
643
643
  /* Change database if necessary */
644
 
  if (in_db && in_db[0])
 
644
  if (not in_db.empty())
645
645
  {
646
646
    SchemaIdentifier identifier(in_db);
647
647
    if (mysql_change_db(this, identifier))
651
651
    }
652
652
  }
653
653
  my_ok();
654
 
  password= test(passwd_len);          // remember for error messages
 
654
  password= not passwd_str.empty();
655
655
 
656
656
  /* Ready to handle queries */
657
657
  return true;