diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-07-16 14:33:35 -0300 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-07-16 14:33:35 -0300 |
commit | 92f3fc92f3310cb19d48f69ab6f5d23789a90570 (patch) | |
tree | c44f8dcecfdbd0e6d71ca8c64fb8cbd2114f3970 /storage | |
parent | dcaef2424e56f714068411baa52f3b488210b5b0 (diff) | |
download | mariadb-git-92f3fc92f3310cb19d48f69ab6f5d23789a90570.tar.gz |
Bug#48327: Some crashes specific to FreeBSD ("embedded")
Bug#47139: Test "merge" crashes in "embedded" run
Backport patch for Bug#47139
Diffstat (limited to 'storage')
-rw-r--r-- | storage/myisam/mi_dynrec.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/storage/myisam/mi_dynrec.c b/storage/myisam/mi_dynrec.c index 09152f8d013..4153f55aa3c 100644 --- a/storage/myisam/mi_dynrec.c +++ b/storage/myisam/mi_dynrec.c @@ -66,9 +66,12 @@ static int _mi_cmp_buffer(File file, const uchar *buff, my_off_t filepos, my_bool mi_dynmap_file(MI_INFO *info, my_off_t size) { DBUG_ENTER("mi_dynmap_file"); - if (size > (my_off_t) (~((size_t) 0))) + if (size == 0 || size > (my_off_t) (~((size_t) 0))) { - DBUG_PRINT("warning", ("File is too large for mmap")); + if (size) + DBUG_PRINT("warning", ("File is too large for mmap")); + else + DBUG_PRINT("warning", ("Do not mmap zero-length")); DBUG_RETURN(1); } /* |