We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If I have a database called students and inside that database I have a table also called students then
students
private def view_definition(name) execute("SHOW CREATE VIEW #{quote_table_name(name)}") .first[1] .sub(/\A.*#{quote_table_name(name)} AS /i, '') .gsub(/#{quote_table_name(@connectable.connection.current_database)}\./, '') end
will replace the name of the table, leading to errors such as Mysql2::Error: Column 'id' in field list is ambiguous.
Mysql2::Error: Column 'id' in field list is ambiguous
It should replace only the very first match, not all of them.
The text was updated successfully, but these errors were encountered:
Ah! Yep. I'll circle back to this when I'm available if someone hasn't already taken care of it.
Sorry, something went wrong.
I've added a small PR, please let me know if I should add anything else.
BTW this behaviour of adding the database name as a prefix is not consistent, because it's a bug: https://bugs.mysql.com/bug.php?id=85176. Fixed here: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-3.html
No branches or pull requests
If I have a database called
students
and inside that database I have a table also calledstudents
thenwill replace the name of the table, leading to errors such as
Mysql2::Error: Column 'id' in field list is ambiguous
.It should replace only the very first match, not all of them.
The text was updated successfully, but these errors were encountered: