diff options
author | unknown <gluh@mysql.com/eagle.(none)> | 2007-02-12 19:28:49 +0400 |
---|---|---|
committer | unknown <gluh@mysql.com/eagle.(none)> | 2007-02-12 19:28:49 +0400 |
commit | 7ca34a798fd31b01d50c17adacc869e1e54e97b1 (patch) | |
tree | 8fd2e4b90bca834602f3a53d79f8f35cf47d46a4 | |
parent | 2572c82621b04cb852b29736f835bcb204f5bfc0 (diff) | |
download | mariadb-git-7ca34a798fd31b01d50c17adacc869e1e54e97b1.tar.gz |
valgrind error fix
-rw-r--r-- | sql/opt_range.cc | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 32cf6860d5c..4838e690dd7 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -8820,7 +8820,7 @@ int QUICK_GROUP_MIN_MAX_SELECT::get_next() #else int result; #endif - int is_last_prefix; + int is_last_prefix= 0; DBUG_ENTER("QUICK_GROUP_MIN_MAX_SELECT::get_next"); @@ -8835,13 +8835,18 @@ int QUICK_GROUP_MIN_MAX_SELECT::get_next() Check if this is the last group prefix. Notice that at this point this->record contains the current prefix in record format. */ - is_last_prefix= key_cmp(index_info->key_part, last_prefix, - group_prefix_len); - DBUG_ASSERT(is_last_prefix <= 0); - if (result == HA_ERR_KEY_NOT_FOUND) - continue; - else if (result) + if (!result) + { + is_last_prefix= key_cmp(index_info->key_part, last_prefix, + group_prefix_len); + DBUG_ASSERT(is_last_prefix <= 0); + } + else + { + if (result == HA_ERR_KEY_NOT_FOUND) + continue; break; + } if (have_min) { |