-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
db2 driver confuses schema name for database name #1032
Comments
I'm sorry but I have zero knowledge of Db2, and no access to an instance of it for testing either, so I won't be able to help you much. Maybe @mnewnham will care to reply. All I can say is that the following error is from PHP's db2_connect() function
Did you try using an actual DSN to connect ? |
I'll take a look. I don't have a DB2 system myself at the moment either though. |
probably a dupe of #1031. Please check the fix for that |
Thanks for looking into it @mnewnham @NattyNarwhal please test Mark's proposed fix in #1034 and let us know if it fixes your problem. |
Using a full connection string doesn't work (tried with the PR). Note that there are some IBM i specific things with those; I've also never seen anyone use it like that.
I'll review the PR as well. |
Description
When trying to set the database name when connecting, the Db2 driver mixes up the DSN (containing the host information) and the database name. This is obviously invalid, and will fail to connect.
Environment
Steps to reproduce
Resulting error spew:
Expected behavior
That it would connect to the specified system and set the default database.
Additional context
The old pre-rewrite version of the driver in 5.20 seemed to use the DSN intact and called
SET SCHEMA
after connecting:ADOdb/drivers/adodb-db2.inc.php
Lines 72 to 100 in 4011379
The text was updated successfully, but these errors were encountered: