Skip to content

Commit 509c606

Browse files
committed
Adding ini setting for max_procs
1 parent fd0d39d commit 509c606

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

ext/mssql/php_mssql.c

+2
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ PHP_INI_BEGIN()
137137
STD_PHP_INI_ENTRY_EX("mssql.batchsize", "0", PHP_INI_ALL, OnUpdateInt, batchsize, zend_mssql_globals, mssql_globals, display_link_numbers)
138138
STD_PHP_INI_BOOLEAN("mssql.datetimeconvert", "1", PHP_INI_ALL, OnUpdateBool, datetimeconvert, zend_mssql_globals, mssql_globals)
139139
STD_PHP_INI_BOOLEAN("mssql.secure_connection", "0", PHP_INI_SYSTEM, OnUpdateBool, secure_connection, zend_mssql_globals, mssql_globals)
140+
STD_PHP_INI_ENTRY_EX("mssql.max_procs", "25", PHP_INI_ALL, OnUpdateInt, max_procs, zend_mssql_globals, mssql_globals, display_link_numbers)
140141
PHP_INI_END()
141142

142143
/* error handler */
@@ -330,6 +331,7 @@ PHP_RINIT_FUNCTION(mssql)
330331
dbsetlogintime(MS_SQL_G(connect_timeout));
331332
if (MS_SQL_G(timeout) < 0) MS_SQL_G(timeout) = 60;
332333
dbsettime(MS_SQL_G(timeout));
334+
dbsetmaxprocs((SHORT)MS_SQL_G(max_procs));
333335

334336
return SUCCESS;
335337
}

ext/mssql/php_mssql.h

+1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ ZEND_BEGIN_MODULE_GLOBALS(mssql)
121121
long datetimeconvert;
122122
HashTable *resource_list, *resource_plist;
123123
long secure_connection;
124+
long max_procs;
124125
ZEND_END_MODULE_GLOBALS(mssql)
125126

126127
#define MSSQL_ROWS_BLOCK 128

0 commit comments

Comments
 (0)