View Issue Details

IDProjectCategoryView StatusLast Update
0000066Bacula-Webbug-pgsqlpublic2013-11-19 15:05
Reporterm87carlsonAssigned Todavide 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Platformamd64OSFreeBSDOS Version8.2
Product Version5.2.11 
Target Version5.2.12Fixed in Version5.2.12 
Summary0000066: new bacula-web install reports SQL error
DescriptionA new bacula-web install against a pgsql (9.1) bacula (5.2.10) catalog fails with this error:

Database error

Message: SQLSTATE[42601]: Syntax error: 7 ERROR: LIMIT #,# syntax is not supported LINE 1: ... SUM(numvols) AS sum_vols FROM pool GROUP BY name LIMIT 9,78 ^ HINT: Use separate LIMIT and OFFSET clauses.
TagsNo tags attached.

Relationships

related to 0000068 closeddavide pgsql bug with Pools graph in dashboard 

Activities

m87carlson

2012-08-25 01:50

reporter   ~0000146

config.php:


<?php
$config['show_inactive_clients'] = true;
$config['language'] = 'en_EN';



// PostgreSQL bacula catalog
$config[0]['label'] = 'Prod Server';
$config[0]['host'] = 'localhost';
$config[0]['login'] = 'bacula';
$config[0]['password'] = 'removed';
$config[0]['db_name'] = 'bacula';
$config[0]['db_type'] = 'pgsql';
$config[0]['db_port'] = '5432';

?>

m87carlson

2012-08-25 01:50

reporter   ~0000147

Installed php packages:

pkg_info |grep php
php5-5.4.6 PHP Scripting Language
php5-gd-5.4.6 The gd shared extension for php
php5-gettext-5.4.6 The gettext shared extension for php
php5-pdo-5.4.6 The pdo shared extension for php
php5-pdo_pgsql-5.4.6 The pdo_pgsql shared extension for php
php5-pgsql-5.4.6 The pgsql shared extension for php
php5-session-5.4.6 The session shared extension for php

davide

2012-08-27 12:17

manager   ~0000148

Last edited: 2012-08-27 12:18

View 2 revisions

The SQL statment for postgres looks buggy.

Let me do some tests on my side and I'll get back to you.

Regards

ebourgui

2012-08-29 12:22

reporter   ~0000150

Same error with Bacula 5.2.10 and Postgres 8.4.

Database error

Message: SQLSTATE[42601]: Syntax error: 7 ERREUR: la syntaxe LIMIT #,# n'est pas supportee LIGNE 1 : ... SUM(numvols) AS sum_vols FROM pool GROUP BY name LIMIT 9,14 ^ ASTUCE : Utilisez les clauses separees LIMIT et OFFSET.

Regards

itc

2012-09-11 16:23

reporter   ~0000154

I have same error with bacula-web.5.2.10, postgresql-8.4 on Ubuntu Linux(10.04).

mvv

2012-10-29 12:06

reporter   ~0000162

I managed to fix the issue, edit index.php, line 102.

- $limit = $max_pools . ',' . ($pools_count['pools_count'] - $max_pools);
+ $limit = $max_pools . ' OFFSET ' . ($pools_count['pools_count'] - $max_pools);

ebourgui

2012-10-29 14:07

reporter   ~0000163

It works! Thanks.

davide

2012-10-29 14:17

manager   ~0000164

Hi,

the issue have been fixed since long time but I didn't had time to publish the new version of Bacula-Web yet.

Anyway, thank you for you help ;)

Regards

davide

2013-01-04 12:22

manager   ~0000190

Did you have chance to try the latest version (5.2.11) ?

Thanks for your feedback.

Davide

mvv

2013-01-04 12:31

reporter   ~0000191

I'll have time to test next week, I'll let you know if it works.

mvv

2013-01-04 16:16

reporter   ~0000193

Had some time left today :) , same issue same fix though:

"Message: SQLSTATE[42601]: Syntax error: 7 ERROR: LIMIT #,# syntax is not supported LINE 1: ... SUM(numvols) AS sum_vols FROM Pool GROUP BY name LIMIT 9,66 ^ HINT: Use separate LIMIT and OFFSET clauses."

index.php

 if ($pools_count > $max_pools) {
- $limit = $max_pools . ',' . ($pools_count - $max_pools);
+ $limit = $max_pools . 'OFFSET ' . ($pools_count - $max_pools);
 
     $query = array('table' => $table_pool,
         'fields' => array('SUM(numvols) AS sum_vols'),

ebourgui

2013-01-04 16:20

reporter   ~0000194

I confirm : same issue.

davide

2013-01-18 13:20

manager   ~0000202

A fix will be included in next version

davide

2013-01-25 13:48

manager   ~0000208

Bug fixed in Bacula-Web 5.2.12

davide

2013-11-19 15:05

manager   ~0000325

Issue closed

Issue History

Date Modified Username Field Change
2012-08-25 01:49 m87carlson New Issue
2012-08-25 01:50 m87carlson Note Added: 0000146
2012-08-25 01:50 m87carlson Note Added: 0000147
2012-08-27 12:15 davide Assigned To => davide
2012-08-27 12:15 davide Status new => assigned
2012-08-27 12:17 davide Note Added: 0000148
2012-08-27 12:18 davide Note Edited: 0000148 View Revisions
2012-08-29 12:22 ebourgui Note Added: 0000150
2012-08-30 15:34 davide Relationship added related to 0000068
2012-09-11 16:23 itc Note Added: 0000154
2012-10-29 12:06 mvv Note Added: 0000162
2012-10-29 14:07 ebourgui Note Added: 0000163
2012-10-29 14:17 davide Note Added: 0000164
2013-01-02 14:13 davide Status assigned => feedback
2013-01-04 12:22 davide Status feedback => confirmed
2013-01-04 12:22 davide Note Added: 0000190
2013-01-04 12:22 davide Status confirmed => feedback
2013-01-04 12:31 mvv Note Added: 0000191
2013-01-04 16:16 mvv Note Added: 0000193
2013-01-04 16:20 ebourgui Note Added: 0000194
2013-01-18 13:20 davide Note Added: 0000202
2013-01-18 13:20 davide Status feedback => assigned
2013-01-24 11:44 davide Product Version => 5.2.11
2013-01-24 11:44 davide Target Version => 5.2.12
2013-01-25 13:48 davide Note Added: 0000208
2013-01-25 13:48 davide Status assigned => resolved
2013-01-25 13:48 davide Fixed in Version => 5.2.12
2013-01-25 13:48 davide Resolution open => fixed
2013-11-19 15:05 davide Status resolved => closed
2013-11-19 15:05 davide Note Added: 0000325