aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
Commit message (Collapse)AuthorAgeFilesLines
* Correctly escape PostgreSQL arrays.Aaron Patterson2014-02-181-1/+5
| | | | | | Thanks Godfrey Chan for reporting this! Fixes: CVE-2014-0080
* MySQL: remove the old-school 'packets out of order' messageJeremy Kemper2013-12-171-6/+0
| | | | Blast from the past, MySQL 4 era, when the password hashing style changed.
* Fix missing closing rdoc tag [ci skip]Carlos Antonio da Silva2013-12-161-1/+1
|
* support creating temporary tables from queriesCody Cutrer2013-12-145-17/+38
| | | | | also override drop_table in AbstractMySQLAdapter to properly drop temporary tables without committing the transaction
* Fix mysql to support duplicated column namesKassio Borges2013-12-131-3/+8
| | | | | | | | | | 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.
* Merge pull request #13291 from strzibny/new_unique_constraintYves Senn2013-12-121-1/+5
|\ | | | | Translate new unique constraint error message for sqlite >= 3.8.2
| * Translate new unique constraint for sqlite >= 3.8.2Josef Stribny2013-12-121-1/+5
| |
* | Remove `DEFAULT NULL` for primary key column to support MySQL 5.7.3Yasuo Honda2013-12-101-1/+1
| | | | | | | | Since MySQL 5.7.3 m13 does now allow primary key column is null.
* | fix pg warnings on geometric typesAaron Patterson2013-12-051-10/+23
| |
* | Use the right type_mapRafael Mendonça França2013-12-052-5/+3
| |
* | make the type_map per connection. fixes #13182Aaron Patterson2013-12-042-12/+17
| |
* | `connection.type_to_sql` returns a `String` for unmapped types.Yves Senn2013-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | Closes #13146. This fixes an error when using: ``` change_colum :table, :column, :bigint, array: true ```
* | Currently, we clear query_cache in cache block finish, even if we may ↵Vipul A M2013-12-031-1/+1
| | | | | | | | | | | | already have cache true. This commit takes into account the last cache_enabled value, before clearing query_cache.
* | Merge pull request #13111 from akshay-vishnoi/typoCarlos Antonio da Silva2013-11-301-1/+1
|\ \ | | | | | | Typo fixes [ci skip]
| * | Typo fixes [ci skip]Akshay Vishnoi2013-11-301-1/+1
| | |
* | | Remove unused variableRafael Mendonça França2013-11-291-1/+1
|/ / | | | | | | | | This method is not using the block variable directly since it is calling yield
* | Merge pull request #13099 from kamipo/remove_case_sensitive_equality_operatorCarlos Antonio da Silva2013-11-291-4/+0
|\ \ | | | | | | Remove `DatabaseStatements#case_sensitive_equality_operator`. It has been deprecated already.
| * | Remove `DatabaseStatements#case_sensitive_equality_operator`. It has been ↵Ryuta Kamizono2013-11-291-4/+0
| | | | | | | | | | | | deprecated already.
* | | Merge pull request #13100 from akshay-vishnoi/f-refactorCarlos Antonio da Silva2013-11-291-3/+8
|\ \ \ | |/ / |/| | #type_cast - improve performance & readability
| * | #type_cast - improve performance & readabilityAkshay Vishnoi2013-11-291-3/+8
| | |
* | | fix mysql version check in rename_indexCody Cutrer2013-11-281-1/+1
| | | | | | | | | | | | also clarify native rename_index support is >= 5.7, not > 5.7
* | | implement rename_index natively for MySQL > 5.7Cody Cutrer2013-11-281-0/+8
| | |
* | | `rename_index`: add the new index before removing the old one.Yves Senn2013-11-261-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | 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.
* | Drop unused param `should_be_quoted` to `PostgreSQLColumn#array_to_string`Vipul A M2013-11-171-1/+1
| |
* | 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
| | |