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

Function push_warning

sql/sql_error.cc:764–783  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

762*/
763
764void push_warning(THD *thd, Sql_condition::enum_warning_level level,
765 uint code, const char *msg)
766{
767 DBUG_ENTER("push_warning");
768 DBUG_PRINT("enter", ("code: %d, msg: %s", code, msg));
769
770 /*
771 Calling push_warning/push_warning_printf with a level of
772 WARN_LEVEL_ERROR *is* a bug. Either use my_printf_error(),
773 my_error(), or WARN_LEVEL_WARN.
774 */
775 DBUG_ASSERT(level != Sql_condition::WARN_LEVEL_ERROR);
776
777 if (level == Sql_condition::WARN_LEVEL_ERROR)
778 level= Sql_condition::WARN_LEVEL_WARN;
779
780 (void) thd->raise_condition(code, NULL, level, msg);
781
782 DBUG_VOID_RETURN;
783}
784
785
786/*

Callers 8

val_strMethod · 0.85
signal_divide_by_nullMethod · 0.85
append_warning_infoMethod · 0.85
push_warningMethod · 0.85
push_warning_printfFunction · 0.85
validate_comment_lengthFunction · 0.85
prepare_blob_fieldFunction · 0.85

Calls 1

raise_conditionMethod · 0.80

Tested by

no test coverage detected