From 7a8a76075a6462af189a5bedfe49e8e21be086f3 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 23 Feb 2005 20:49:47 +0200 Subject: [PATCH] Fix for BUG#8576 This fix addresses a bug of the HPUX C++ compiler, in the way it uses registers. As result, the last comparison of the variable 'result' failed, and next_prefix() looped forever. sql/opt_range.cc: - fix for BUG#8576 - updated function name in DBUG_ENTER --- sql/opt_range.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 0418225965a..ecf255b091d 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -7467,7 +7467,7 @@ void cost_group_min_max(TABLE* table, KEY *index_info, uint used_key_parts, double quick_prefix_selectivity; double io_cost; double cpu_cost= 0; /* TODO: CPU cost of index_read calls? */ - DBUG_ENTER("TRP_GROUP_MIN_MAX::cost"); + DBUG_ENTER("cost_group_min_max"); table_records= table->file->records; keys_per_block= (table->file->block_size / 2 / @@ -7971,7 +7971,15 @@ int QUICK_GROUP_MIN_MAX_SELECT::get_next() { int min_res= 0; int max_res= 0; +#ifdef HPUX11 + /* + volatile is required by a bug in the HP compiler due to which the + last test of result fails. + */ + volatile int result; +#else int result; +#endif int is_last_prefix; DBUG_ENTER("QUICK_GROUP_MIN_MAX_SELECT::get_next");