summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2016-06-24 12:01:22 -0400
committerNirbhay Choubey <nirbhay@mariadb.com>2016-06-24 12:01:22 -0400
commit14d62505d90f01eb6d81466c1d69fa38523c4d3e (patch)
tree98e08ad71dd605fdfbad22080be969ecae6747ce /mysys
parent868c2ceb013e06c29ba37d4634f2d543b96539aa (diff)
parent9fc102b37ec45bf5a1010a9f660137304de482bc (diff)
downloadmariadb-git-14d62505d90f01eb6d81466c1d69fa38523c4d3e.tar.gz
Merge tag 'mariadb-10.0.26' into 10.0-galera
Diffstat (limited to 'mysys')
-rw-r--r--mysys/errors.c5
-rw-r--r--mysys/mf_iocache.c4
-rw-r--r--mysys/my_context.c4
-rw-r--r--mysys/my_write.c3
-rw-r--r--mysys/testhash.c4
-rw-r--r--mysys/tree.c3
6 files changed, 15 insertions, 8 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 a3cbaff68b0..f891a22b17d 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -507,6 +507,7 @@ int _my_b_read(register 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);
}
/*
@@ -524,6 +525,7 @@ int _my_b_read(register 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;
@@ -572,6 +574,7 @@ int _my_b_read(register 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);
}
/*
@@ -1870,6 +1873,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_context.c b/mysys/my_context.c
index 60c0014b3b9..e4ca4143baf 100644
--- a/mysys/my_context.c
+++ b/mysys/my_context.c
@@ -206,7 +206,7 @@ my_context_spawn(struct my_context *c, void (*f)(void *), void *d)
(
"movq %%rsp, (%[save])\n\t"
"movq %[stack], %%rsp\n\t"
-#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 4 && !defined(__INTEL_COMPILER)
+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) && !defined(__INTEL_COMPILER)
/*
This emits a DWARF DW_CFA_undefined directive to make the return address
undefined. This indicates that this is the top of the stack frame, and
@@ -454,7 +454,7 @@ my_context_spawn(struct my_context *c, void (*f)(void *), void *d)
(
"movl %%esp, (%[save])\n\t"
"movl %[stack], %%esp\n\t"
-#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 4 && !defined(__INTEL_COMPILER)
+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) && !defined(__INTEL_COMPILER)
/*
This emits a DWARF DW_CFA_undefined directive to make the return address
undefined. This indicates that this is the top of the stack frame, and
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