sqlparser/stats.cpp
// Update summary status for single occurrence from detail
Update summary status for single occurrence from detail
Update summary status for single occurrence from detail
void StatsSummaryItem::UpdateSingleOccurrenceStatus(StatsDetailItem *sid)
{
	if(sid == NULL)
		return;
	if(sid->conv_status == STATS_CONV_ERROR)
	{
		conv_undef = 0;
		conv_no_need = 0;
		conv_ok = 0;
		conv_warn = 0;
		conv_error = 1;
	}
	else
	if (sid->conv_status == STATS_CONV_OK && conv_undef == 0 && conv_warn == 0 && conv_error == 0)
	{
		conv_no_need = 0;
		conv_ok = 1;
	}
	else
	if (sid->conv_status == STATS_CONV_NO_NEED && conv_undef == 0 && conv_ok == 0 && conv_warn == 0 && conv_error == 0)
		conv_no_need = 1;
	else
	if(sid->conv_status == 0 && conv_error == 0)
	{
		conv_undef = 1;
		conv_no_need = 0;
		conv_ok = 0;
		conv_warn = 0;
	}
	occurrences = 1;
}
void StatsSummaryItem :: UpdateSingleOccurrenceStatus ( StatsDetailItem * sid ) { if ( sid == NULL ) return ; if ( sid -> conv_status == STATS_CONV_ERROR ) { conv_undef = 0 ; conv_no_need = 0 ; conv_ok = 0 ; conv_warn = 0 ; conv_error = 1 ; } else if ( sid -> conv_status == STATS_CONV_OK && conv_undef == 0 && conv_warn == 0 && conv_error == 0 ) { conv_no_need = 0 ; conv_ok = 1 ; } else if ( sid -> conv_status == STATS_CONV_NO_NEED && conv_undef == 0 && conv_ok == 0 && conv_warn == 0 && conv_error == 0 ) conv_no_need = 1 ; else if ( sid -> conv_status == 0 && conv_error == 0 ) { conv_undef = 1 ; conv_no_need = 0 ; conv_ok = 0 ; conv_warn = 0 ; } occurrences = 1 ; }
Update summary status for single occurrence from detail
Update summary status for single occurrence from detail
// Error status is most critical, it overrides all other statuses // Conversion is successful (overwrites only no_need) // No conversion is required // No status specified, treat it as undefined conversion, and overwite all other statuses except error