Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL UPDATE query does not escape single quotes in existing field #964

Open
nicofrand opened this issue Mar 7, 2025 · 0 comments
Open
Assignees

Comments

@nicofrand
Copy link

Describe the bug

Updating a field that contains a ' fails.

To Reproduce

  1. Create database and table with the content below
  2. Try to edit the configuration field by setting the value {} (or whatever) as TEXT
  3. Wait (even though that should be quick)
  4. See error

Expected behavior

No error, and the ' is properly escaped in the UPDATE query.

Screenshots
If applicable, add screenshots to help explain your problem.

Application (please complete the following information):

  • App client [e.g. MySQL]
  • App version [e.g. 0.5.2]
  • Installation source: [e.g. exe, Linux Store, AppImage, dmg]

Environment (please complete the following information):

  • OS name: Ubuntu
  • OS version 24.10
  • DB name MySQL
  • DB version 8.0.32

Screenshots

Image

See unescaped single quotes

Additional context

SQL boilerplate:

CREATE TABLE `TestingTable` (
  `configuration` longtext COLLATE utf8mb3_unicode_ci NOT NULL,
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

INSERT INTO `TestingTable` (`configuration`) VALUES ('{\"title\": \"Bug à l\'apostrophe\"}');
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

No branches or pull requests

2 participants