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 driver: Use prepared statements instead of escaping when saving file #3604

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

adamvalalsky
Copy link
Contributor

Right now, inserting empty binary file (all binary zeroes) causes escaping of every single byte in content. This creates SQL which is double in size and can easily exceed max_allowed_packet value in MySQL.

This change uses prepared statements instead of escaping, so created SQLs (for files that would need escaping) are smaller.

@nao-pon
Copy link
Member

nao-pon commented Dec 20, 2023

@adamvalalsky I'm sorry to be late. Merge.

@nao-pon nao-pon merged commit 04c5d67 into Studio-42:master Dec 20, 2023
1 check passed
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.

2 participants