If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

running whine.pl spits out sql error when run

RESOLVED DUPLICATE of bug 327348

Status

()

Bugzilla
Whining
RESOLVED DUPLICATE of bug 327348
12 years ago
12 years ago

People

(Reporter: Jeffrey Forman, Assigned: Erik Stambaugh)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060116 Firefox/1.0.7
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060116 Firefox/1.0.7

I am trying to run "whine.pl" after enabling it for a subset of my users. I am trying to run whine.pl from the CLI first to test before I set a cronjob for it. I am receving this error. As suggested by Max, I am filing this bug with all pertinent information.

nuthatch htdocs # ./whine.pl
DBD::mysql::st execute failed: 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 'WHERE id = '1'' at line 1 [for Statement
"UPDATE whine_schedules SET run_next = CURRENT_DATE + INTERVAL ? DAY +
INTERVAL ? HOUR WHERE id = ?"] at ./whine.pl line 205


Reproducible: Always

Steps to Reproduce:
1. run "whine.pl"
2.
3.



Expected Results:  
Output nothing and sent out all requsted whine emails.

I am running bugzilla 2.20 on gentoo linux. The backend mysql server, on another machine as the httpd (apache) running bugzilla is version 4.0.24.

Comment 1

12 years ago
What's your version of DBD::Mysql? As said on IRC, this part of the code is executed when running a new whine for the first time. I cannot reproduce the problem.
(Reporter)

Comment 2

12 years ago
*  dev-perl/DBD-mysql
      Latest version installed: 2.9007


Comment 3

12 years ago
I have the same problem here:

OS:    DEBIAN 3.0 (Woody)
MySQL: v3.23.49-log
DBI:   1.38

The error message is:

DBD::mysql::st execute failed: You have an error in your SQL syntax near 'WHERE id = '15'' at line 1 [for Statement "UPDATE whine_schedules SET run_next = CURRENT_DATE + INTERVAL ? DAY + INTERVAL ? HOUR WHERE id = ?"] at /var/www/sub-domains/info/bugzilla/whine.pl line 612
	main::reset_timer(15) called at /var/www/sub-domains/info/bugzilla/whine.pl line 296
	main::get_next_event() called at /var/www/sub-domains/info/bugzilla/whine.pl line 324
DBI::db=HASH(0x883fd24)->disconnect invalidates 1 active statement handle (either destroy statement handles or call finish on them before disconnecting) at Bugzilla.pm line 182.

I have fixed the problem in the whine.pl script (see patch).

Comment 4

12 years ago
Created attachment 213295 [details] [diff] [review]
Patch for whine.pl script (missing parentheses added)

Comment 5

12 years ago
Seems to be the same as bug 327348

Comment 6

12 years ago

*** This bug has been marked as a duplicate of 327348 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.