summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMikael Ronstrom <mikael@dator8>2011-03-04 12:35:24 +0100
committerMikael Ronstrom <mikael@dator8>2011-03-04 12:35:24 +0100
commit9718c52b47bec388ab916afe462faaeaa1eb342d (patch)
treebccbd7ab21bb499f9f924e6f90e9303f3018d1ae /include
parent9674845b7bf243bbeb640f674d53e68c5a459de5 (diff)
parente13c75a6d7998150cb211bafd54b0cda7eea27b4 (diff)
downloadmariadb-git-9718c52b47bec388ab916afe462faaeaa1eb342d.tar.gz
merge
Diffstat (limited to 'include')
-rw-r--r--include/my_bit.h22
-rw-r--r--include/my_bitmap.h9
-rw-r--r--include/my_global.h1
-rw-r--r--include/my_pthread.h3
-rw-r--r--include/my_sys.h1
-rw-r--r--include/mysql_embed.h1
6 files changed, 26 insertions, 11 deletions
diff --git a/include/my_bit.h b/include/my_bit.h
index b396b84b0d8..cdb0680b652 100644
--- a/include/my_bit.h
+++ b/include/my_bit.h
@@ -1,3 +1,18 @@
+/* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ 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
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#ifndef MY_BIT_INCLUDED
#define MY_BIT_INCLUDED
@@ -44,9 +59,12 @@ static inline uint my_count_bits(ulonglong v)
#endif
}
-static inline uint my_count_bits_ushort(ushort v)
+static inline uint my_count_bits_uint32(uint32 v)
{
- return _my_bits_nbits[v];
+ return (uint) (uchar) (_my_bits_nbits[(uchar) v] +
+ _my_bits_nbits[(uchar) (v >> 8)] +
+ _my_bits_nbits[(uchar) (v >> 16)] +
+ _my_bits_nbits[(uchar) (v >> 24)]);
}
diff --git a/include/my_bitmap.h b/include/my_bitmap.h
index 78b33b09a51..80a7fce1155 100644
--- a/include/my_bitmap.h
+++ b/include/my_bitmap.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB, 2009 Sun Microsystems, Inc
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
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
@@ -125,9 +125,10 @@ bitmap_is_set(const MY_BITMAP *map,uint bit)
static inline my_bool bitmap_cmp(const MY_BITMAP *map1, const MY_BITMAP *map2)
{
- *(map1)->last_word_ptr|= (map1)->last_word_mask;
- *(map2)->last_word_ptr|= (map2)->last_word_mask;
- return memcmp((map1)->bitmap, (map2)->bitmap, 4*no_words_in_map((map1)))==0;
+ if (memcmp(map1->bitmap, map2->bitmap, 4*(no_words_in_map(map1)-1)) != 0)
+ return FALSE;
+ return ((*map1->last_word_ptr | map1->last_word_mask) ==
+ (*map2->last_word_ptr | map2->last_word_mask));
}
#define bitmap_clear_all(MAP) \
diff --git a/include/my_global.h b/include/my_global.h
index c1ae8a6d6bc..02f4eb596d0 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -1476,7 +1476,6 @@ static inline double rint(double x)
#undef HAVE_OPENSSL
#undef HAVE_SMEM /* No shared memory */
-#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */
#endif /* EMBEDDED_LIBRARY */
diff --git a/include/my_pthread.h b/include/my_pthread.h
index b8608a97849..e5215648791 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -806,8 +806,7 @@ extern pthread_mutexattr_t my_errorcheck_mutexattr;
typedef ulong my_thread_id;
extern my_bool my_thread_global_init(void);
-extern my_bool my_thread_basic_global_init(void);
-extern void my_thread_basic_global_reinit(void);
+extern void my_thread_global_reinit(void);
extern void my_thread_global_end(void);
extern my_bool my_thread_init(void);
extern void my_thread_end(void);
diff --git a/include/my_sys.h b/include/my_sys.h
index 5cef60799b8..ed96abc7711 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -643,7 +643,6 @@ extern int my_error_register(const char** (*get_errmsgs) (),
extern const char **my_error_unregister(int first, int last);
extern void my_message(uint my_err, const char *str,myf MyFlags);
extern void my_message_stderr(uint my_err, const char *str, myf MyFlags);
-extern my_bool my_basic_init(void);
extern my_bool my_init(void);
extern void my_end(int infoflag);
extern int my_redel(const char *from, const char *to, int MyFlags);
diff --git a/include/mysql_embed.h b/include/mysql_embed.h
index e860a4486eb..3b6f851bd6f 100644
--- a/include/mysql_embed.h
+++ b/include/mysql_embed.h
@@ -25,7 +25,6 @@
#undef HAVE_DLOPEN /* No udf functions */
#undef HAVE_SMEM /* No shared memory */
-#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */
#endif /* EMBEDDED_LIBRARY */
#endif /* MYSQL_EMBED_INCLUDED */