Re: Use of SessionStateChanged_CURRENT_SCHEMA?
Posted by: jon gore
Date: March 06, 2023 11:48PM

The SessionStateChanged_CURRENT_SCHEMA notice is not deprecated, but it is not used in the X Plugin or in the connectors. This notice is typically used in applications or client libraries that need to keep track of the current schema during a session.

In MySQL, the current schema is usually determined by the USE statement or by specifying the schema prefix in queries. The SELECT DATABASE() statement can also be used to determine the current schema, but it is less efficient than using the schema prefix.

If you want to keep track of the current schema during a session in your application, you can use the SessionStateChanged_CURRENT_SCHEMA notice to update your state. You can also issue a USE statement at the beginning of the session to set the initial schema.

Note that the X Plugin does support schema discovery, which allows clients to retrieve information about the available schemas in a MySQL instance. This can be useful if you need to programmatically determine the list of available schemas.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Use of SessionStateChanged_CURRENT_SCHEMA?
113
March 06, 2023 11:48PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.