Subject: | Error occured on MySQL 5.0.67 after updated from 0.04 to 0.06. |
Hi
Today, I upgrade TheSchwartz::Moosified from 0.04 to 0.06.
Error occured.
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 NOT EXISTS (
SELECT 1 FROM exitstatus WHERE jobid = '398'
' at line 4 at
/home/bokutin/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0/TheSchwartz/Moosified/Job.pm
line 143.
I make a patch.
Please look over this patch.
Cheers
Tomohiro Hosaka
Subject: | TheSchwartz.diff.txt |
2ndserver bokutin % diff -u -r TheSchwartz-Moosified-0.06.orig TheSchwartz-Moosified-0.06
diff -u -r TheSchwartz-Moosified-0.06.orig/lib/TheSchwartz/Moosified/Job.pm TheSchwartz-Moosified-0.06/lib/TheSchwartz/Moosified/Job.pm
--- TheSchwartz-Moosified-0.06.orig/lib/TheSchwartz/Moosified/Job.pm 2011-07-15 06:59:57.000000000 +0900
+++ TheSchwartz-Moosified-0.06/lib/TheSchwartz/Moosified/Job.pm 2011-08-26 03:48:05.000000000 +0900
@@ -135,7 +135,7 @@
my $sth = $dbh->prepare(qq{
INSERT INTO $table_exitstatus
(funcid, status, completion_time, delete_after, jobid)
- SELECT ?, ?, ?, ?, ?
+ SELECT ?, ?, ?, ?, ? FROM $table_exitstatus
WHERE NOT EXISTS (
SELECT 1 FROM $table_exitstatus WHERE jobid = ?
)