summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
Diffstat (limited to 'mysys')
-rw-r--r--mysys/errors.c5
-rw-r--r--mysys/mf_iocache.c4
-rw-r--r--mysys/my_write.c3
-rw-r--r--mysys/testhash.c4
-rw-r--r--mysys/tree.c3
5 files changed, 13 insertions, 6 deletions
diff --git a/mysys/errors.c b/mysys/errors.c
index 11e7d04e79e..2d29740a689 100644
--- a/mysys/errors.c
+++ b/mysys/errors.c
@@ -1,6 +1,5 @@
-/*
- Copyright (c) 2000, 2013, Oracle and/or its affiliates
- Copyright (c) 1995, 2013, Monty Program Ab
+/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
+ Copyright (c) 2009, 2016, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
index db8d0b51ada..daf99065eb0 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -614,6 +614,7 @@ int _my_b_cache_read(IO_CACHE *info, uchar *Buffer, size_t Count)
{
/* End of file. Return, what we did copy from the buffer. */
info->error= (int) left_length;
+ info->seek_not_done=1;
DBUG_RETURN(1);
}
/*
@@ -631,6 +632,7 @@ int _my_b_cache_read(IO_CACHE *info, uchar *Buffer, size_t Count)
*/
info->error= (read_length == (size_t) -1 ? -1 :
(int) (read_length+left_length));
+ info->seek_not_done=1;
DBUG_RETURN(1);
}
Count-=length;
@@ -683,6 +685,7 @@ int _my_b_cache_read(IO_CACHE *info, uchar *Buffer, size_t Count)
/* For a read error, return -1, otherwise, what we got in total. */
info->error= length == (size_t) -1 ? -1 : (int) (length+left_length);
info->read_pos=info->read_end=info->buffer;
+ info->seek_not_done=1;
DBUG_RETURN(1);
}
/*
@@ -1925,6 +1928,7 @@ void die(const char* fmt, ...)
fprintf(stderr,"Error:");
vfprintf(stderr, fmt,va_args);
fprintf(stderr,", errno=%d\n", errno);
+ va_end(va_args);
exit(1);
}
diff --git a/mysys/my_write.c b/mysys/my_write.c
index a7985997036..43735c18f0a 100644
--- a/mysys/my_write.c
+++ b/mysys/my_write.c
@@ -1,4 +1,5 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
+ Copyright (c) 2011, 2016, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/mysys/testhash.c b/mysys/testhash.c
index 3359b5dce29..96b106bec14 100644
--- a/mysys/testhash.c
+++ b/mysys/testhash.c
@@ -169,7 +169,9 @@ static int do_test()
for (j=0 ; j < 1000 ; j++)
if (key1[j] > 1)
break;
- if (key1[j] > 1)
+ // j will be 1000 only if we have no keys in the hash. This only happens
+ // when the parameter recant is set to 0 via command line argument.
+ if (j < 1000 && key1[j] > 1)
{
HASH_SEARCH_STATE state;
printf("- Testing identical read\n");
diff --git a/mysys/tree.c b/mysys/tree.c
index a9fc542faf6..ab810c64c67 100644
--- a/mysys/tree.c
+++ b/mysys/tree.c
@@ -1,4 +1,5 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
+ Copyright (c) 2010, 2016, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by