Commit e94a43da authored by unknown's avatar unknown

Slightly better way to handle max_connections for embedded server.

parent 6135a547
...@@ -1175,12 +1175,13 @@ static int pbxt_init(void *p) ...@@ -1175,12 +1175,13 @@ static int pbxt_init(void *p)
* +1 Temporary thread (e.g. TempForClose, TempForEnd) * +1 Temporary thread (e.g. TempForClose, TempForEnd)
*/ */
#ifndef DRIZZLED #ifndef DRIZZLED
#ifdef EMBEDDED_LIBRARY if (pbxt_max_threads == 0) {
pbxt_max_threads = 100; // Embedded server sets max_connections=1
#else if (max_connections > 1)
if (pbxt_max_threads == 0) pbxt_max_threads = max_connections + 7;
pbxt_max_threads = max_connections + 7; else
#endif pbxt_max_threads = 100;
}
#endif #endif
self = xt_init_threading(pbxt_max_threads); /* Create the main self: */ self = xt_init_threading(pbxt_max_threads); /* Create the main self: */
if (!self) if (!self)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment