Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
in Q2A Core by

While trying to use the Facebook Login Plugin, after login in with Facebook I receive the following error:
A Question2Answer database query failed when generating this page.
A full description of the failure is available in the web server's error log file.
In the error_log, the error appears like this:

[Tue Oct 20 13:28:29.213878 2020] [:error] [pid 22424] [client] PHP Question2Answer MySQL query error 1100: Table 'userid_src' was not locked with LOCK TABLES - Query: insert into qa_catpoints (categoryid, userid, points)  select  b.categoryid,'8', 30*(select  COUNT(*) AS aselecteds FROM qa_posts AS userid_src JOIN qa_posts AS questions ON questions.selchildid=userid_src.postid WHERE userid_src.userid='8' AND userid_src.type='A' AND NOT (questions.userid<=>userid_src.userid)  and (userid_src.catidpath1 =b.categoryid or userid_src.catidpath2 = b.categoryid or userid_src.categoryid = b.categoryid))+1*(select  COALESCE(SUM(LEAST(2*upvotes,20)-LEAST(2*downvotes,5)), 0) AS avoteds FROM qa_posts AS userid_src WHERE LEFT(type, 1)='A' AND userid='8'  and (userid_src.catidpath1 =b.categoryid or userid_src.catidpath2 = b.categoryid or userid_src.categoryid = b.categoryid)) \n\t\t\tas points from  qa_categories b   on duplicate key update points=VALUES(points), referer: ...

As it mentions an unlocked table, is there anyway I can lock it before this code execution? How and where should I do it?
Thanks a ton!
Q2A version: 1.8.5

Please log in or register to answer this question.