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

Method push_warning

sql/sql_error.cc:713–737  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

711}
712
713Sql_condition *Warning_info::push_warning(THD *thd,
714 uint sql_errno, const char* sqlstate,
715 Sql_condition::enum_warning_level level,
716 const char *msg)
717{
718 Sql_condition *cond= NULL;
719
720 if (! m_read_only)
721 {
722 if (m_allow_unlimited_warnings ||
723 m_warn_list.elements() < thd->variables.max_error_count)
724 {
725 cond= new (& m_warn_root) Sql_condition(& m_warn_root);
726 if (cond)
727 {
728 cond->set(sql_errno, sqlstate, level, msg);
729 m_warn_list.push_back(cond);
730 }
731 }
732 m_warn_count[(uint) level]++;
733 }
734
735 m_current_statement_warn_count++;
736 return cond;
737}
738
739Sql_condition *Warning_info::push_warning(THD *thd, const Sql_condition *sql_condition)
740{

Callers 2

raise_conditionMethod · 0.45

Calls 9

push_warningFunction · 0.85
get_sql_errnoMethod · 0.80
get_message_textMethod · 0.80
copy_opt_attributesMethod · 0.80
elementsMethod · 0.45
setMethod · 0.45
push_backMethod · 0.45
get_sqlstateMethod · 0.45
get_levelMethod · 0.45

Tested by

no test coverage detected