MCPcopy Create free account
hub / github.com/Tencent/phxsql / console_event_handler

Function console_event_handler

phx_percona/percona/sql/mysqld.cc:3137–3159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3135*/
3136
3137static BOOL WINAPI console_event_handler( DWORD type )
3138{
3139 DBUG_ENTER("console_event_handler");
3140#ifndef EMBEDDED_LIBRARY
3141 if(type == CTRL_C_EVENT)
3142 {
3143 /*
3144 Do not shutdown before startup is finished and shutdown
3145 thread is initialized. Otherwise there is a race condition
3146 between main thread doing initialization and CTRL-C thread doing
3147 cleanup, which can result into crash.
3148 */
3149#ifndef EMBEDDED_LIBRARY
3150 if(hEventShutdown)
3151 kill_mysql();
3152 else
3153#endif
3154 sql_print_warning("CTRL-C ignored during startup");
3155 DBUG_RETURN(TRUE);
3156 }
3157#endif
3158 DBUG_RETURN(FALSE);
3159}
3160
3161
3162

Callers

nothing calls this directly

Calls 1

kill_mysqlFunction · 0.85

Tested by

no test coverage detected