View Issue Details

IDProjectCategoryView StatusLast Update
414RackTablesdefaultpublic2011-03-25 09:54
Reporteruser211Assigned Toinfrastation  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version0.19.1 
Target Version0.19.2Fixed in Version0.19.2 
Summary414: PDO Exception while trying to change Ports details
DescriptionI can add new objects in Ports for given devices, however when I try to change eg. "Local name" for given port and save the change I am getting following PDO Exception error.

Pdo exception: PDOException

SQLSTATE[42000]: Syntax error or access violation: 1064 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 '?AND object_id=?' at line 1 (42000)
at file /var/www/default/racktables/inc/database.php, line 2690

/var/www/default/racktables/inc/database.php:2690 prepare('UPDATE Port SET name=?, type=?, label=?, reservation_comment=?, l2address=? WHERE id=?AND object_id=?')
/var/www/default/racktables/inc/database.php:1149 usePreparedUpdateBlade('Port', Array
(
    [name] => nic1
    [type] => 24
    [label] =>
    [reservation_comment] =>
    [l2address] =>
)
, Array
(
    [id] => 502
    [object_id] => 53
)
)
/var/www/default/racktables/inc/ophandlers.php:559 commitUpdatePort('53', '502', 'nic1', '24', '', '', '')
/var/www/default/racktables/process.php:37 editPortForObject()
Error info:

Array
(
    [0] => 42000
    [1] => 1064
    [2] => 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 '?AND object_id=?' at line 1
)
Parameters:

GET

page object
tab ports
op editPort
POST

port_id 502
object_id 53
name nic1
label
port_type_id 24
l2address
reservation_comment
submit_x 13
submit_y 10
COOKIE

Please do let me know if I can provide any additional details that will help solve this issue.
TagsNo tags attached.

Activities

user211

2011-03-23 21:22

  ~0000306

Actually, this trivial patch fixes this error.


2685c2685
< $query .= "${conj} ${colname}=?";
---
> $query .= "${conj} ${colname}=? ";
infrastation

infrastation

2011-03-24 20:00

administrator   ~0000308

The bug should be fixed in release 0.19.2, could you confirm?

user211

2011-03-25 09:37

  ~0000310

Yep, it's all good in 0.19.2

Issue History

Date Modified Username Field Change
2011-03-23 21:18 user211 New Issue
2011-03-23 21:22 user211 Note Added: 0000306
2011-03-24 20:00 infrastation Note Added: 0000308
2011-03-24 20:12 infrastation Status new => assigned
2011-03-24 20:12 infrastation Assigned To => infrastation
2011-03-25 09:37 user211 Note Added: 0000310
2011-03-25 09:54 infrastation Status assigned => closed
2011-03-25 09:54 infrastation Resolution open => fixed
2011-03-25 09:54 infrastation Fixed in Version => 0.19.2
2011-03-25 09:54 infrastation Target Version => 0.19.2