MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / print

Method print

sql/mysqld.cc:857–884  ·  view source on GitHub ↗

Print a buffered log to the real log file. */

Source from the content-addressed store, hash-verified

855 Print a buffered log to the real log file.
856*/
857void Buffered_log::print()
858{
859 /*
860 Since messages are buffered, they can be printed out
861 of order with other entries in the log.
862 Add "Buffered xxx" to the message text to prevent confusion.
863 */
864 switch(m_level)
865 {
866 case ERROR_LEVEL:
867 sql_print_error("Buffered error: %s\n", m_message.c_ptr_safe());
868 break;
869 case WARNING_LEVEL:
870 sql_print_warning("Buffered warning: %s\n", m_message.c_ptr_safe());
871 break;
872 case INFORMATION_LEVEL:
873 /*
874 Messages printed as "information" still end up in the mysqld *error* log,
875 but with a [Note] tag instead of an [ERROR] tag.
876 While this is probably fine for a human reading the log,
877 it is upsetting existing automated scripts used to parse logs,
878 because such scripts are likely to not already handle [Note] properly.
879 INFORMATION_LEVEL messages are simply silenced, on purpose,
880 to avoid un needed verbosity.
881 */
882 break;
883 }
884}
885
886/**
887 Collection of all the buffered log messages.

Callers 1

init_common_variablesFunction · 0.45

Calls 3

sql_print_errorFunction · 0.85
sql_print_warningFunction · 0.85
c_ptr_safeMethod · 0.80

Tested by

no test coverage detected