Bug #27812 an ampersand is missed in sql/sql_bitmap.h, line 68
Submitted: 13 Apr 2007 15:45 Modified: 29 Jan 2008 11:14
Reporter: Pavel Plesov Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.1.17-beta OS:Linux
Assigned to: Konstantin Osipov CPU Architecture:Any
Tags: Contribution

[13 Apr 2007 15:45] Pavel Plesov
sql_bitmap.h: In member function 'my_bool Bitmap<default_width>::is_overlapping(const Bitmap<default_width>&) const [with unsigned int default_width = 128u]':
table.cc:4025:   instantiated from here
sql_bitmap.h:68: error: cannot convert 'const MY_BITMAP' to 'const MY_BITMAP*' for argument '2' to 'my_bool bitmap_is_overlapping(const MY_BITMAP*, const MY_BITMAP*)'

After applying the fix, mysql is compiled successfully.

P.S. 5.1.17-beta, community edition. Downloaded a few hours ago from the http://dev.mysql.com/downloads/mysql/5.1.html

gcc (GCC) 4.1.1 (Gentoo 4.1.1-r3)

How to repeat:
1. Download "Compressed GNU TAR archive (tar.gz) 5.1.17-beta" from
2. Configure and run make

Suggested fix:
--- mysql-5.1.17-beta-orig/sql/sql_bitmap.h     2007-04-13 18:21:02.000000000 +0400
+++ mysql-5.1.17-beta/sql/sql_bitmap.h  2007-04-13 18:23:53.000000000 +0400
@@ -65,7 +65,7 @@
   my_bool is_clear_all() const { return bitmap_is_clear_all(&map); }
   my_bool is_set_all() const { return bitmap_is_set_all(&map); }
   my_bool is_subset(const Bitmap& map2) const { return bitmap_is_subset(&map, &map2.map); }
-  my_bool is_overlapping(const Bitmap& map2) const { return bitmap_is_overlapping(&map, map2.map); }
+  my_bool is_overlapping(const Bitmap& map2) const { return bitmap_is_overlapping(&map, &map2.map); }
   my_bool operator==(const Bitmap& map2) const { return bitmap_cmp(&map, &map2.map); }
   char *print(char *buf) const
[16 Apr 2007 16:40] Pavel Plesov
configure script to get error

Attachment: configure-failed.sh (application/x-shellscript, text), 1.03 KiB.

[16 Apr 2007 17:01] Pavel Plesov
I have just tested different build configurations and the error occurs only when running configure with additional parameters:

Without them, mysql compiles OK.

Configuration file attached was tested against mysql-5.1.17-beta without any patches applied.

Command line used in the file is taken from custom gentoo ebuild, based on 5.1.15-beta.
[29 Jan 2008 11:12] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:


ChangeSet@1.2660, 2008-01-29 14:12:42+03:00, kostja@dipika.(none) +1 -0
  Fix Bug#27812 "an ampersand is missed in sql/sql_bitmap.h, line 68"
[29 Jan 2008 11:14] Konstantin Osipov
Pushed into 5.1-runtime. No changelog entry is needed.
Will be queued into the main with the next merge.
[11 Feb 2008 16:24] Bugs System
Pushed into 5.1.24-rc
[11 Feb 2008 16:26] Bugs System
Pushed into 6.0.5-alpha