Bug #21960 Manual description incorrect/incomplete about C API function mysql_change_user()
Submitted: 1 Sep 2006 4:04 Modified: 21 Feb 2007 2:27
Reporter: Arjen Lentz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:any OS:Any (any)
Assigned to: Paul Dubois CPU Architecture:Any
Tags: API, C, Connection, handler, mysql_change_user, reset, server variables
Triage: D4 (Minor)

[1 Sep 2006 4:04] Arjen Lentz
Description:
http://dev.mysql.com/doc/refman/4.1/en/mysql-change-user.html states:
===
Starting from MySQL 4.0.6 this command always performs a ROLLBACK of any active transactions, closes all temporary tables, unlocks all locked tables and resets the state as if one had done a new connect.
===

This is not correct. For instance, user variables (@var) remain.
Additional open questions:
 - are session variables reset to their global default. I presume not.
 - are HANDLER handles closed? Either way this should be explicitly stated.
   If not auto-closed, then that's probably a bug that should be fixed.

How to repeat:
Check with a suitable client code, or verify server code.
[2 Sep 2006 10:06] Valeriy Kravchuk
See bug #20023 for just one of the cases that should be clarified.
[21 Feb 2007 2:27] Paul Dubois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

See also the new (related) section:

http://dev.mysql.com/doc/refman/5.0/en/auto-reconnect.html