MySQL Forums
Forum List  »  General

Re: Query using new schema but prepared statement using old schema
Posted by: No No
Date: October 27, 2020 01:44AM

Isotopp on the MySQL IRC channel answered the question for me.

The prepared statement maintains a reference to the table it was prepared for, i.e. the table in the schema at the time of preparation. So even if the session schema is changed, the prepared statement will still reference the schema it was prepared against.

I need to rewrite my code to either explicitly reference the schema or not use prepared statements.

Options: ReplyQuote




Sorry, only registered users may post in this forum.

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.