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

Method copy_non_errors_from_wi

sql/sql_error.cc:642–659  ·  view source on GitHub ↗

Copy Sql_conditions that are not WARN_LEVEL_ERROR from the source Warning_info to the current Warning_info. @param thd Thread context. @param sp_wi Stored-program Warning_info @param thd Thread context. @param src_wi Warning_info to copy from. */

Source from the content-addressed store, hash-verified

640 @param src_wi Warning_info to copy from.
641*/
642void Diagnostics_area::copy_non_errors_from_wi(THD *thd,
643 const Warning_info *src_wi)
644{
645 Sql_condition_iterator it(src_wi->m_warn_list);
646 const Sql_condition *cond;
647 Warning_info *wi= get_warning_info();
648
649 while ((cond= it++))
650 {
651 if (cond->get_level() == Sql_condition::WARN_LEVEL_ERROR)
652 continue;
653
654 Sql_condition *new_condition= wi->push_warning(thd, cond);
655
656 if (src_wi->is_marked_for_removal(cond))
657 wi->mark_condition_for_removal(new_condition);
658 }
659}
660
661
662void Warning_info::mark_sql_conditions_for_removal()

Callers

nothing calls this directly

Calls 4

is_marked_for_removalMethod · 0.80
get_levelMethod · 0.45
push_warningMethod · 0.45

Tested by

no test coverage detected