FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Problems with MySQL 5.5 (NEVER MAKE Forum Consistency!!!)
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Problems with MySQL 5.5 [message #164846] Fri, 18 March 2011 00:58 Go to next message
Firebird is currently offline  Firebird
Messages: 4
Registered: March 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Hello!

I have a freshly installed FudForum 3.0.2
And made tonight a Forum Consistency of my forum

After that I recieved SQL error.

And my forum was broken.

I transfered my forum data to another server with MySQL 5.0.x
And made Forum Consistency on this server. And all become OK!

So - if you have MySQL 5.5.x - NEVER MAKE a Forum Consistency!

Re: Problems with MySQL 5.5 [message #164847 is a reply to message #164846] Fri, 18 March 2011 01:32 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
Can you please post details about the error so we can fix it?
Re: Problems with MySQL 5.5 [message #164848 is a reply to message #164847] Fri, 18 March 2011 01:49 Go to previous messageGo to next message
Firebird is currently offline  Firebird
Messages: 4
Registered: March 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Yes, of course.
It`s a very simple.
I have a CentOS 5.5 x86_64 with php 5.2.6 (now 5.2.10). MySQL 5.5.6 (now 5.5.10) - from remi repository and from mysql.org server - don`t matter.
Freshly installed FudForum 3.0.2 with some posts (now 175 messages).
When I go to the Admin Settings and press Forum Consistency I recieved an SQL error. No I can`t print error - because I closed this tab in my Firefox. I try represent it asap.
And the same error if I try to upgrade FudForum 3.0.1 to 3.0.2.
Re: Problems with MySQL 5.5 [message #164849 is a reply to message #164848] Fri, 18 March 2011 02:39 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
Apply this patch to adm/consist.php:

if (__dbtype__ == 'mysql') {	// MySQL is full of crap (can't specify target table for update in FROM).
-	q('DELETE '. $tbl .' '. substr($q, 7, strpos($q, '.') - 7) .' '. strstr($q, 'FROM'));
+	q('DELETE '. substr($q, 7, strpos($q, '.') - 7) .' '. strstr($q, 'FROM'));

Re: Problems with MySQL 5.5 [message #164850 is a reply to message #164849] Fri, 18 March 2011 02:48 Go to previous messageGo to next message
Firebird is currently offline  Firebird
Messages: 4
Registered: March 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Hello!

Thanx!
I just test it, and all OK!

Thank you again!

Wbr Victor
Re: Problems with MySQL 5.5 [message #164937 is a reply to message #164850] Tue, 05 April 2011 14:20 Go to previous messageGo to next message
Moachist is currently offline  Moachist
Messages: 35
Registered: April 2011
Karma: 0
Member
add to buddy list
ignore all messages by this user
Hello - A novice here, but trying to setup a small forum. I tried to edit the consist.php file, but I am not sure where to put the code. Do I just cut and paste this code to the bottom of the file? I am getting this error when running it.

Thanks for the help.

Locking the database for checking
Locked!
Validating category order
Done: Validating category order
Checking if moderator and users table match

Fatal error: Uncaught exception 'Exception' with message '(E:\xampp\htdocs\fudforum\include\theme\default\db.inc:75<br /> E:\xampp\htdocs\fudforum\adm\consist.php:25<br /> E:\xampp\htdocs\fudforum\adm\consist.php:171<br /> ) 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 'mm FROM fud30_mod mm LEFT JOIN fud30_users u ON mm.user_id=u.id LEFT JOIN fud30_' at line 1<br /> Query: DELETE fud30_mod mm FROM fud30_mod mm LEFT JOIN fud30_users u ON mm.user_id=u.id LEFT JOIN fud30_forum f ON f.id=mm.forum_id WHERE u.id IS NULL OR f.id IS NULL<br /> _POST: array ( 'conf' =&gt; 'Yes', 'SQ' =&gt; 'b21ccbfe2cbd65a9b7e2a96e68f43419', )<br /> Database version: 5.5.8<br /> [Referring Page] /FUDforum/adm/consist.php?&amp;SQ=b21ccbfe2cbd65a9b7e2a96e68f43419<br /> ' in E:\xampp\htdocs\fudforum\include\core.inc:215 Stack trace: #0 E:\xampp\htdocs\fudforum\include\theme\default\db.inc(75): fud_sql_error_handler('DELETE fud30_mo...', 'You have an err...', 1064, '5.5.8') #1 E:\xampp\htdocs\fudforum\adm\consist.php(25): q('DELETE fud30_mo...') #2 E:\xampp\htdocs\fudforum\adm\consist.php(171): delete_zero('fud30_mod', 'SELECT mm.id FR...') #3 {main} thrown in E:\xampp\htdocs\fudforum\include\core.inc on line 215
Re: Problems with MySQL 5.5 [message #164940 is a reply to message #164937] Tue, 05 April 2011 18:42 Go to previous messageGo to next message
Moachist is currently offline  Moachist   United States
Messages: 35
Registered: April 2011
Karma: 0
Member
add to buddy list
ignore all messages by this user
I figured out how to change the PHP script and got the consistency checker to run, however, is there an update script, upgrade process, or something automated I am supposed to use to apply these types of patches? Or just manually editing the lines is the best way?
Re: Problems with MySQL 5.5 [message #164949 is a reply to message #164940] Fri, 08 April 2011 06:32 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
Moachist wrote:
...is there an update script, upgrade process, or something automated I am supposed to use to apply these types of patches?


I agree, it should be automated.
Can you maybe help us to put something like this in place?
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: url tags and {link} not working on feed capture
Next Topic: NNTP Import Stalls
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Oct 20 17:50:39 EDT 2017

Total time taken to generate the page: 0.00687 seconds