1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Added per thread status variables, after review, patch v1.1.

This commit is contained in:
jani@rhols221.adsl.netsonic.fi
2004-09-13 16:48:01 +03:00
parent b83af8607a
commit fe23df1a2b
23 changed files with 505 additions and 271 deletions

View File

@ -5122,6 +5122,7 @@ static void
make_join_readinfo(JOIN *join, uint options)
{
uint i;
bool statistics= test(!(join->select_options & SELECT_DESCRIBE));
DBUG_ENTER("make_join_readinfo");
@ -5220,7 +5221,8 @@ make_join_readinfo(JOIN *join, uint options)
join->thd->server_status|=SERVER_QUERY_NO_GOOD_INDEX_USED;
tab->read_first_record= join_init_quick_read_record;
if (statistics)
statistic_increment(select_range_check_count, &LOCK_status);
statistic_increment(join->thd->status_var.select_range_check_count,
&LOCK_status);
}
else
{
@ -5230,13 +5232,15 @@ make_join_readinfo(JOIN *join, uint options)
if (tab->select && tab->select->quick)
{
if (statistics)
statistic_increment(select_range_count, &LOCK_status);
statistic_increment(join->thd->status_var.select_range_count,
&LOCK_status);
}
else
{
join->thd->server_status|=SERVER_QUERY_NO_INDEX_USED;
if (statistics)
statistic_increment(select_scan_count, &LOCK_status);
statistic_increment(join->thd->status_var.select_scan_count,
&LOCK_status);
}
}
else
@ -5244,13 +5248,15 @@ make_join_readinfo(JOIN *join, uint options)
if (tab->select && tab->select->quick)
{
if (statistics)
statistic_increment(select_full_range_join_count, &LOCK_status);
statistic_increment(join->thd->status_var.select_full_range_join_count,
&LOCK_status);
}
else
{
join->thd->server_status|=SERVER_QUERY_NO_INDEX_USED;
if (statistics)
statistic_increment(select_full_join_count, &LOCK_status);
statistic_increment(join->thd->status_var.select_full_join_count,
&LOCK_status);
}
}
if (!table->no_keyread)
@ -6672,7 +6678,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
(int) distinct, (int) save_sum_fields,
(ulong) rows_limit,test(group)));
statistic_increment(created_tmp_tables, &LOCK_status);
statistic_increment(thd->status_var.created_tmp_tables, &LOCK_status);
if (use_temp_pool)
temp_pool_slot = bitmap_set_next(&temp_pool);
@ -7251,7 +7257,8 @@ static bool create_myisam_tmp_table(TABLE *table,TMP_TABLE_PARAM *param,
table->db_stat=0;
goto err;
}
statistic_increment(created_tmp_disk_tables, &LOCK_status);
statistic_increment(table->in_use->status_var.created_tmp_disk_tables,
&LOCK_status);
table->db_record_offset=1;
DBUG_RETURN(0);
err: