diff options
author | unknown <ramil@mysql.com> | 2005-03-15 15:32:11 +0400 |
---|---|---|
committer | unknown <ramil@mysql.com> | 2005-03-15 15:32:11 +0400 |
commit | 0ba3164e0e0fa7217059413440f7ab2f844efce7 (patch) | |
tree | 342cc392d8bcccffa56eecd46841f5007b5ccb32 | |
parent | 23d48b7dc3ac15e2de56aeeff9a26c0ce6a79b34 (diff) | |
download | mariadb-git-0ba3164e0e0fa7217059413440f7ab2f844efce7.tar.gz |
A fix (bug #8799: Killed filesorts can fail inited==RND assertion in ha_rnd_end).
sql/filesort.cc:
A fix (bug #8799: Killed filesorts can fail inited==RND assertion in ha_rnd_end).
Should call ha_rnd_end() only if ha_rnd_init() was called.
-rw-r--r-- | sql/filesort.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/filesort.cc b/sql/filesort.cc index c6af8cfc1b7..75b114fc140 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -452,8 +452,11 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select, if (*killed) { DBUG_PRINT("info",("Sort killed by user")); - (void) file->extra(HA_EXTRA_NO_CACHE); - file->ha_rnd_end(); + if (!indexfile && !quick_select) + { + (void) file->extra(HA_EXTRA_NO_CACHE); + file->ha_rnd_end(); + } DBUG_RETURN(HA_POS_ERROR); /* purecov: inspected */ } if (error == 0) |