From: Alexey Kopytov Date: November 7 2007 12:08pm Subject: bk commit into 5.1 tree (kaa:1.2588) BUG#25421 List-Archive: http://lists.mysql.com/commits/37250 X-Bug: 25421 Message-Id: <20071107120858.0EFB05CE7@polly.local> Below is the list of changes that have just been committed into a local 5.1 repository of kaa. When kaa does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-11-07 15:08:50+03:00, kaa@polly.(none) +1 -0 Fix for bug #25421: MySQL threads don't respond to the kill command Calculating the estimated number of records for a range scan may take a significant time, and it was impossible for a user to interrupt that process by killing the connection or the query. Fixed by checking the thread's 'killed' status in check_quick_keys() and interrupting the calculation process if it is set to a non-zero value. sql/opt_range.cc@stripped, 2007-11-07 15:08:44+03:00, kaa@polly.(none) +3 -0 Check the thread's 'killed' status in check_quick_keys() and interrupt the calculation process if it is set to a non-zero value. diff -Nrup a/sql/opt_range.cc b/sql/opt_range.cc --- a/sql/opt_range.cc 2007-09-26 14:43:35 +04:00 +++ b/sql/opt_range.cc 2007-11-07 15:08:44 +03:00 @@ -7352,6 +7352,9 @@ check_quick_keys(PARAM *param, uint idx, tmp_max_flag= max_key_flag | key_tree->max_flag; } + if (unlikely(param->thd->killed != 0)) + return HA_POS_ERROR; + keynr=param->real_keynr[idx]; param->range_count++; if (!tmp_min_flag && ! tmp_max_flag &&