aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge pull request #12779 from ↵Aaron Patterson2013-11-152-10/+0
|\ \ | | | | | | | | | | | | dougbarth/dont_swallow_exceptions_during_transactional_statements_in_mysql Don't swallow exceptions in transctional statements
| * | Don't swallow exceptions in transctional statementsDoug Barth2013-11-052-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge pull request #12832 from vipulnsward/move_schema_creationYves Senn2013-11-142-78/+84
|\ \ \ | | | | | | | | Move `SchemaCreation` to its own file instead of `AbstractAdapter`.
| * | | Move `SchemaCreation` to its own file instead of `AbstractAdapter`.Vipul A M2013-11-122-78/+84
| | | |
* | | | Remove the unused, undocumented SQLite3Adapter#supports_count_distinct?Ben Woosley2013-11-121-5/+0
| | | | | | | | | | | | | | | | This has returned true since 3cc9b5f1, and is not used internally.
* | | | Drop a sqlite_version check because we only support SQLite 3.6.16 or newer.Ben Woosley2013-11-122-7/+1
| | | | | | | | | | | | Drop some comments that document the implementation rather than the interface.
* | | | Unifies mysql and mysql2 casting of booleans.Yves Senn2013-11-112-6/+6
| | | |
* | | | autoload ChangeColumnDefinition (Fixes #12835)Anton Kalyaev2013-11-111-0/+1
| | | |
* | | | Change array check for better aesthetics / reading the codeCarlos Antonio da Silva2013-11-091-1/+1
| | | |
* | | | Document the bind returnRafael Mendonça França2013-11-091-0/+3
| | | |
* | | | Avoid shot circuit return.Rafael Mendonça França2013-11-091-8/+20
| | | | | | | | | | | | | | | | This will make the conditional and to code clear
* | | | Don't use Active Support where we don't need toRafael Mendonça França2013-11-093-3/+3
| | | |
* | | | log bind variables after they were type casted.Yves Senn2013-11-093-10/+16
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]]
* / / add autoload :TransactionState to fix Marshal.load issuesJason Ayre2013-11-071-0/+1
|/ /
* | ask the fixture set for the sql statementsAaron Patterson2013-11-041-1/+5
| |
* | fix code typo in `MysqlAdapter` .Closes #12647.Yves Senn2013-10-301-1/+1
| |
* | Merge pull request #10664 from aderyabin/docpatchYves Senn2013-10-291-1/+1
|\ \ | | | | | | Fix doc in Postgres database creation [ci skip]
| * | Fix doc in Postgres database creationAndrey Deryabin2013-06-251-1/+1
| | |
* | | Remove confusing generated-code commentaryJeremy Kemper2013-10-281-4/+4
| | |
* | | Add a note about ensuring the version is right for the adapter (since you ↵David Heinemeier Hansson2013-10-271-1/+1
| | | | | | | | | | | | might well have specified the right gem, but locked it to too low of a version)
* | | cast json values on write to be consistent with reading from the db.Severin Schoepke2013-10-251-0/+4
| | | | | | | | | | | | See also commit 5ac2341fab689344991b2a4817bd2bc8b3edac9d
* | | `ActiveRecord::Store` works together with PG `hstore` columns.Yves Senn2013-10-252-0/+12
| | | | | | | | | | | | | | | | | | 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.
* | | Escape the parentheses in the default function regexpRafael Mendonça França2013-10-211-1/+1
| |/ |/| | | | | | | | | | | This is causing every default value in PostreSQL database to being handled as default function. Fixes #12581
* | Remove `default_primary_key_type` and extract contains of ↵Vipul A M2013-10-141-18/+16
| | | | | | | | `native_database_types` to a constant since they aren't conditional now in SQLite3Adapter. Makes it more like other adapters.
* | Merge pull request #11833 from vipulnsward/remove_autoincrementRafael Mendonça França2013-10-141-10/+1
|\ \ | | | | | | Remove sqlite specific`supports_autoincrement?` which defaults to true
| * | Remove sqlite specific`supports_autoincrement?` which always defaults to trueVipul A M2013-08-101-10/+1
| | |
* | | Extract a function to determine if the default value is a functionRafael Mendonça França2013-10-141-1/+5
| | |
* | | Push default_function to superclass to avoid method checkRafael Mendonça França2013-10-142-14/+17
| | |
* | | log the statement name along with the SQLAaron Patterson2013-10-042-6/+7
| | |
* | | log every sql statement, even when they errorAaron Patterson2013-10-041-25/+25
| | |
* | | prepare the statement inside the begin / rescue blockAaron Patterson2013-10-041-4/+4
| | |
* | | wrap logging around the actual query call itself.Aaron Patterson2013-10-042-50/+50
| | | | | | | | | | | | This is to be consistent with the way the mysql2 adapter times queries
* | | extract adapter savepoint implementations into `abstract/savepoints.rb`.Yves Senn2013-09-306-46/+27
| | |
* | | change the savepoint interface to allow passing the name.Yves Senn2013-09-304-21/+21
| | |
* | | Fixed issue #12327Marc Lennox2013-09-271-2/+2
| | |
* | | ActiveRecord::ConnectionAdapters::Column.string_to_time method respects ↵kennyj2013-09-251-3/+11
| | | | | | | | | | | | string with timezone. Closes #12278.
* | | Merge pull request #11382 from kennyj/fix_10751-2Rafael Mendonça França2013-09-221-3/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Dump UUID default functions to schema.rb [2nd version]. Fixes #10751. Conflicts: activerecord/CHANGELOG.md
| * | | Migration dump UUID default functions to schema.rb. Fixes #10751.kennyj2013-07-101-3/+6
| | | |
* | | | Disable prepared statements in the unprepared_statement blockRafael Mendonça França2013-09-121-2/+3
| | | |
* | | | Fix inverted conditionalRafael Mendonça França2013-09-111-1/+1
| | | | | | | | | | | | | | | | Oops, I should had run the tests
* | | | Remove invalid commentRafael Mendonça França2013-09-111-4/+0
| | | | | | | | | | | | | | | | This is not valid anymore after 08477a651648ba4417ded128aa37b9ae0dcbc9ce
* | | | Check if the SQL is not a prepared statementRafael Mendonça França2013-09-118-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Revert "Do not dup the binds when visiting the AST"Rafael Mendonça França + Kassio Borges2013-08-312-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 71ff7d9c6592b93e2c810a1f464943dd7bd02c7f. Reason: I need to check with @jeremy if we can do this.
* | | | Do not dup the binds when visiting the ASTRafael Mendonça França2013-08-312-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The visitor have to consume the bind parameters to make the statements work when the prepared statement option is disabled. Fixes #12023
* | | | Perf: fields in pg gem causes an allocation, cache itSam2013-08-271-2/+3
| | | |
* | | | Merge pull request #11827 from vipulnsward/remove_extra_caseSantiago Pastorino2013-08-261-1/+0
|\ \ \ \ | | | | | | | | | | Remove extra case.
| * | | | Remove extra case.Vipul A M2013-08-101-1/+0
| | |/ / | |/| |
* | | | PG adapter deals with negative money values formatted with parenthesis.Yves Senn2013-08-261-0/+5
| | | | | | | | | | | | | | | | Closes #11899.
* | | | Use infinity constKonstantin Shabanov2013-08-221-2/+2
| | | |
* | | | Stop interpreting SQL 'string' columns as :string type.Ben Woosley2013-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SQL doesn't have a string type, and interpreting 'string' as text is contrary to at least SQLite3's behavior: "Note that a declared type of 'STRING' has an affinity of NUMERIC, not TEXT." http://www.sqlite.org/datatype3.html