mirror of
https://github.com/php/php-src.git
synced 2024-12-14 20:33:36 +08:00
Fixing the use of mssql.textsize in pconnect()
This commit is contained in:
parent
7a4e1a9b0f
commit
3581f0d037
@ -421,14 +421,6 @@ void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (MS_SQL_G(textsize) != -1) {
|
||||
sprintf(buffer, "%li", MS_SQL_G(textsize));
|
||||
if (dbsetopt(mssql.link, DBTEXTSIZE, buffer)==FAIL) {
|
||||
efree(hashed_details);
|
||||
dbfreelogin(mssql.login);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
if (MS_SQL_G(textlimit) != -1) {
|
||||
sprintf(buffer, "%li", MS_SQL_G(textlimit));
|
||||
if (dbsetopt(mssql.link, DBTEXTLIMIT, buffer)==FAIL) {
|
||||
@ -437,6 +429,12 @@ void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
if (MS_SQL_G(textsize) != -1) {
|
||||
sprintf(buffer, "SET TEXTSIZE %li", MS_SQL_G(textsize));
|
||||
dbcmd(mssql.link, buffer);
|
||||
dbsqlexec(mssql.link);
|
||||
dbresults(mssql.link);
|
||||
}
|
||||
|
||||
/* hash it up */
|
||||
mssql_ptr = (mssql_link *) emalloc(sizeof(mssql_link));
|
||||
@ -545,15 +543,9 @@ void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
}
|
||||
if (MS_SQL_G(textsize) != -1) {
|
||||
sprintf(buffer, "SET TEXTSIZE %li", MS_SQL_G(textsize));
|
||||
|
||||
dbcmd(mssql.link, buffer);
|
||||
dbsqlexec(mssql.link);
|
||||
dbresults(mssql.link);
|
||||
// if (dbsetopt(mssql.link, DBTEXTSIZE, buffer)==FAIL) {
|
||||
// efree(hashed_details);
|
||||
// dbfreelogin(mssql.login);
|
||||
// RETURN_FALSE;
|
||||
// }
|
||||
}
|
||||
|
||||
/* add it to the list */
|
||||
|
Loading…
Reference in New Issue
Block a user