vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Database Error from cron jobs (https://vborg.vbsupport.ru/showthread.php?t=160494)

acegames 10-18-2007 08:13 AM

Database Error from cron jobs
 
Hope somebody can help me fix this problem , I am getting emails with a database error from a cron job and need help tracing what is causing it

Database error in vBulletin 3.6.8:

Invalid SQL:

UPDATE user AS user
SET user.threads =
(
SELECT COUNT(threadid)
FROM thread AS thread
LEFT JOIN forum AS forum ON forum.forumid = thread.forumid
WHERE visible = 1
AND (forum.options & 4096)
AND user.userid=postuserid
);

MySQL Error : 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 'SELECT COUNT(threadid)
FROM thread AS thread
LEFT JO
Error Number : 1064
Date : Thursday, October 18th 2007 @ 02:13:36 AM
Script : http://www.acegames.us/forum/cron.php?&rand=256860
Referrer : http://www.acegames.us/forum/
IP Address : 195.93.21.5
Username : Unregistered
Classname : vb_database

Marco van Herwaarden 10-18-2007 08:16 AM

What MySQL version are you using?

You should be able to determine the Scheduled Task causing this problem, by comparing the time the error occurs and the time set for each Scheduled Task.

acegames 10-18-2007 08:32 AM

Hello thankyou for the quick reply , I am using MySQL Version 4.0.27-standard

I have just ran my cron jobs one by one and found it is from :

Hourly Cleanup
This script performs various cleanup tasks once per hour.

How can I fix this please ?

Paul M 10-18-2007 09:04 AM

That code is being run by a modification you have installed, and is using syntax that will not work on the version of mysql you have installed. You can either disable the modification or upgrade mysql.

acegames 10-18-2007 09:08 AM

Thankyou , found it and its Zoints Thread Tags causing it , I have had that installed from the time it was released though

--------------- Added [DATE]1192706309[/DATE] at [TIME]1192706309[/TIME] ---------------

After disabling zoints trags it fixed the error but now an hour later its back

Marco van Herwaarden 10-18-2007 10:34 AM

The standard "Hourly Cleanup" does not contain this query. It might be a modification that uses a plugin at the 'cron_script_cleanup' hook location.

And as Paul already mentioned, that query is not valid for MySQL 4.0.

acegames 10-18-2007 10:39 AM

ok thankyou will investigate further


All times are GMT. The time now is 06:39 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01102 seconds
  • Memory Usage 1,721KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete