Fixing the use of mssql.textsize in pconnect()

This commit is contained in:
Frank M. Kromann 1999-11-10 19:58:07 +00:00
parent 7a4e1a9b0f
commit 3581f0d037

View File

@ -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 */