| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, executing an insert SQL in PostgreSQL with a command like this:
insert into articles(
number)
values(
5152
)
would not work because the adapter was unable to extract the correct articles table name.
|
| |
| |
| |
| | |
Blast from the past, MySQL 4 era, when the password hashing style changed.
|
| | |
|
| |
| |
| |
| |
| | |
also override drop_table in AbstractMySQLAdapter to properly drop
temporary tables without committing the transaction
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This will fix the [broken
test](https://github.com/rails/rails/commit/4a2650836680f51490e999c3c8441a2f9adff96e)
`test_with_limiting_with_custom_select`.
The query's result was built in a hash with column name as key, if the
result have a duplicated column name the last value was
overriding the first one.
|
|\ \
| | |
| | | |
Translate new unique constraint error message for sqlite >= 3.8.2
|
| | | |
|
| | |
| | |
| | |
| | | |
Since MySQL 5.7.3 m13 does now allow primary key column is null.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Closes #13146.
This fixes an error when using:
```
change_colum :table, :column, :bigint, array: true
```
|
| | |
| | |
| | |
| | |
| | |
| | | |
already have cache true.
This commit takes into account the last cache_enabled value, before clearing query_cache.
|
|\ \ \
| | | |
| | | | |
Typo fixes [ci skip]
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | | |
This method is not using the block variable directly since it is calling
yield
|
|\ \ \
| | | |
| | | | |
Remove `DatabaseStatements#case_sensitive_equality_operator`. It has been deprecated already.
|
| | | |
| | | |
| | | |
| | | | |
deprecated already.
|
|\ \ \ \
| |/ / /
|/| | | |
#type_cast - improve performance & readability
|
| | |/
| |/| |
|
| | |
| | |
| | |
| | | |
also clarify native rename_index support is >= 5.7, not > 5.7
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This prevents the following error when a MySQL index on a foreign key
column is renamed:
```
ActiveRecord::StatementInvalid: Mysql2::Error: Cannot drop index 'index_engines_on_car_id': needed in a foreign key constraint: DROP INDEX `index_engines_on_car_id` ON `engines`
```
refs: #13038.
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
dougbarth/dont_swallow_exceptions_during_transactional_statements_in_mysql
Don't swallow exceptions in transctional statements
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The MySQL connection adapater swallows all StandardError exceptions,
which includes Mysql::Error and Mysql2::Error. The comment in the
exception clause claims errors thrown here indicate that transactions
aren't supported by the server but that isn't necessarily true. It's
possible the MySQL server has gone away and swallowing a failed commit
may let the application return a successful response when the data has
not been saved. Also, replication libraries like Galera require that the
application handle exceptions thrown at BEGIN/COMMIT.
I'm unable to determine what version of MySQL threw an exception for
transactional statements. I tried as far back as 3.23.49 with InnoDB
disabled but BEGIN & COMMIT statements do not throw an error. If there's
a real case for this logic to continue, we could instead push this
behavior into a configuration setting.
The exception swallowing has been there since the beginning:
db045dbbf60b53dbe013ef25554fd013baf88134
|
|\ \ \
| | | |
| | | | |
Move `SchemaCreation` to its own file instead of `AbstractAdapter`.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
This has returned true since 3cc9b5f1, and is not used internally.
|
| | | |
| | | |
| | | | |
Drop some comments that document the implementation rather than the interface.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
This will make the conditional and to code clear
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The log output used to be confusing in situation where type casting has
"unexpected" effects. For example when finding records with a `String`.
BEFORE:
irb(main):002:0> Event.find("im-no-integer")
D, [2013-11-09T11:10:28.998857 #1706] DEBUG -- : Event Load (4.5ms) SELECT "events".* FROM "events" WHERE "events"."id" = $1 LIMIT 1 [["id", "im-no-integer"]]
AFTER:
irb(main):002:0> Event.find("im-no-integer")
D, [2013-11-09T11:10:28.998857 #1706] DEBUG -- : Event Load (4.5ms) SELECT "events".* FROM "events" WHERE "events"."id" = $1 LIMIT 1 [["id", 0]]
|
|/ / |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Fix doc in Postgres database creation [ci skip]
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
might well have specified the right gem, but locked it to too low of a version)
|
| | |
| | |
| | |
| | | |
See also commit 5ac2341fab689344991b2a4817bd2bc8b3edac9d
|
| | |
| | |
| | |
| | |
| | |
| | | |
This is necessary because as of 5ac2341 `hstore` columns are always stored
as `Hash` with `String` keys. `ActiveRecord::Store` expected the attribute to
be an instance of `HashWithIndifferentAccess`, which led to the bug.
|
| |/
|/|
| |
| |
| |
| |
| | |
This is causing every default value in PostreSQL database to being
handled as default function.
Fixes #12581
|
| |
| |
| |
| | |
`native_database_types` to a constant since they aren't conditional now in SQLite3Adapter. Makes it more like other adapters.
|