Bacula-users

Re: [Bacula-users] Problems with make-mysql-tables script

2012-10-08 03:27:17
Subject: Re: [Bacula-users] Problems with make-mysql-tables script
From: Geert Stappers <Geert.Stappers AT vanadgroup DOT com>
To: "bacula-users AT lists.sourceforge DOT net" <bacula-users AT lists.sourceforge DOT net>
Date: Mon, 8 Oct 2012 09:27:00 +0200
Op 20121004 om 22:12 schreef George Sokolov:
> Here is the error message: "ERROR 1064 (42000) at line 415: 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 '@)' at line 1
> Creation of MySQL tables succeeded.
> 
> Line 415 from "make_mysql_tables" script :
> 
> JobId integer NOT NULL,
> 
> The script was taken from latest Bacula release.
> 
> I'm using this command, when I running the script - ./make_mysql_tables -p
> 
> 

<screenshot>
$ find bacula/ -name 
'make_mysql*'bacula/bacula/src/win32/cats/make_mysql_catalog_backup.cmd
bacula/bacula/src/win32/cats/make_mysql_tables.sql
bacula/bacula/src/win32/cats/make_mysql_tables.cmd
bacula/bacula/src/cats/make_mysql_tables.in
$ awk '{print NR, $0}' bacula/bacula/src/cats/make_mysql_tables.in | grep 
--context 5 ^414
409       ON PathHierarchy (PPathId);
410 
411 CREATE TABLE PathVisibility
412 (
413       PathId integer NOT NULL,
414       JobId integer NOT NULL,
415       Size int8 DEFAULT 0,
416       Files int4 DEFAULT 0,
417       CONSTRAINT pathvisibility_pkey PRIMARY KEY (JobId, PathId)
418 );
419 CREATE INDEX pathvisibility_jobid
$ head -n 15 bacula/bacula/src/cats/make_mysql_tables.in
#!/bin/sh
#
# shell script to create Bacula MySQL tables
#
# Important note: 
#   You won't get any support for performance issue if you changed the default
#   schema.
#
bindir=@MYSQL_BINDIR@
PATH="$bindir:$PATH"
db_name=${db_name:-@db_name@}

if mysql -D ${db_name} $* -f <<END-OF-DATA
--
-- Note, we use BLOB rather than TEXT because in MySQL,
</screenshot>

FWIW: To me it is unclear want matches to 
} ERROR 1064 (42000) at line 415: 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 '@)' at line 1


Cheers
Geert Stappers

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>