File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
activerecord/lib/active_record/connection_adapters Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -641,8 +641,9 @@ def default_index_type?(index) # :nodoc:
641
641
def build_insert_sql ( insert ) # :nodoc:
642
642
no_op_column = quote_column_name ( insert . keys . first )
643
643
644
- # Avoid MySQL 8.0 deprecation warning, see https://dev.mysql.com/worklog/task/?id=13325.
645
- if !mariadb? && database_version >= "8.0.0"
644
+ # MySQL 8.0.19 replaces `VALUES(<expression>)` clauses with row and column alias names, see https://dev.mysql.com/worklog/task/?id=6312 .
645
+ # then MySQL 8.0.20 deprecates the `VALUES(<expression>)` see https://dev.mysql.com/worklog/task/?id=13325 .
646
+ if !mariadb? && database_version >= "8.0.19"
646
647
values_alias = quote_table_name ( "#{ insert . model . table_name } _values" )
647
648
sql = +"INSERT #{ insert . into } #{ insert . values_list } AS #{ values_alias } "
648
649
You can’t perform that action at this time.
0 commit comments