[php-src] PR #12306: Optimized odbc_sqlconnect
| From: | SakiTakamachi | Date: | Wed, 27 Sep 2023 09:00:24 +0000 |
| Subject: | [php-src] PR #12306: Optimized odbc_sqlconnect | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-23714@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/12306
Author: SakiTakamachi
fixes https://github.com/php/php-src/issues/12296
I'm wondering if I should make these changes to PHP 8.2.
With this change, several use cases such as those shown below can be handled successfully.
Correct credentials (my env):
```
uid: test_user2
pwd: ''
```
Cases where the connection string contains only either uid or pwd:
```
odbc_pconnect('Driver=FreeTDS;Server=mssql-server;Port=1433;Database=test;uid=test_user2',
'hoge', '');
odbc_pconnect('Driver=FreeTDS;Server=mssql-server;Port=1433;Database=test;pwd=',
'test_user2', 'fuga');
```
Cases where both uppercase and lowercase letters are used in attribute keys:
```
odbc_pconnect('Driver=FreeTDS;Server=mssql-server;Port=1433;Database=test;uiD=test_user2;Pwd=',
'hoge', 'fuga');
```
cc: @NattyNarwhal