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

Fix MySQL error were prepared statement contains too many placeholders #10153

Merged
merged 5 commits into from May 7, 2019

Conversation

Projects
None yet
3 participants
@davidmnelson
Copy link
Contributor

commented Apr 26, 2019

Fixes MySQL error were prepared statement contains too many placeholders. Modifies dbBulkInsert to run array_chunk on incoming data and inserts those smaller chunks. This error is unlikely to have affected most installations, but was an issue for us getting up-to-date IP address data during discovery on our core router.

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926
After you are done testing, you can remove the changes with ./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.

Fixes a MySQL error were the prepared statement contains too many pla…
…ceholders. Modifies dbBulkInsert to run array_chunk on incoming data and inserts those smaller chunks.
@CLAassistant

This comment has been minimized.

Copy link

commented Apr 26, 2019

CLA assistant check
All committers have signed the CLA.

@davidmnelson davidmnelson changed the title Fixes MySQL error were prepared statement contains too many placeholders Fix MySQL error were prepared statement contains too many placeholders May 6, 2019

@murrant

murrant approved these changes May 7, 2019

@murrant

This comment has been minimized.

Copy link
Member

commented May 7, 2019

Thanks for fixing. Not sure this is the right level for the fix, but should be ok.

@murrant murrant merged commit 223d307 into librenms:master May 7, 2019

6 checks passed

Inspection Summary
Details
Node: analysis
Details
Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details
codeclimate All good!
Details
license/cla Contributor License Agreement is signed.
Details

@murrant murrant added the Bug 🐞 label May 7, 2019

spencerbutler added a commit to spencerbutler/librenms that referenced this pull request May 21, 2019

Fix MySQL error were prepared statement contains too many placeholders (
librenms#10153)

* Fixes a MySQL error were the prepared statement contains too many placeholders. Modifies dbBulkInsert to run array_chunk on incoming data and inserts those smaller chunks.

* Trying to address some automatic checks about blank lines.

* Trying to make Code Climate happy with reduced cognitive complexity.

* Trying to make Code Climate happy with reduced cognitive complexity.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 6, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.