anchor.diff:  
   %% -- priate: loop,refresh --
   
  -refresh_pre(Protocol, Options) ->
  +refresh_pre(Options, Protocol) ->
       {ok, [<<?COM_REFRESH,Options>>], reset(Protocol)}.
   
   %% -- priate: loop,select_db --
   
  -select_db_pre(Protocol, Database) ->
  +select_db_pre(Database, Protocol) ->
       {ok, [<<?COM_INIT_DB,Database/binary>>], reset(Protocol)}.
   
   %% -- priate: loop,stat --
  
positive.code:       D/binary,
        P/binary
      >>;
  auth_to_binary(#protocol{maxlength=M,seed=S,caps=C,plugin=P},
                 User, Password, Database) ->
      A = (C bor ?CLIENT_LONG_PASSWORD) band 16#ffff, % FORCE
      X = myer_auth:scramble(Password, S, P),
      B = if ?ISSET(C,?CLIENT_SECURE_CONNECTION) -> N = size(X), <<N,X/binary>>;
  
negative.code: 
  %% -- private: loop,auth --
  
  auth_pre(User, Password, <<>>, #protocol{caps=C}=P) ->
      Protocol = P#protocol{caps = (C bxor ?CLIENT_CONNECT_WITH_DB)},
      {ok, [auth_to_binary(User,Password,<<>>,Protocol)], Protocol};
  auth_pre(User, Password, Database, #protocol{caps=C}=P) ->
      Protocol = P#protocol{caps = (C bxor ?CLIENT_NO_SCHEMA)},
      {ok, [auth_to_binary(User,Password,Database,Protocol)], Protocol}.
  
  auth_post(<<254>>, Protocol) ->
      recv_plugin(Protocol);
  auth_post(<<0>>, #protocol{caps=C}=P) ->
      recv_result(P#protocol{compress = ?ISSET(C,?CLIENT_COMPRESS)}).
  
  auth_alt_pre(Password, #protocol{seed=S,plugin=A}=P) ->
      Scrambled = myer_auth:scramble(Password, S, A),
      {ok, [<<Scrambled/binary,0>>], P}.
  
  auth_alt_post(<<0>>, #protocol{caps=C}=P) ->
      recv_result(P#protocol{compress = ?ISSET(C,?CLIENT_COMPRESS)}).
  
  %% -- private: loop,close --
  