Skip to content

fix: prevent non-shared DB instances from polluting shared cache - #9679

Merged
michalsn merged 2 commits into
codeigniter4:developfrom
michalsn:fix/connection-share
Aug 13, 2025
Merged

fix: prevent non-shared DB instances from polluting shared cache#9679
michalsn merged 2 commits into
codeigniter4:developfrom
michalsn:fix/connection-share

Conversation

@michalsn

Copy link
Copy Markdown
Member

Description
This PR fixes a bug where non-shared database instances were incorrectly stored in the shared instances cache, causing modifications to non-shared instances to affect subsequent shared connections.

Fixes#9678

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@michalsnmichalsn added the bug Verified issues on the current code behavior or pull requests that will fix them label Aug 12, 2025

@neznaika0neznaika0 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's been wrong for so long...

@paulbalandanpaulbalandan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this bug is one of the reasons why we cannot randomize the tests.

Comment threaduser_guide_src/source/changelogs/v4.6.4.rst Outdated
Co-authored-by: John Paul E. Balandan, CPA <paulbalandan@gmail.com>
@michalsn
michalsn merged commit 103f1a9 into codeigniter4:developAug 13, 2025
50 checks passed
@michalsn

Copy link
Copy Markdown
MemberAuthor

Thank you @paulbalandan and @neznaika0

@michalsn
michalsn deleted the fix/connection-share branch August 13, 2025 05:16
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugVerified issues on the current code behavior or pull requests that will fix them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Unshared DB instance affects subsequent shared DB instances

3 participants

@michalsn@neznaika0@paulbalandan