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

LOGSQL Insert Failed: insert into adodb_logsql Commands out of sync; you can't run this command now #463

Closed
ivanbogomoloff opened this Issue Oct 30, 2018 · 0 comments

Comments

Projects
None yet
3 participants
@ivanbogomoloff
Copy link

ivanbogomoloff commented Oct 30, 2018

Here https://github.com/ADOdb/ADOdb/blob/hotfix/5.20/adodb-perf.inc.php#L169
I get error if my driver is ADODB_mysqli

LOGSQL Insert Failed: insert into adodb_logsql (created,sql0,sql1,params,tracer,timer) values( NOW(),?,?,?,?,?)
Commands out of sync; you can't run this command now

Error fixed after add this code

if ($errN != 0 || $time >= $ADODB_PERF_MIN) {
			//
			if($conn instanceof ADODB_mysqli && $conn->_queryID){
				mysqli_free_result($conn->_queryID);
            }
			$ok = $conn->Execute($isql,$arr);
		} else
			$ok = true;

mnewnham added a commit that referenced this issue Jan 1, 2019

Error logging slow queries under mysqli driver, see #463 , #439
Whilst this does introduce driver-specific code into the core
file, there are already numerous instances of that so not a 
problem

thx to @ivanbogomoloff

mnewnham added a commit that referenced this issue Jan 1, 2019

Error logging slow queries under mysqli driver, see #463 , #439
Whilst this does introduce driver-specific code into the core
file, there are already numerous instances of that so not a 
problem

thx to @ivanbogomoloff

@mnewnham mnewnham closed this Jan 1, 2019

@dregad dregad added this to the v5.20.14 milestone Jan 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment