PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » MDB2_Driver_mssql » Bug #5862

Incorrect method call in mssql.php causes liveuser to fail

Details

Submitted2005-11-04 02:42 UTC
Fromdisdat at gmail dot com
Assignedlsmith
StatusClosed
PackageMDB2_Driver_mssql
PHP Version5.0.4
OSWindows 2000
Roadmaps(Not assigned)

Comments

[2005-11-04 02:42 UTC] disdat at gmail dot com

Description:
------------
PEAR/MDB2/Driver/Manager/mssql.php calls _isSequenceName
method with wrong number of arguments in two different places.
The method only takes one argument as defined in PEAR/MDb2/
Driver/Manager/Common.php but mssql.php passes two parameters
causing it to fail.

MDB2_driver_mssql v 0.1.2

Running SQL Server 2000.

Test script:
---------------
//code fragment from function listSequences and listTables() in mssql.php

//wrong
//if ($this->_isSequenceName($db, $table_names[$i])) {

//correct
if ($this->_isSequenceName($table_names[$i])) {
$sequences[] = $table_names[$i];
//echo "<br>" . $tables_names[$i];
}

Expected result:
----------------
Liveuser fails to install schema because updateDatabase call
fails (it acutually goes into a loop and times out logging an
error about running over the execution limit configured in
php.ini).

Fixing mssql.php caused Liveuser to install tables correctly.