mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
dbug changes:
1. dbug state is now local to a thread 2. new macros: DBUG_EXPLAIN, DBUG_EXPLAIN_INITIAL, DBUG_SET, DBUG_SET_INITIAL, DBUG_EVALUATE, DBUG_EVALUATE_IF 3. macros are do{}while(0) wrapped 4. incremental modifications to the dbug state (e.g. "+d,info:-t") 5. dbug code cleanup, style fixes 6. _db_on_ and DEBUGGER_ON/OFF removed 7. rest of MySQL code fixed because of 3 (missing ;) and 6 8. dbug manual updated 9. server variable @@debug (global and local) to control dbug from SQL! a. -#T to print timestamps in the log
This commit is contained in:
@ -179,10 +179,8 @@ void STDCALL mysql_server_end()
|
||||
if (!org_my_init_done)
|
||||
{
|
||||
my_end(0);
|
||||
#ifndef THREAD
|
||||
/* Remove TRACING, if enabled by mysql_debug() */
|
||||
DBUG_POP();
|
||||
#endif
|
||||
}
|
||||
else
|
||||
mysql_thread_end();
|
||||
@ -267,16 +265,12 @@ mysql_debug(const char *debug __attribute__((unused)))
|
||||
{
|
||||
#ifndef DBUG_OFF
|
||||
char *env;
|
||||
if (_db_on_)
|
||||
return; /* Already using debugging */
|
||||
if (debug)
|
||||
{
|
||||
DEBUGGER_ON;
|
||||
DBUG_PUSH(debug);
|
||||
}
|
||||
else if ((env = getenv("MYSQL_DEBUG")))
|
||||
{
|
||||
DEBUGGER_ON;
|
||||
DBUG_PUSH(env);
|
||||
#if !defined(_WINVER) && !defined(WINVER)
|
||||
puts("\n-------------------------------------------------------");
|
||||
|
Reference in New Issue
Block a user