| 5440 | #ifndef EMBEDDED_LIBRARY |
| 5441 | |
| 5442 | static void create_shutdown_thread() |
| 5443 | { |
| 5444 | #ifdef __WIN__ |
| 5445 | hEventShutdown=CreateEvent(0, FALSE, FALSE, shutdown_event_name); |
| 5446 | pthread_t hThread; |
| 5447 | int error; |
| 5448 | if ((error= mysql_thread_create(key_thread_handle_shutdown, |
| 5449 | &hThread, &connection_attrib, |
| 5450 | handle_shutdown, 0))) |
| 5451 | sql_print_warning("Can't create thread to handle shutdown requests" |
| 5452 | " (errno= %d)", error); |
| 5453 | |
| 5454 | // On "Stop Service" we have to do regular shutdown |
| 5455 | Service.SetShutdownEvent(hEventShutdown); |
| 5456 | #endif /* __WIN__ */ |
| 5457 | } |
| 5458 | |
| 5459 | #endif /* EMBEDDED_LIBRARY */ |
| 5460 | |