Skip to content

Impossible to make multiple connections with same connection args #97

@mlazdans

Description

@mlazdans

Due to current logic

php-firebird/interbase.c

Lines 1071 to 1072 in a47d0c7

/* try to reuse a connection */
if ((le = zend_hash_str_find_ptr(&EG(regular_list), hash, sizeof(hash)-1)) != NULL) {

it is not possible to create multiple connections with same connection args.

$con1 = ibase_connect($db, $user, $password, "utf8");
$con2 = ibase_connect($db, $user, $password, "utf8");

var_dump($con1);
var_dump($con2);
dump_rows(ibase_query('SELECT COUNT(*) FROM MON$ATTACHMENTS WHERE MON$SYSTEM_FLAG = 0'));

resource(5) of type (Firebird/InterBase link)
resource(5) of type (Firebird/InterBase link)
array(1) {
["COUNT"]=>
int(1)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions