View Issue Details

IDProjectCategoryView StatusLast Update
413RackTablesdefaultpublic2019-01-08 11:54
Reporteruser211Assigned Toadoom42  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version0.19.1 
Target Version0.19.2Fixed in Version0.19.2 
Summary413: Unable to link any objects
DescriptionWhen I try to link any object, I am getting paster below error. It's constant and reproducible at every try.

Server is running Debian Etch (I know a bit old, but also reproduced it on latest CentOS 5.5).

# cat /etc/issue
Debian GNU/Linux 4.0 \n \l

# php -v
PHP 5.2.0-8+etch16 (cli) (built: Nov 24 2009 11:14:47)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies

# php -m
[PHP Modules]
bcmath
bz2
calendar
ctype
date
dba
dom
exif
filter
ftp
gd
gettext
hash
iconv
imap
json
ldap
libxml
mbstring
mime_magic
mysql
mysqli
ncurses
openssl
pcntl
pcre
PDO
pdo_mysql
posix
Reflection
session
shmop
SimpleXML
snmp
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
wddx
xml
xmlreader
xmlwriter
zip
zlib

[Zend Modules]

# mysql -v
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 16829
Server version: 5.0.32-Debian_7etch10-log Debian etch distribution

Reading history-file /root/.mysql_history
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

Critical error as it's stopping us from updating documentation. Please let me know if I can help in any way to solve it.

Pdo exception: PDOException

SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. (HY000)
at file /var/www/default/racktables/inc/database.php, line 2618

/var/www/default/racktables/inc/database.php:2618 prepare('INSERT INTO Link (porta, portb, cable) VALUES (?, ?, ?)')
/var/www/default/racktables/inc/database.php:1192 usePreparedInsertBlade('Link', Array
(
    [porta] => 439
    [portb] => 440
    [cable] =>
)
)
/var/www/default/racktables/inc/ophandlers.php:572 linkPorts('440', '439', '')
/var/www/default/racktables/process.php:37 linkPortForObject()
Error info:

Array
(
    [0] => HY000
    [1] => 2014
    [2] => Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.
)
Parameters:

GET

page object
tab ports
op linkPort
object_id 43
port_id 440
remote_port_id 439
cable
POST

COOKIE

PHPSESSID 75a3a67a1471c6aad677db86c466f6af
TagsNo tags attached.

Activities

user212

2011-03-18 15:25

  ~0000304

I have experienced exactly the same problem when trying to link some objects.
...
Pdo exception: PDOException

SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. (HY000)
at file /var/www/html/racktables/inc/database.php, line 2625

/var/www/html/racktables/inc/database.php:2625 prepare('INSERT INTO Link (porta, portb, cable) VALUES (?, ?, ?)')
/var/www/html/racktables/inc/database.php:1199 usePreparedInsertBlade('Link', Array
(
    [porta] => 116
    [portb] => 255
    [cable] =>
)
...
adoom42

adoom42

2011-03-19 16:57

administrator   ~0000305

This has been resolved in 0.19.2. As an immediate fix, apply this patch (adds one line to database.php, after line 1185):

--- RackTables-0.19.1/wwwroot/inc/database.php 2011-03-19 09:57:21.000000000 -0700
+++ trunk/wwwroot/inc/database.php 2011-03-19 09:49:44.000000000 -0700
@@ -1183,6 +1182,7 @@
                $dbxlink->exec ('UNLOCK TABLES');
                return "Port ${porta} or ${portb} is already linked";
        }
+ $result->closeCursor ();
        if ($porta > $portb)
        {
                $tmp = $porta;

Issue History

Date Modified Username Field Change
2011-03-18 14:50 user211 New Issue
2011-03-18 15:25 user212 Note Added: 0000304
2011-03-19 16:57 adoom42 Note Added: 0000305
2011-03-19 16:57 adoom42 Assigned To => adoom42
2011-03-19 16:57 adoom42 Status new => closed
2011-03-19 16:57 adoom42 Resolution open => fixed
2011-03-19 16:57 adoom42 Fixed in Version => 0.19.2
2011-03-19 16:57 adoom42 Target Version => 0.19.2
2019-01-08 11:54 adoom42 Source_changeset_attached => RackTables master 1b2db3f7