mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Updated MySQL documentation link to MySQL latest version 5.7 everywhere [ci skip]
Bumps from `5.6` to `5.7`
This commit is contained in:
parent
0f40becce0
commit
08c0ef777f
8 changed files with 12 additions and 12 deletions
|
@ -137,7 +137,7 @@ module ActiveRecord
|
|||
#
|
||||
# In order to get around this problem, #transaction will emulate the effect
|
||||
# of nested transactions, by using savepoints:
|
||||
# http://dev.mysql.com/doc/refman/5.6/en/savepoint.html
|
||||
# http://dev.mysql.com/doc/refman/5.7/en/savepoint.html
|
||||
# Savepoints are supported by MySQL and PostgreSQL. SQLite3 version >= '3.6.8'
|
||||
# supports savepoints.
|
||||
#
|
||||
|
@ -190,7 +190,7 @@ module ActiveRecord
|
|||
# semantics of these different levels:
|
||||
#
|
||||
# * http://www.postgresql.org/docs/current/static/transaction-iso.html
|
||||
# * https://dev.mysql.com/doc/refman/5.6/en/set-transaction.html
|
||||
# * https://dev.mysql.com/doc/refman/5.7/en/set-transaction.html
|
||||
#
|
||||
# An <tt>ActiveRecord::TransactionIsolationError</tt> will be raised if:
|
||||
#
|
||||
|
|
|
@ -980,14 +980,14 @@ module ActiveRecord
|
|||
defaults = [':default', :default].to_set
|
||||
|
||||
# Make MySQL reject illegal values rather than truncating or blanking them, see
|
||||
# http://dev.mysql.com/doc/refman/5.6/en/sql-mode.html#sqlmode_strict_all_tables
|
||||
# http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_strict_all_tables
|
||||
# If the user has provided another value for sql_mode, don't replace it.
|
||||
unless variables.has_key?('sql_mode') || defaults.include?(@config[:strict])
|
||||
variables['sql_mode'] = strict_mode? ? 'STRICT_ALL_TABLES' : ''
|
||||
end
|
||||
|
||||
# NAMES does not have an equals sign, see
|
||||
# http://dev.mysql.com/doc/refman/5.6/en/set-statement.html#id944430
|
||||
# http://dev.mysql.com/doc/refman/5.7/en/set-statement.html#id944430
|
||||
# (trailing comma because variable_assignments will always have content)
|
||||
if @config[:encoding]
|
||||
encoding = "NAMES #{@config[:encoding]}"
|
||||
|
|
|
@ -58,9 +58,9 @@ module ActiveRecord
|
|||
# * <tt>:password</tt> - Defaults to nothing.
|
||||
# * <tt>:database</tt> - The name of the database. No default, must be provided.
|
||||
# * <tt>:encoding</tt> - (Optional) Sets the client encoding by executing "SET NAMES <encoding>" after connection.
|
||||
# * <tt>:reconnect</tt> - Defaults to false (See MySQL documentation: http://dev.mysql.com/doc/refman/5.6/en/auto-reconnect.html).
|
||||
# * <tt>:strict</tt> - Defaults to true. Enable STRICT_ALL_TABLES. (See MySQL documentation: http://dev.mysql.com/doc/refman/5.6/en/sql-mode.html)
|
||||
# * <tt>:variables</tt> - (Optional) A hash session variables to send as <tt>SET @@SESSION.key = value</tt> on each database connection. Use the value +:default+ to set a variable to its DEFAULT value. (See MySQL documentation: http://dev.mysql.com/doc/refman/5.6/en/set-statement.html).
|
||||
# * <tt>:reconnect</tt> - Defaults to false (See MySQL documentation: http://dev.mysql.com/doc/refman/5.7/en/auto-reconnect.html).
|
||||
# * <tt>:strict</tt> - Defaults to true. Enable STRICT_ALL_TABLES. (See MySQL documentation: http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html)
|
||||
# * <tt>:variables</tt> - (Optional) A hash session variables to send as <tt>SET @@SESSION.key = value</tt> on each database connection. Use the value +:default+ to set a variable to its DEFAULT value. (See MySQL documentation: http://dev.mysql.com/doc/refman/5.7/en/set-statement.html).
|
||||
# * <tt>:sslca</tt> - Necessary to use MySQL with an SSL connection.
|
||||
# * <tt>:sslkey</tt> - Necessary to use MySQL with an SSL connection.
|
||||
# * <tt>:sslcert</tt> - Necessary to use MySQL with an SSL connection.
|
||||
|
|
|
@ -51,7 +51,7 @@ module ActiveRecord
|
|||
# end
|
||||
#
|
||||
# Database-specific information on row locking:
|
||||
# MySQL: http://dev.mysql.com/doc/refman/5.6/en/innodb-locking-reads.html
|
||||
# MySQL: http://dev.mysql.com/doc/refman/5.7/en/innodb-locking-reads.html
|
||||
# PostgreSQL: http://www.postgresql.org/docs/current/interactive/sql-select.html#SQL-FOR-UPDATE-SHARE
|
||||
module Pessimistic
|
||||
# Obtain a row lock on this record. Reloads the record to obtain the requested
|
||||
|
|
|
@ -167,7 +167,7 @@ module ActiveRecord
|
|||
# writing, the only database that we're aware of that supports true nested
|
||||
# transactions, is MS-SQL. Because of this, Active Record emulates nested
|
||||
# transactions by using savepoints on MySQL and PostgreSQL. See
|
||||
# http://dev.mysql.com/doc/refman/5.6/en/savepoint.html
|
||||
# http://dev.mysql.com/doc/refman/5.7/en/savepoint.html
|
||||
# for more information about savepoints.
|
||||
#
|
||||
# === Callbacks
|
||||
|
|
|
@ -636,7 +636,7 @@ class Holiday < ActiveRecord::Base
|
|||
message: "should happen once per year" }
|
||||
end
|
||||
```
|
||||
Should you wish to create a database constraint to prevent possible violations of a uniqueness validation using the `:scope` option, you must create a unique index on both columns in your database. See [the MySQL manual](http://dev.mysql.com/doc/refman/5.6/en/multiple-column-indexes.html) for more details about multiple column indexes or [the PostgreSQL manual](http://www.postgresql.org/docs/current/static/ddl-constraints.html) for examples of unique constraints that refer to a group of columns.
|
||||
Should you wish to create a database constraint to prevent possible violations of a uniqueness validation using the `:scope` option, you must create a unique index on both columns in your database. See [the MySQL manual](http://dev.mysql.com/doc/refman/5.7/en/multiple-column-indexes.html) for more details about multiple column indexes or [the PostgreSQL manual](http://www.postgresql.org/docs/current/static/ddl-constraints.html) for examples of unique constraints that refer to a group of columns.
|
||||
|
||||
There is also a `:case_sensitive` option that you can use to define whether the
|
||||
uniqueness constraint will be case sensitive or not. This option defaults to
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# gem 'activerecord-jdbcmysql-adapter'
|
||||
#
|
||||
# And be sure to use new-style password hashing:
|
||||
# http://dev.mysql.com/doc/refman/5.6/en/old-client.html
|
||||
# http://dev.mysql.com/doc/refman/5.7/en/old-client.html
|
||||
#
|
||||
default: &default
|
||||
adapter: mysql
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# gem 'mysql2'
|
||||
#
|
||||
# And be sure to use new-style password hashing:
|
||||
# http://dev.mysql.com/doc/refman/5.6/en/old-client.html
|
||||
# http://dev.mysql.com/doc/refman/5.7/en/old-client.html
|
||||
#
|
||||
default: &default
|
||||
adapter: mysql2
|
||||
|
|
Loading…
Reference in a new issue