diff options
author | Stanley Sufficool <ssufficool@php.net> | 2013-07-14 11:16:42 -0700 |
---|---|---|
committer | Stanley Sufficool <ssufficool@php.net> | 2013-07-14 11:16:42 -0700 |
commit | d012bdca0319e225435430f89446828642b9810d (patch) | |
tree | 698135ca77f95b9e4b995947143ff4ad0f71c445 | |
parent | ebad5178c4ae0da124469b1432fb0e890f6147da (diff) | |
download | php-git-d012bdca0319e225435430f89446828642b9810d.tar.gz |
Fix Bug #65219
DBSETLDBNAME should be called before login to set DBNAME in login record
-rw-r--r-- | ext/pdo_dblib/dblib_driver.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c index c54cd73d84..ff42514721 100644 --- a/ext/pdo_dblib/dblib_driver.c +++ b/ext/pdo_dblib/dblib_driver.c @@ -350,6 +350,12 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ DBSETLAPP(H->login, vars[1].optval); +#ifdef DBSETLDBNAME + if (vars[3].optval) { + DBSETLDBNAME(H->login, vars[3].optval); + } +#endif + H->link = dbopen(H->login, vars[2].optval); if (!H->link) { @@ -365,12 +371,6 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ /* allow double quoted indentifiers */ DBSETOPT(H->link, DBQUOTEDIDENT, "1"); -#ifdef DBSETLDBNAME - if (vars[3].optval) { - DBSETLDBNAME(H->login, vars[3].optval); - } -#endif - ret = 1; dbh->max_escaped_char_length = 2; dbh->alloc_own_columns = 1; |