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

Unknown MySQL Error #23

Open
FairyTale5571 opened this issue Feb 5, 2020 · 6 comments
Open

Unknown MySQL Error #23

FairyTale5571 opened this issue Feb 5, 2020 · 6 comments

Comments

@FairyTale5571
Copy link

After 3 hours of successful work, problems with writing to the database begin; reading did not check. I get the error in rpt below.

19:37:24 Error in expression <interceptOnFrame> 19:37:24 Error position: <interceptOnFrame> 19:37:24 Error Intercept-DB exception: Invalid number of bind values. Expected 16129 got 2 at INSERT INTO performance_log (type,value,timestamp) VALUES (?,?,NOW())

MySQL Server was working normally

@FairyTale5571
Copy link
Author

@dedmen
Copy link
Member

dedmen commented Feb 10, 2020

Expected 16129 got 2

🙃

Looks pretty random. Does it recover by itself or do you need to restart?
Can you show the code that executes that?
Are you using CopyQuery command and then bind? Or recreate query everytime?

@FairyTale5571
Copy link
Author

FairyTale5571 commented Feb 10, 2020

It recovers on its own

_fnc = {
params ["_cname", ["_params", []]];
private "_query";
if (_params isEqualTo []) then {
_query = dbPrepareQueryConfig _cname;
} else {
_query = dbPrepareQueryConfig [_cname, _params];
};
private _res = InterceptDatabase dbExecuteAsync _query;

}
["insertPerformance",["FPS",diag_fps toFixed 2]] call _fnc;

@dedmen
Copy link
Member

dedmen commented Feb 18, 2020

if (_params isEqualTo []) then {

no need for that.
_query = dbPrepareQueryConfig [_cname, []]; would also be valid.

It recovers on its own

how fast?
Looks like some pretty random memory error, can't really explain that to myself.

@FairyTale5571
Copy link
Author

hm.. 5-10 min it recovered.
Could this be because I am sending too many queries to the database?

@0x1F9F1
Copy link

0x1F9F1 commented Feb 15, 2021

Did you ever figure out the cause of this? I've come across an almost identical issue with my own extdb extension, right down to the exact same invalid number of params.

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

3 participants