Potential coding error - existing temptables found when disposing database. Must be dropped!

Potential coding error - existing temptables found when disposing database. Must be dropped!

by Diego Muñoz -
Number of replies: 9

Help !!! 


Hi, I'm doing the restoration of the courses through the API, at the moment I'm trying to do it in parallel with curl, but when run gives me the following error: Error coding Potential - existing TempTables found When disposing database. Must be dropped!, And only one course is restored.

Average of ratings: -
In reply to Diego Muñoz

Re: Potential coding error - existing temptables found when disposing database. Must be dropped!

by Baptiste Lhoste -

Hi everybody,

I have the same issue on my moodle 2.8.3. Does anybody have an idea ?

It is little critic for me.

Best regards,

Tistou

In reply to Baptiste Lhoste

Re: Potential coding error - existing temptables found when disposing database. Must be dropped!

by Baptiste Lhoste -

Hi everybody,

Forget it. I have wrong permissions for my database user.

I found it after enabling debug in Administration > Site administration > Development > Debugging.

Best regards.

Tistou

In reply to Baptiste Lhoste

Re: Potential coding error - existing temptables found when disposing database. Must be dropped!

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hi,

Could you explain better what was the problem, and the solution you applied to solve it?

It can be useful for other people wink

Séverin

In reply to Séverin Terrier

Re: Potential coding error - existing temptables found when disposing database. Must be dropped!

by Baptiste Lhoste -

Hi,

Of course, I thought that my response was clear enough ... my bad.

I had an issue when I tried to restore a course from a backup.

In my browser, I had a message saying  something like "error DLL sql", in the php error log I had :

Potential coding error - existing temptables found when disposing database. Must be dropped!

So I enable the debug like I said in Administration > Site administration > Development > Debugging.

I retried the same operation and now the message was : Access denied to  user 'xxxxxx'@'serveraddress' CREATE TEMPORARY TABLE ....

So I gave to my database user all rights (except grant ones) on the moodle database.

That solve my  issue.

Best regards,

Tistou


In reply to Baptiste Lhoste

Re: Potential coding error - existing temptables found when disposing database. Must be dropped!

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hi,

Thanks (very late) for your answer Baptiste.

I was asking, because i had the same error. But my mysql user already have all needed privilege (including CREATE TEMPORARY TABLES).

So, it's not the solution for me...

Best regards,
Séverin

In reply to Séverin Terrier

Re: Potential coding error - existing temptables found when disposing database. Must be dropped!

by Bharath Parlapalli -

HI Séverin Terrier


Have you solved the issue? if not - i am interested to know if turning on the debugging mode threw any light on your error. I am currently having the same issue and will update here if I find any more info or (hopefully) if i find any solution.

In reply to Bharath Parlapalli

Re: Potential coding error - existing temptables found when disposing database. Must be dropped!

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hi,

I think people having this style of issue should really provide much more details, such as which type of backup, for which course, manual or automated, by web or cli, with(out) logs, with(out) user datas...

And tell if it's always the same course (or not).

If it's one course, perhaps have a look at log table(s), to see the number of lines concerned.

You can also try to update MySQL values (connect_timeout, wait_timeout and interactive_timeout) to put (much) more !

Séverin

In reply to Séverin Terrier

Re: Potential coding error - existing temptables found when disposing database. Must be dropped!

by Hittesh Ahuja -
Hi Severin, I'm facing the same issue when trying to backup a Database activity. I can confirm the activity is not too big as it has only a couple of records. Error i get is : Existing temptables found ......blah blah blah My user had SELECT, INSERT, UPDATE, DELETE, DROP ON moodledb.* . Giving it CREATE TEMPORARY TABLES didnt help as i see the same error message in my apache error log. Anything else I could try ?
In reply to Hittesh Ahuja

Re: Potential coding error - existing temptables found when disposing database. Must be dropped!

by Hittesh Ahuja -

Complete error:


Potential coding error - existing temptables found when disposing database. Must be dropped!,