Fix the MySQL adapter to always set the right collation and charset
to the connection session.
Rafael Mendonça França
Fix MySQL adapter handling of time objects when prepared statements
are enabled.
Rafael Mendonça França
Fix scoping in enum fields using conditions that would generate
an IN clause.
Ryuta Kamizono
Skip optimised #exist? query when #include? is called on a relation
with a having clause
Relations that have aliased select values AND a having clause that
references an aliased select value would generate an error when
#include? was called, due to an optimisation that would generate
call #exists? on the relation instead, which effectively alters
the select values of the query (and thus removes the aliased select
values), but leaves the having clause intact. Because the having
clause is then referencing an aliased column that is no longer
present in the simplified query, an ActiveRecord::InvalidStatement
error was raised.
An sample query affected by this problem:
Author.select('COUNT(*) as total_posts', 'authors.*')
.joins(:posts)
.group(:id)
Fix the MySQL adapter to always set the right collation and charset
to the connection session.
Rafael Mendonça França
Fix MySQL adapter handling of time objects when prepared statements
are enabled.
Rafael Mendonça França
Fix scoping in enum fields using conditions that would generate
an IN clause.
Ryuta Kamizono
Skip optimised #exist? query when #include? is called on a relation
with a having clause
Relations that have aliased select values AND a having clause that
references an aliased select value would generate an error when
#include? was called, due to an optimisation that would generate
call #exists? on the relation instead, which effectively alters
the select values of the query (and thus removes the aliased select
values), but leaves the having clause intact. Because the having
clause is then referencing an aliased column that is no longer
present in the simplified query, an ActiveRecord::InvalidStatement
error was raised.
An sample query affected by this problem:
Author.select('COUNT(*) as total_posts', 'authors.*')
.joins(:posts)
.group(:id)
.having('total_posts > 2')
.include?(Author.first)
This change adds an addition check to the condition that skips the
simplified #exists? query, which simply checks for the presence of
a having clause.
Increment postgres prepared statement counter before making a prepared statement, so if the statement is aborted
without Rails knowledge (e.g., if app gets kill -9d during long-running query or due to Rack::Timeout), app won't end
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase will rebase this PR
@dependabot recreate will recreate this PR, overwriting any edits that have been made to it
@dependabot merge will merge this PR after your CI passes on it
@dependabot squash and merge will squash and merge this PR after your CI passes on it
@dependabot cancel merge will cancel a previously requested merge and block automerging
@dependabot reopen will reopen this PR if it is closed
@dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
@dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
@dependabot use these labels will set the current labels as the default for future PRs for this repo and language
@dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
@dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
@dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the Security Alerts page.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/plashchynski/crono/pull/93
**Author:** [@dependabot[bot]](https://github.com/apps/dependabot)
**Created:** 3/2/2021
**Status:** ❌ Closed
**Base:** `master` ← **Head:** `dependabot/bundler/activerecord-6.1.3`
---
### 📝 Commits (1)
- [`9f8ea9c`](https://github.com/plashchynski/crono/commit/9f8ea9c4c45cd9988d1a8e0036ee2cdaedc677ca) Bump activerecord from 5.0.0.1 to 6.1.3
### 📊 Changes
**1 file changed** (+17 additions, -17 deletions)
<details>
<summary>View changed files</summary>
📝 `Gemfile.lock` (+17 -17)
</details>
### 📄 Description
Bumps [activerecord](https://github.com/rails/rails) from 5.0.0.1 to 6.1.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/rails/rails/releases">activerecord's releases</a>.</em></p>
<blockquote>
<h2>6.1.3</h2>
<h2>Active Support</h2>
<ul>
<li>No changes.</li>
</ul>
<h2>Active Model</h2>
<ul>
<li>No changes.</li>
</ul>
<h2>Active Record</h2>
<ul>
<li>
<p>Fix the MySQL adapter to always set the right collation and charset
to the connection session.</p>
<p><em>Rafael Mendonça França</em></p>
</li>
<li>
<p>Fix MySQL adapter handling of time objects when prepared statements
are enabled.</p>
<p><em>Rafael Mendonça França</em></p>
</li>
<li>
<p>Fix scoping in enum fields using conditions that would generate
an <code>IN</code> clause.</p>
<p><em>Ryuta Kamizono</em></p>
</li>
<li>
<p>Skip optimised #exist? query when #include? is called on a relation
with a having clause</p>
<p>Relations that have aliased select values AND a having clause that
references an aliased select value would generate an error when
#include? was called, due to an optimisation that would generate
call #exists? on the relation instead, which effectively alters
the select values of the query (and thus removes the aliased select
values), but leaves the having clause intact. Because the having
clause is then referencing an aliased column that is no longer
present in the simplified query, an ActiveRecord::InvalidStatement
error was raised.</p>
<p>An sample query affected by this problem:</p>
<pre lang="ruby"><code>Author.select('COUNT(*) as total_posts', 'authors.*')
.joins(:posts)
.group(:id)
</code></pre>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/rails/rails/blob/v6.1.3/activerecord/CHANGELOG.md">activerecord's changelog</a>.</em></p>
<blockquote>
<h2>Rails 6.1.3 (February 17, 2021)</h2>
<ul>
<li>
<p>Fix the MySQL adapter to always set the right collation and charset
to the connection session.</p>
<p><em>Rafael Mendonça França</em></p>
</li>
<li>
<p>Fix MySQL adapter handling of time objects when prepared statements
are enabled.</p>
<p><em>Rafael Mendonça França</em></p>
</li>
<li>
<p>Fix scoping in enum fields using conditions that would generate
an <code>IN</code> clause.</p>
<p><em>Ryuta Kamizono</em></p>
</li>
<li>
<p>Skip optimised #exist? query when #include? is called on a relation
with a having clause</p>
<p>Relations that have aliased select values AND a having clause that
references an aliased select value would generate an error when
#include? was called, due to an optimisation that would generate
call #exists? on the relation instead, which effectively alters
the select values of the query (and thus removes the aliased select
values), but leaves the having clause intact. Because the having
clause is then referencing an aliased column that is no longer
present in the simplified query, an ActiveRecord::InvalidStatement
error was raised.</p>
<p>An sample query affected by this problem:</p>
<pre lang="ruby"><code>Author.select('COUNT(*) as total_posts', 'authors.*')
.joins(:posts)
.group(:id)
.having('total_posts > 2')
.include?(Author.first)
</code></pre>
<p>This change adds an addition check to the condition that skips the
simplified #exists? query, which simply checks for the presence of
a having clause.</p>
<p>Fixes <a href="https://github-redirect.dependabot.com/rails/rails/issues/41417">#41417</a></p>
<p><em>Michael Smart</em></p>
</li>
<li>
<p>Increment postgres prepared statement counter before making a prepared statement, so if the statement is aborted
without Rails knowledge (e.g., if app gets kill -9d during long-running query or due to Rack::Timeout), app won't end</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/rails/rails/commit/5aaaa1630ae9a71b3c3ecc4dc46074d678c08d67"><code>5aaaa16</code></a> Preparing for 6.1.3 release</li>
<li><a href="https://github.com/rails/rails/commit/4f5e6b5317ea6d96b146a9f562c429f77071dfba"><code>4f5e6b5</code></a> Revert "Merge pull request <a href="https://github-redirect.dependabot.com/rails/rails/issues/41232">#41232</a> from code4me/fix-malformed-packet-master"</li>
<li><a href="https://github.com/rails/rails/commit/eddb809b92808de50235a7975106ff974bee540f"><code>eddb809</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/rails/rails/issues/41441">#41441</a> from jonathanhefner/apidocs-inline-code-markup</li>
<li><a href="https://github.com/rails/rails/commit/2a7ff0a5f54979b14b19f827c99295297dda411d"><code>2a7ff0a</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/rails/rails/issues/41419">#41419</a> from smartygus/activerecord-findermethod-include-wi...</li>
<li><a href="https://github.com/rails/rails/commit/442c6f16f10ea578e1a87717ce6da7f5716cad13"><code>442c6f1</code></a> Merge PR <a href="https://github-redirect.dependabot.com/rails/rails/issues/41356">#41356</a></li>
<li><a href="https://github.com/rails/rails/commit/48af94b3b71fe9eb4fec36902e79e36a0c9bb91b"><code>48af94b</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/rails/rails/issues/41394">#41394</a> from afrase/recursive-association-fix</li>
<li><a href="https://github.com/rails/rails/commit/2ca0d6647834533b0559328dc58167a0f4e5f190"><code>2ca0d66</code></a> Fix string quotes</li>
<li><a href="https://github.com/rails/rails/commit/8d825b557500fd1a0f96d9e73ef23d0859154e10"><code>8d825b5</code></a> Make we always type cast TimeWithZone objects before passing to mysql2</li>
<li><a href="https://github.com/rails/rails/commit/d0f51649c12ed4d97ac24814cc30b47abd92a4b5"><code>d0f5164</code></a> Merge branch '6-1-sec' into 6-1-stable</li>
<li><a href="https://github.com/rails/rails/commit/130c128eae233bf71231c73b9c3c3b3f3ede918b"><code>130c128</code></a> Preparing for 6.1.2.1 release</li>
<li>Additional commits viewable in <a href="https://github.com/rails/rails/compare/v5.0.0.1...v6.1.3">compare view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/plashchynski/crono/network/alerts).
</details>
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/plashchynski/crono/pull/93
Author: @dependabot[bot]
Created: 3/2/2021
Status: ❌ Closed
Base:
master← Head:dependabot/bundler/activerecord-6.1.3📝 Commits (1)
9f8ea9cBump activerecord from 5.0.0.1 to 6.1.3📊 Changes
1 file changed (+17 additions, -17 deletions)
View changed files
📝
Gemfile.lock(+17 -17)📄 Description
Bumps activerecord from 5.0.0.1 to 6.1.3.
Release notes
Sourced from activerecord's releases.
... (truncated)
Changelog
Sourced from activerecord's changelog.
... (truncated)
Commits
5aaaa16Preparing for 6.1.3 release4f5e6b5Revert "Merge pull request #41232 from code4me/fix-malformed-packet-master"eddb809Merge pull request #41441 from jonathanhefner/apidocs-inline-code-markup2a7ff0aMerge pull request #41419 from smartygus/activerecord-findermethod-include-wi...442c6f1Merge PR #4135648af94bMerge pull request #41394 from afrase/recursive-association-fix2ca0d66Fix string quotes8d825b5Make we always type cast TimeWithZone objects before passing to mysql2d0f5164Merge branch '6-1-sec' into 6-1-stable130c128Preparing for 6.1.2.1 releaseDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)@dependabot use these labelswill set the current labels as the default for future PRs for this repo and language@dependabot use these reviewerswill set the current reviewers as the default for future PRs for this repo and language@dependabot use these assigneeswill set the current assignees as the default for future PRs for this repo and language@dependabot use this milestonewill set the current milestone as the default for future PRs for this repo and languageYou can disable automated security fix PRs for this repo from the Security Alerts page.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.