diff options
Diffstat (limited to 'sql/sql_test.cc')
-rw-r--r-- | sql/sql_test.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sql/sql_test.cc b/sql/sql_test.cc index 08dc137bebe..5ea132c83d4 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -294,7 +294,6 @@ print_plan(JOIN* join, uint idx, double record_count, double read_time, double current_read_time, const char *info) { uint i; - POSITION pos; JOIN_TAB *join_table; JOIN_TAB **plan_nodes; TABLE* table; @@ -321,8 +320,8 @@ print_plan(JOIN* join, uint idx, double record_count, double read_time, fputs(" POSITIONS: ", DBUG_FILE); for (i= 0; i < idx ; i++) { - pos = join->positions[i]; - table= pos.table->table; + POSITION *pos= join->positions + i; + table= pos->table->table; if (table) fputs(table->s->table_name.str, DBUG_FILE); fputc(' ', DBUG_FILE); @@ -338,8 +337,8 @@ print_plan(JOIN* join, uint idx, double record_count, double read_time, fputs("BEST_POSITIONS: ", DBUG_FILE); for (i= 0; i < idx ; i++) { - pos= join->best_positions[i]; - table= pos.table->table; + POSITION *pos= join->best_positions + i; + table= pos->table->table; if (table) fputs(table->s->table_name.str, DBUG_FILE); fputc(' ', DBUG_FILE); @@ -565,6 +564,7 @@ void mysql_print_status() STATUS_VAR tmp; uint count; + tmp= global_status_var; count= calc_sum_of_all_status(&tmp); printf("\nStatus information:\n\n"); (void) my_getwd(current_dir, sizeof(current_dir),MYF(0)); @@ -616,8 +616,12 @@ Next alarm time: %lu\n", (ulong)alarm_info.next_alarm_time); #endif display_table_locks(); -#ifdef HAVE_MALLINFO +#if defined(HAVE_MALLINFO2) + struct mallinfo2 info = mallinfo2(); +#elif defined(HAVE_MALLINFO) struct mallinfo info= mallinfo(); +#endif +#if defined(HAVE_MALLINFO) || defined(HAVE_MALLINFO2) char llbuff[10][22]; printf("\nMemory status:\n\ Non-mmapped space allocated from system: %s\n\ |