Skip to content

Commit

Permalink
Merge pull request #45134 from HParker/stop-explicitly-setting-sql_au…
Browse files Browse the repository at this point in the history
…to_is_null

no longer set sql_auto_is_null
  • Loading branch information
byroot committed May 19, 2022
2 parents 9e03207 + a79c1a6 commit 0100a27
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 7 additions & 1 deletion activerecord/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
* Stop setting `sql_auto_is_null`

Since version 5.5 the default has been off, we no longer have to manually turn it off.

*Adam Hess*

* Fix `touch` to raise an error for readonly columns.

*fatkodima*
Expand Down Expand Up @@ -35,7 +41,7 @@

* Support encrypted attributes on columns with default db values.

This adds support for encrypted attributes defined on columns with default values.
This adds support for encrypted attributes defined on columns with default values.
It will encrypt those values at creation time. Before, it would raise an
error unless `config.active_record.encryption.support_unencrypted_data` was true.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -787,9 +787,6 @@ def supports_rename_column?
def configure_connection
variables = @config.fetch(:variables, {}).stringify_keys

# By default, MySQL 'where id is null' selects the last inserted id; Turn this off.
variables["sql_auto_is_null"] = 0

# Increase timeout so the server doesn't disconnect us.
wait_timeout = self.class.type_cast_config_to_integer(@config[:wait_timeout])
wait_timeout = 2147483 unless wait_timeout.is_a?(Integer)
Expand Down

0 comments on commit 0100a27

Please sign in to comment.