# File lib/active_record/vendor/mysql.rb, line 160
  def handle_auth_fallback(pkt, passwd)
    # A packet like this means that we need to send an old-format password
    if pkt.size == 1 and pkt[0] == 254 and
       @server_capabilities & CLIENT_SECURE_CONNECTION != 0 then
      data = scramble(passwd, @scramble_buff, @protocol_version == 9)
      write data + "\0"
      read
    end
  end