[freeside] Creating db problem

ivan ivan at 420.am
Tue Oct 23 13:52:25 PDT 2001


Maybe this will make MySQL happy.

Index: freeside-queued
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-queued,v
retrieving revision 1.9
diff -u -r1.9 freeside-queued
--- freeside-queued     2001/09/25 00:05:09     1.9
+++ freeside-queued     2001/10/23 20:51:26
@@ -7,7 +7,7 @@
 use POSIX qw(setsid);
 use Date::Format;
 use IO::File;
-use FS::UID qw(adminsuidsetup forksuidsetup);
+use FS::UID qw(adminsuidsetup forksuidsetup driver_name);
 use FS::Record qw(qsearchs);
 use FS::queue;
 
@@ -48,7 +48,9 @@
     'queue',
     { 'status' => 'new' },
     '',
-    'ORDER BY jobnum FOR UPDATE LIMIT 1'
+    driver_name =~ /^mysql$/i
+      ? 'ORDER BY jobnum LIMIT 1 FOR UPDATE'
+      : 'ORDER BY jobnum FOR UPDATE LIMIT 1'
   ) or do {
     sleep 5;
     next;


On Tue, Oct 23, 2001 at 03:25:34PM -0500, Edward Shabotinsky wrote:
> ones again
> now error in freeside-queued error log -->queuelog.DBI:mysql:freeside
> 
> [Tue Oct 23 15:18:16 2001] [2146] freesied-queued starting
> [Tue Oct 23 15:18:16 2001] [2146] DBD::mysql::st execute failed: You have an
> error in your SQL syntax near 'L
> IMIT 1' at line 1 at /usr/local/lib/perl5/site_perl/5.005/FS/Record.pm line
> 201.
> [Tue Oct 23 15:18:16 2001] [2146] Error executing "SELECT * FROM queue WHERE
> status = ? ORDER BY jobnum FOR UPDATE LIMIT 1": You have an error in your
> SQL syntax near 'LIMIT 1' at line 1 at /usr/bin/freeside-queued lin
> e 55
> 
> i thought tables was cousing a problem but it still doing that.
> freeside-queued gives pid # and then die.
> Thanks
> 
> ----- Original Message -----
> From: "ivan" <ivan at 420.am>
> To: <ivan-freeside at sisd.com>
> Sent: Tuesday, October 23, 2001 2:49 PM
> Subject: Re: [freeside] Creating db problem
> 
> 
> > On Tue, Oct 23, 2001 at 01:27:39PM -0500, Edward Shabotinsky wrote:
> > > Done
> > > thanks Ivan
> > > last q
> > > you said that freeside only supports BDB tables and it creates just reg.
> > > isam
> > > do i have to change type of them? to BDB?
> > >
> >
> > I don't know how you change existing tables (try checking the MySQL
> > documentation), but you can set the default for new tables using the
> >
> >    --default-table-type=BDB
> >
> > startup option to mysqld, or by adding
> >
> >    default-table-type=BDB
> >
> > to your /etc/my.conf (/etc/mysql/my.conf on some distributions)
> >
> > I've added this to the documentation.
> >
> > --
> > _ivan
> >
> 

-- 
_ivan



More information about the freeside-users mailing list