hanxi commented on issue #3291:
URL: https://github.com/apache/kvrocks/issues/3291#issuecomment-3646967801

   Thanks for the clarification!
   
   Since SELECT is currently a no-op in Kvrocks and does not produce any error, 
I agree that changing its behavior directly would be a breaking change.
   
   To avoid breaking existing users, I would like to propose adding a 
configuration option such as:
   
   ```
   enable_select_as_auth yes|no
   ```
   
   Default = no, so the current behavior (SELECT as no-op) stays unchanged
   
   When enabled, SELECT <dbid> will internally behave the same as AUTH <dbid>
   
   Only users who explicitly want Redis-style db-index compatibility will turn 
it on
   
   Users relying on the existing no-op semantics will not be affected at all
   
   
   My goal is not to reintroduce Redis multi-DB or encourage dbid usage.
   I only want an optional compatibility mode for older Redis clients or 
libraries that automatically send:
   
   ```
   SELECT <dbindex>
   ```
   
   Even though Kvrocks currently ignores it, in some environments the client 
logic still expects db switching.
   Having a built-in opt-in feature would be more convenient than running an 
external proxy layer.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to