~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/mysql_protocol/mysql_protocol.cc

  • Committer: Monty Taylor
  • Date: 2011-03-11 23:40:27 UTC
  • mfrom: (2230.1.3 build)
  • Revision ID: mordred@inaugust.com-20110311234027-0zjpw2l4ivqfluwr
Merged Brian: New 5.5 auth support.
Merged Dave: Slave admin docs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
725
725
    server_capabilites= CLIENT_BASIC_FLAGS;
726
726
 
727
727
    if (_using_mysql41_protocol)
 
728
    {
728
729
      server_capabilites|= CLIENT_PROTOCOL_MYSQL41;
 
730
    }
729
731
 
730
732
#ifdef HAVE_COMPRESS
731
733
    server_capabilites|= CLIENT_COMPRESS;
816
818
      passwd < (char *) net.read_pos + pkt_len)
817
819
  {
818
820
    passwd_len= (unsigned char)(*passwd++);
819
 
    if (passwd_len > 0)
 
821
    if (passwd_len > 0 and client_capabilities & CLIENT_CAPABILITIES_PLUGIN_AUTH)
 
822
    {
 
823
      user_identifier->setPasswordType(identifier::User::PLAIN_TEXT);
 
824
    }
 
825
    else if (passwd_len > 0)
820
826
    {
821
827
      user_identifier->setPasswordType(identifier::User::MYSQL_HASH);
822
828
      user_identifier->setPasswordContext(scramble, SCRAMBLE_LENGTH);
872
878
    _is_interactive= true;
873
879
  }
874
880
 
 
881
  if (client_capabilities & CLIENT_CAPABILITIES_PLUGIN_AUTH)
 
882
  {
 
883
    passwd_len= strlen(passwd);
 
884
  }
 
885
 
875
886
  user_identifier->setUser(user);
876
887
  session->setUser(user_identifier);
877
888