From 60722bca7b2bf6f4d48201824b459d0505e30167 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Mon, 6 Dec 2010 22:34:50 +0100 Subject: [PATCH 1/2] Fix LP Bug#686184 - merge_debug test fails. The reason for failure is that DBUG_EXECUTE_IF in mi_open() only worked for Unix-formatted file names, due to strstr(name, "/crashed") The fix change strstr() above to strstr(name, "crashed"), to it can work with Windows file names as well. --- storage/myisam/mi_open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/myisam/mi_open.c b/storage/myisam/mi_open.c index 9fc82846e91..9d69f8622e8 100644 --- a/storage/myisam/mi_open.c +++ b/storage/myisam/mi_open.c @@ -119,7 +119,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) dflt_key_cache); DBUG_EXECUTE_IF("myisam_pretend_crashed_table_on_open", - if (strstr(name, "/crashed")) + if (strstr(name, "crashed")) { my_errno= HA_ERR_CRASHED; goto err; From 3fb8bc165e6e4ed4f2101a52d8e641655361cbf4 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Tue, 7 Dec 2010 00:10:09 +0100 Subject: [PATCH 2/2] Fix myisam_crash_before_flush_keys on Windows Problem : mtr reports test failure because it sees [ERROR] mysqld got exception 0x80000003 ; in the .err file The exception comes from DBUG_EXECUTE_IF (.. abort()) Fix: use DBUG_ABORT instead of abort() - it does not throw any exceptions. --- storage/myisam/mi_close.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/myisam/mi_close.c b/storage/myisam/mi_close.c index fbd24237286..1b78217a4da 100644 --- a/storage/myisam/mi_close.c +++ b/storage/myisam/mi_close.c @@ -61,7 +61,7 @@ int mi_close(register MI_INFO *info) if (flag) { DBUG_EXECUTE_IF("crash_before_flush_keys", - if (share->kfile >= 0) abort();); + if (share->kfile >= 0) DBUG_ABORT();); if (share->kfile >= 0 && flush_key_blocks(share->key_cache, share->kfile, ((share->temporary || share->deleting) ?