- 18 11月, 2017 1 次提交
-
-
由 Matthew Draper 提交于
Use whatever adapter-provided means we have available to ensure forked children don't send quit/shutdown/goodbye messages to the server on connections that belonged to their parent.
-
- 13 11月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
Add new error class `StatementTimeout` which will be raised when statement timeout exceeded (#31129) We are sometimes using The MAX_EXECUTION_TIME hint for MySQL depending on the situation. It will prevent catastrophic performance down by wrong performing queries. The new error class `StatementTimeout` will make to be easier to handle that case. https://dev.mysql.com/doc/refman/5.7/en/optimizer-hints.html#optimizer-hints-execution-time
-
- 11 11月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
Follow up of #30360.
-
- 25 10月, 2017 1 次提交
-
-
由 Yasuo Honda 提交于
since the minimum version of PostgreSQL currently Rails supports is 9.1, there is no need to handle if `supports_extensions?` Refer https://www.postgresql.org/docs/9.1/static/sql-createextension.html "CREATE EXTENSION"
-
- 21 10月, 2017 1 次提交
-
-
由 Akira Matsuda 提交于
This basically reverts 9d4f79d3
-
- 15 10月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
We already found the longer sequence name, but we could not consider whether it was the sequence name created by serial type due to missed a max identifier length limitation. I've addressed the sequence name consideration to respect the max identifier length. Fixes #28332.
-
- 04 10月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 22 8月, 2017 2 次提交
-
-
由 Ryuta Kamizono 提交于
Currently `SchemaDumper` is only customizable for column options. But 3rd party connection adapters (oracle-enhanced etc) need to customizable for table or index dumping also. To make it possible, I introduced adapter specific `SchemaDumper` classes for that.
-
由 Yoshiyuki Hirano 提交于
-
- 21 8月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
`SET time zone 'value'` is an alias for `SET timezone TO 'value'`. https://www.postgresql.org/docs/current/static/sql-set.html So if `variables["timezone"]` is specified, it is enough to `SET timezone` once.
-
- 20 8月, 2017 2 次提交
-
-
由 Ryuta Kamizono 提交于
-
由 Ryuta Kamizono 提交于
currently integer types extracts the `limit` from `sql_type`. But the lookup key of type map is the `oid` in postgresql adapter. So in most case `sql_type` is passed to `extract_limit` as `""` and `limit` is extracted as `nil`. https://github.com/rails/rails/blob/v5.1.0.beta1/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L445 In mysql2 adapter, `limit` is registered correctly without extracting from `sql_type`. https://github.com/rails/rails/blob/v5.1.0.beta1/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb#L678-L682 Postgresql adapter should also be registered correctly. ``` ruby conn = ActiveRecord::Base.connection conn.select_all("SELECT 1::smallint, 2::integer, 3::bigint").column_types.map do |name, type| [name, type.limit] end ``` Before: ``` ruby # => [["int2", nil], ["int4", nil], ["int8", nil]] ``` After: ``` ruby # => [["int2", 2], ["int4", 4], ["int8", 8]] ```
-
- 30 7月, 2017 1 次提交
-
-
由 yuuji.yaginuma 提交于
It seems that it accepts only HTTPS connections. Ref: https://github.com/postgres/postgres/commit/7f77cbd996855a06fb742ea11adbe55c42b48fe2
-
- 20 7月, 2017 2 次提交
-
-
由 Ryuta Kamizono 提交于
`type_map` is an internal API and it is only used in the connection adapter. And also, some type map initializer methods requires passed `type_map`, but those instances already has `type_map` in itself. So we don't need explicit passing `type_map` to the initializers.
-
由 Kir Shatrov 提交于
-
- 14 7月, 2017 1 次提交
-
-
由 Chris Williams 提交于
connection_active? will sometimes return true when the connection is actually dead/disconnected (see #3392 for a discussion of why this is). When this happens, a query is run on the dead connection which causes various postgres connection errors to be raised. This fix catches any such errors and ignores them. Closes #29760
-
- 02 7月, 2017 1 次提交
-
-
由 Matthew Draper 提交于
This reverts commit 3420a145, reversing changes made to afb66a5a.
-
- 01 7月, 2017 2 次提交
-
-
由 Akira Matsuda 提交于
-
由 Kir Shatrov 提交于
-
- 30 6月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
`test_middleware_caches` is sometimes failed since #29454. The failure is due to schema statements are affected by query caching. Bypassing query caching for schema statements to avoid the issue.
-
- 29 6月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
Because identifiers in SQL could include a single quote. Related #24950, #26784.
-
- 30 5月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 01 5月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
`supports_statement_cache?` was introduced in 3.1.0.beta1 (104d0b26) for bind parameter substitution, but it is no longer used in 3.1.0.rc1 (73ff6797). Originally it should respect `prepared_statements` rather than `supports_statement_cache?` (fd398475). One more thing, named `supports_statement_cache?` is pretty misreading. We have `StatementCache` and `StatementPool`. However, `supports_statement_cache?` doesn't mean `StatementCache`, but `StatementPool` unlike its name. https://github.com/rails/rails/blob/v5.1.0/activerecord/lib/active_record/statement_cache.rb https://github.com/rails/rails/blob/v5.1.0/activerecord/lib/active_record/connection_adapters/statement_pool.rb
-
- 27 4月, 2017 1 次提交
-
-
由 Rafael Mendonça França 提交于
Revert "Merge pull request #27636 from mtsmfm/disable-referential-integrity-without-superuser-privilege-take-2" This reverts commit c1faca63, reversing changes made to 8c658a0e. See https://github.com/rails/rails/pull/27636#issuecomment-297534129
-
- 26 4月, 2017 1 次提交
-
-
由 Yasuo Honda 提交于
Address #28797 In the previous versions of PostgreSQL, `CURRENT_DATE` converted to `('now'::text)::date` and `CURRENT_TIMESTAMP` converted to `now()`. Refer these discussions and commit at PostgreSQL : https://www.postgresql.org/message-id/flat/5878.1463098164%40sss.pgh.pa.us#5878.1463098164@sss.pgh.pa.us https://github.com/postgres/postgres/commit/0bb51aa96783e8a6c473c2b5e3725e23e95db834
-
- 11 4月, 2017 1 次提交
-
-
由 Matthew Draper 提交于
Transactional-fixture using tests with racing threads and inter-thread synchronisation inside transaction blocks will now deadlock... but without this, they would just crash. In 5.0, the threads didn't share a connection at all, so it would've worked... but with the main thread inside the fixture transaction, they wouldn't've been able to see each other. So: as far as I can tell, the set of operations this "breaks" never had a compelling use case. Meanwhile, it provides an increased level of coherency to the operational feel of transactional fixtures. If this does cause anyone problems, they're probably best off disabling transactional fixtures on the affected tests, and managing transactions themselves.
-
- 26 3月, 2017 2 次提交
-
-
由 Ryuta Kamizono 提交于
-
由 Fumiaki MATSUSHIMA 提交于
Re-create https://github.com/rails/rails/pull/21233 eeac6151 was reverted (127509c0) because it breaks tests. ---------------- ref: 72c15572 - We must use `authors` fixture with `author_addresses` because of its foreign key constraint. - Tests require PostgreSQL >= 9.4.2 because it had a bug about `ALTER CONSTRAINTS` and fixed in 9.4.2.
-
- 23 3月, 2017 1 次提交
-
-
由 Fumiaki MATSUSHIMA 提交于
Because this comment is not document for `supports_ranges?` ref: https://github.com/rails/rails/pull/27636#discussion_r107560081
-
- 22 3月, 2017 1 次提交
-
-
由 Lars Kanis 提交于
The old top level classes PGconn, PGresult and PGError were deprecated since pg-0.13.0: https://github.com/ged/ruby-pg/blob/master/History.rdoc#v0130-2012-02-09-michael-granger-gedfaeriemudorg
-
- 14 3月, 2017 1 次提交
-
-
由 Matthew Draper 提交于
This reverts commit 192db644, reversing changes made to 98939553. We can't sacrifice correctness for performance.
-
- 10 3月, 2017 1 次提交
-
-
由 mylake 提交于
Use “distinct” to filter redundant types from pg_typeto reduce memory bloat especially in multi-schema structure database
-
- 27 2月, 2017 2 次提交
-
-
由 Ryuta Kamizono 提交于
Actually `index_name_length` depend on `max_identifier_length`, not always 63.
-
由 Ryuta Kamizono 提交于
`supports_migrations?` was added at 4160b518 to determine if schema statements (`create_table`, `drop_table`, etc) are implemented in the adapter. But all tested databases has been supported migrations since a4fc93c3 at least.
-
- 26 2月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
`valid_type?` should return true if a type exists in `native_database_types` at least. https://github.com/rails/rails/blob/v5.1.0.beta1/activerecord/lib/active_record/schema_dumper.rb#L136
-
- 21 2月, 2017 1 次提交
-
-
由 eileencodes 提交于
This ensures multiple threads inside a transactional test to see consistent database state. When a system test starts Puma spins up one thread and Capybara spins up another thread. Because of this when tests are run the database cannot see what was inserted into the database on teardown. This is because there are two threads using two different connections. This change uses the statement cache to lock the threads to using a single connection ID instead of each not being able to see each other. This code only runs in the fixture setup and teardown so it does not affect real production databases. When a transaction is opened we set `lock_thread` to `Thread.current` so we can keep track of which connection the thread is using. When we rollback the transaction we unlock the thread and then there will be no left-over data in the database because the transaction will roll back the correct connections. [ Eileen M. Uchitelle, Matthew Draper ]
-
- 20 2月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 14 2月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
Add `default_index_type?` to the generic schema dumper doesn't have the knowledge about an index type
-
- 13 2月, 2017 2 次提交
-
-
由 Ryuta Kamizono 提交于
Closes #27980
-
由 Ryuta Kamizono 提交于
Closes #27979
-