Bacula-users

Re: [Bacula-users] FreeBSD Bacula port - SQL table generation problem

2011-04-05 14:03:13
Subject: Re: [Bacula-users] FreeBSD Bacula port - SQL table generation problem
From: Kernel Panic <kpnemesis AT gmail DOT com>
To: Bacula-users AT lists.sourceforge DOT net
Date: Tue, 5 Apr 2011 19:00:08 +0100
On 5 April 2011 18:46, Phil Stracchino <alaric AT metrocast DOT net> wrote:
> On 04/05/11 12:57, Kernel Panic wrote:
>> Hello, yes I am using MySQL 5.5. As you advised I changed the
>> following code in the make_mysql_tables script:
>>
>> CREATE TABLE Counters (
>>   Counter TINYBLOB NOT NULL,
>>   MinValue INTEGER DEFAULT 0,
>>  `MaxValue` INTEGER DEFAULT 0,
>>   CurrentValue INTEGER DEFAULT 0,
>>   WrapCounter TINYBLOB NOT NULL,
>>   PRIMARY KEY (Counter(128))
>>   );
>>
>> However running the script now gives a slightly different but similar
>> error message:
>>
>> ERROR 1064 (42000) at line 316: 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 'INTEGER DEFAULT 0,
>>    CurrentValue INTEGER DEFAULT 0,
>>    WrapCounter TINYBLOB NO' at line 4
>
> Oh, right, this is being done in a shell script as a here document,
> isn't it...?
>
> ` is a shell metacharacter.  You'll have to escape those with a backslash:
>
>   \`MaxValue\` INTEGER ...
>
>
> In the long term, this field should really be renamed.
>
>
> --
>  Phil Stracchino, CDK#2     DoD#299792458     ICBM: 43.5607, -71.355
>  alaric AT caerllewys DOT net   alaric AT metrocast DOT net   phil AT 
> co.ordinate DOT org
>  Renaissance Man, Unix ronin, Perl hacker, SQL wrangler, Free Stater
>                 It's not the years, it's the mileage.
>
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>

Excellent! That seems to have done the trick, thankyou to everyone
that took the time to reply

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users