• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Savepoint error appearing in the log today

Dan

Well-known member
#1
ErrorException: mysqli::query() [<a href='mysqli.query'>mysqli.query</a>]: (42000/1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '9e60a07d904bb81501a8d42d69ecc307' at line 1 - library/XenForo/Db.php:145
Generated By: user, Today at 6:20 AM

Stack Trace​

#0 [internal function]: XenForo_Application::handlePhpError('SAVEPOINT 9e60a...') #1 /home/extra/public_html/library/XenForo/Db.php(145): mysqli->query(Object(Zend_Db_Adapter_Mysqli), 'SAVEPOINT 9e60a...') #2 /home/extra/public_html/library/XenForo/Db.php(50): XenForo_Db::_execQuery(Object(Zend_Db_Adapter_Mysqli)) #3 /home/extra/public_html/library/XenForo/DataWriter.php(1740): XenForo_Db::beginTransaction() #4 /home/extra/public_html/library/XenForo/DataWriter.php(1287): XenForo_DataWriter->_beginDbTransaction() #5 /home/extra/public_html/library/XenForo/LikeHandler/Post.php(20): XenForo_DataWriter->save(657, Array) #6 /home/extra/public_html/library/XenForo/Model/Like.php(233): XenForo_LikeHandler_Post->incrementLikeCounter('post', 657, 34) #7 /home/extra/public_html/library/XenForo/ControllerPublic/Post.php(314): XenForo_Model_Like->likeContent() #8 /home/extra/public_html/library/XenForo/FrontController.php(310): XenForo_ControllerPublic_Post->actionLike(Object(XenForo_RouteMatch)) #9 /home/extra/public_html/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch() #10 /home/extra/public_html/index.php(13): XenForo_FrontController->run() #11 {main}

Request State​

array(3) { ["url"] => string(38) "http://extralicense.com/posts/657/like" ["_GET"] => array(0) { } ["_POST"] => array(4) { ["_xfRequestUri"] => string(51) "/threads/wts-vb3-8-5-and-vb4-0-3-patch-level-3.169/" ["_xfNoRedirect"] => string(1) "1" ["_xfToken"] => string(54) "24,1314271202,4a95cb9e38242b8fdb9d8a1a1b915b093546f373" ["_xfResponseType"] => string(4) "json" } }

This error has occurred twice today on 2 separate posts while attempting to "like". Any suggestions.
 

Dan

Well-known member
#4
Says version 5.1.56

Edit: 2 more errors today. Also, I am on a dedicated box so I don't think my host would have changed anything.
 

Dan

Well-known member
#6
It is random at best. Very sporadic would be more accurate. Will run some tests and report back. Thanks!
 

Dan

Well-known member
#7
I am definitely having issues, now on creating conversations. Having done any testing as of yet but just want to keep a central local for my issues. The issue below, I am sure, is the same issue.

Server Error Log




Error Info​
ErrorException: mysqli::query() [<a href='mysqli.query'>mysqli.query</a>]: (42000/1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '42e2d75bb7c9f5f24a79bd00a15cdd65' at line 1 - library/XenForo/Db.php:145
Generated By: WenM, Today at 5:48 PM

Stack Trace​

#0 [internal function]: XenForo_Application::handlePhpError('SAVEPOINT 42e2d...') #1 /home/extra/public_html/library/XenForo/Db.php(145): mysqli->query(Object(Zend_Db_Adapter_Mysqli), 'SAVEPOINT 42e2d...') #2 /home/extra/public_html/library/XenForo/Db.php(50): XenForo_Db::_execQuery(Object(Zend_Db_Adapter_Mysqli)) #3 /home/extra/public_html/library/XenForo/DataWriter.php(1740): XenForo_Db::beginTransaction() #4 /home/extra/public_html/library/XenForo/DataWriter.php(1287): XenForo_DataWriter->_beginDbTransaction() #5 /home/extra/public_html/library/XenForo/DataWriter/ConversationMessage.php(123): XenForo_DataWriter->save() #6 /home/extra/public_html/library/XenForo/DataWriter.php(1295): XenForo_DataWriter_ConversationMessage->_postSave() #7 /home/extra/public_html/library/XenForo/ControllerPublic/Conversation.php(658): XenForo_DataWriter->save() #8 /home/extra/public_html/library/XenForo/FrontController.php(310): XenForo_ControllerPublic_Conversation->actionInsertReply(Object(XenForo_RouteMatch)) #9 /home/extra/public_html/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch() #10 /home/extra/public_html/index.php(13): XenForo_FrontController->run() #11 {main}

Request State​

array(3) { ["url"] => string(71) "http://extralicense.com/conversations/about-the-xenforo.62/insert-reply" ["_GET"] => array(0) { } ["_POST"] => array(7) { ["message_html"] => string(208) "<p>Hi dear friend...</p> Message removed by goblues ["_xfRelativeResolver"] => string(59) "http://extralicense.com/conversations/about-the-xenforo.62/" ["last_date"] => string(10) "1314397327" ["_xfToken"] => string(54) "34,1314398761,6b1b052cf1dd310c8a4b823871bb07febfa4117c" ["_xfRequestUri"] => string(36) "/conversations/about-the-xenforo.62/" ["_xfNoRedirect"] => string(1) "1" ["_xfResponseType"] => string(4) "json" } }
 

Jake Bunce

XenForo moderator
Staff member
#10
I was able to reproduce the error in the mysql prompt on both your server and my server using the savepoint ids I pulled from the error log. I believe I have found the cause:

http://bugs.mysql.com/bug.php?id=55962

The problem is with the savepoint id itself. I was able to fix the error by enclosing the id in backquotes or prefixing it with an underscore.

Examples with raw id, underscore, and backquotes:

mysql> SAVEPOINT 2e9cb74f19076db8c823ce2cf3025f6f;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2e9cb74f19076db8c823ce2cf3025f6f' at line 1

mysql> SAVEPOINT _2e9cb74f19076db8c823ce2cf3025f6f;
Query OK, 0 rows affected (0.00 sec)

mysql> SAVEPOINT `2e9cb74f19076db8c823ce2cf3025f6f`;
Query OK, 0 rows affected (0.00 sec)
Wait for a dev reply on this one.
 

Dan

Well-known member
#16
No. It will be in beta 2 and 1.0.5 when that's released.
Mike, Upgraded to beta 2 yesterday and am still getting savepoint errors.




ErrorException: mysqli::query() [<a href='mysqli.query'>mysqli.query</a>]: (42000/1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2e7896df853c69b723e3a87e7586c149' at line 1 - library/XenForo/Db.php:145
Generated By: Joel, Yesterday at 10:59 PM

Stack Trace​

#0 [internal function]: XenForo_Application::handlePhpError('SAVEPOINT 2e789...') #1 /home/extra/public_html/library/XenForo/Db.php(145): mysqli->query(Object(Zend_Db_Adapter_Mysqli), 'SAVEPOINT 2e789...') #2 /home/extra/public_html/library/XenForo/Db.php(50): XenForo_Db::_execQuery(Object(Zend_Db_Adapter_Mysqli)) #3 /home/extra/public_html/library/XenForo/DataWriter.php(1812): XenForo_Db::beginTransaction() #4 /home/extra/public_html/library/XenForo/DataWriter.php(1358): XenForo_DataWriter->_beginDbTransaction() #5 /home/extra/public_html/library/XenForo/Model/NewsFeed.php(535): XenForo_DataWriter->save(36, 'Joel', 'profile_post', '40', 'insert') #6 /home/extra/public_html/library/XenForo/DataWriter/DiscussionMessage.php(1110): XenForo_Model_NewsFeed->publish() #7 /home/extra/public_html/library/XenForo/DataWriter/DiscussionMessage.php(1095): XenForo_DataWriter_DiscussionMessage->_publishToNewsFeed() #8 /home/extra/public_html/library/XenForo/DataWriter/DiscussionMessage/ProfilePost.php(75): XenForo_DataWriter_DiscussionMessage->_publishAndNotify() #9 /home/extra/public_html/library/XenForo/DataWriter/DiscussionMessage.php(512): XenForo_DataWriter_DiscussionMessage_ProfilePost->_publishAndNotify() #10 /home/extra/public_html/library/XenForo/DataWriter.php(1366): XenForo_DataWriter_DiscussionMessage->_postSave() #11 /home/extra/public_html/library/XenForo/Model/UserProfile.php(220): XenForo_DataWriter->save('Hey guys!') #12 /home/extra/public_html/library/XenForo/ControllerPublic/Member.php(822): XenForo_Model_UserProfile->updateStatus() #13 /home/extra/public_html/library/XenForo/FrontController.php(310): XenForo_ControllerPublic_Member->actionPost(Object(XenForo_RouteMatch)) #14 /home/extra/public_html/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch() #15 /home/extra/public_html/index.php(13): XenForo_FrontController->run() #16 {main}

Request State​

array(3) { ["url"] => string(44) "http://extralicense.com/members/Joel.36/post" ["_GET"] => array(0) { } ["_POST"] => array(6) { ["message"] => string(9) "Hey guys!" ["_xfToken"] => string(54) "36,1318046335,cdb7c6becb83bd4d6a6f9b03b6df4070d4f87c76" ["return"] => string(1) "1" ["_xfRequestUri"] => string(1) "/" ["_xfNoRedirect"] => string(1) "1" ["_xfResponseType"] => string(4) "json" } }