From 12ae840375fe30da1c23647facaa0678858d6d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= Date: Thu, 16 Jun 2016 22:04:24 +0300 Subject: [PATCH] Fix typo bug that cause myisam repair to fail We need to return TRUE if got_error == 1, not error, which is initialized to FALSE. --- storage/maria/ma_sort.c | 2 +- storage/myisam/sort.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/storage/maria/ma_sort.c b/storage/maria/ma_sort.c index a95f9bb7ddb..a49ce8fba1f 100644 --- a/storage/maria/ma_sort.c +++ b/storage/maria/ma_sort.c @@ -335,7 +335,7 @@ err: static my_bool _ma_thr_find_all_keys_exec(MARIA_SORT_PARAM* sort_param) { - my_bool error= FALSE; + int error= 0; ulonglong memavl, old_memavl; uint UNINIT_VAR(keys), idx; uint sort_length; diff --git a/storage/myisam/sort.c b/storage/myisam/sort.c index b1cdbf450c8..ed9267a6f1f 100644 --- a/storage/myisam/sort.c +++ b/storage/myisam/sort.c @@ -326,12 +326,12 @@ static my_bool thr_find_all_keys_exec(MI_SORT_PARAM *sort_param) uint sort_length; uint maxbuffer; uchar **sort_keys= NULL; - my_bool error= FALSE; + int error= 0; DBUG_ENTER("thr_find_all_keys"); DBUG_PRINT("enter", ("master: %d", sort_param->master)); if (sort_param->sort_info->got_error) - DBUG_RETURN(error); + DBUG_RETURN(TRUE); set_sort_param_read_write(sort_param);