Skip to content

Removed not working transaction for updating hash length#1979

Merged
jessevz merged 1 commit intodevfrom
1626-bug-decreasing-max-length-of-a-hash-returns-http-500
Mar 16, 2026
Merged

Removed not working transaction for updating hash length#1979
jessevz merged 1 commit intodevfrom
1626-bug-decreasing-max-length-of-a-hash-returns-http-500

Conversation

@jessevz
Copy link
Copy Markdown
Contributor

@jessevz jessevz commented Mar 16, 2026

In the update hash length function, a database transaction was made around an alter statement. This does not work, because a DDL statement cause an implicit commit (https://dev.mysql.com/doc/refman/8.4/en/implicit-commit.html), thus when our commit statement is reached, there is no transaction anymore, resulting in an error.

closes #1626

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes an invalid database transaction wrapper from Util::setMaxHashLength() because the function executes DDL (ALTER TABLE), which triggers an implicit commit in MySQL and can cause commit() to fail with “no active transaction”.

Changes:

  • Removed beginTransaction() in Util::setMaxHashLength().
  • Removed the corresponding commit() in Util::setMaxHashLength().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@jessevz jessevz merged commit b057c02 into dev Mar 16, 2026
8 checks passed
@jessevz jessevz deleted the 1626-bug-decreasing-max-length-of-a-hash-returns-http-500 branch March 16, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants