You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Same problem here. We have an app which is mostly based on MySQL views. After upgrading from 7.0.2.4 to 7.0.3, it gets broken because you would get NoMethodError: undefined method 'match' for nil:NilClass for every SELECT.
I've merged @fatkodima's PR (thank you!) and backported this to 7-0-stable. The fix will be in the next release, which will not be this week or next week as I'm prepping for my RailsConf keynote.
In the meantime you can link to 7-0-stable on GitHub in your Gemfile.
Calling
count
,where
(, ...and so on) for a mysql view causes an error.Steps to reproduce
I hope you could reproduce with this.
backtrace:
Expected behavior
occured here:
https://github.com/rails/rails/blob/v7.0.3/activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb#L162
https://github.com/rails/rails/blob/v7.0.3/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb#L826-L828
Should work without error even if
table_name
is for a view.Actual behavior
When using the SHOW CREATE TABLE syntax, a "Create Table" column could be get for a normal table,
but for a view, a "Create View" column is generated, so the expected value could not be obtained.
System configuration
Rails version: 7.0.3
Ruby version: 3.1.2
MySQL: 8.0.29
Probable cause
MySQL::SchemaStatements#create_table_sql
#44712The text was updated successfully, but these errors were encountered: