| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | | |
Remove sqlite specific`supports_autoincrement?` which defaults to true
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
This is to be consistent with the way the mysql2 adapter times queries
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
string with timezone. Closes #12278.
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Dump UUID default functions to schema.rb [2nd version]. Fixes #10751.
Conflicts:
activerecord/CHANGELOG.md
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Oops, I should had run the tests
|
| | | |
| | | |
| | | |
| | | | |
This is not valid anymore after 08477a651648ba4417ded128aa37b9ae0dcbc9ce
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When the adapter is with prepared statement disabled and the binds array
is not empty the connection adapter will try to set the binds values and
will fail. Now we are checking if the adapter has the prepared statement
disabled.
Fixes #12023
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit 71ff7d9c6592b93e2c810a1f464943dd7bd02c7f.
Reason: I need to check with @jeremy if we can do this.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The visitor have to consume the bind parameters to make the statements
work when the prepared statement option is disabled.
Fixes #12023
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Remove extra case.
|
| | |/ /
| |/| | |
|