From: Tor Didriksen Date: July 27 2010 1:02pm Subject: bzr commit into mysql-next-mr-bugfixing branch (tor.didriksen:3319) Bug#54805 List-Archive: http://lists.mysql.com/commits/114442 X-Bug: 54805 Message-Id: <20100727130207.793193593@atum07.norway.sun.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6414458055714471255==" --===============6414458055714471255== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline #At file:///export/home/didrik/repo/next-mr-bf-bug54805-pp/ based on revid:epotemkin@stripped 3319 Tor Didriksen 2010-07-27 Bug #54805 definitions in regex/my_regex.h conflict with /usr/include/regex.h Post Push fix: my_regex-t was vulnerable to #include file ordering: the result was that sizeof(off_t) == 4 in the .cc main program but sizeof(off_t) == 8 in the regex .c files fix: always include my_config.h first Added the same #include to all gunit test files. modified: unittest/gunit/gunit_test_main.cc unittest/gunit/mdl-t.cc unittest/gunit/mdl_mytap-t.cc unittest/gunit/my_regex-t.cc unittest/gunit/sql_list-t.cc unittest/gunit/tap_event_listener.cc unittest/gunit/thread_utils-t.cc unittest/gunit/thread_utils.cc === modified file 'unittest/gunit/gunit_test_main.cc' --- a/unittest/gunit/gunit_test_main.cc 2010-07-24 13:47:42 +0000 +++ b/unittest/gunit/gunit_test_main.cc 2010-07-27 13:02:03 +0000 @@ -13,6 +13,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +// First include (the generated) my_config.h, to get correct platform defines, +// then gtest.h (before any other MySQL headers), to avoid min() macros etc ... +#include "my_config.h" #include #include "mdl.h" // SHOULD BE my_sys.h === modified file 'unittest/gunit/mdl-t.cc' --- a/unittest/gunit/mdl-t.cc 2010-06-23 11:01:12 +0000 +++ b/unittest/gunit/mdl-t.cc 2010-07-27 13:02:03 +0000 @@ -22,7 +22,9 @@ The code below should hopefully be (mostly) self-explanatory. */ -// Must include gtest first, since MySQL source has macros for min() etc .... +// First include (the generated) my_config.h, to get correct platform defines, +// then gtest.h (before any other MySQL headers), to avoid min() macros etc ... +#include "my_config.h" #include #include "mdl.h" === modified file 'unittest/gunit/mdl_mytap-t.cc' --- a/unittest/gunit/mdl_mytap-t.cc 2010-06-23 11:01:12 +0000 +++ b/unittest/gunit/mdl_mytap-t.cc 2010-07-27 13:02:03 +0000 @@ -21,6 +21,7 @@ numbers in case of failures. */ +#include "my_config.h" #include #include #include === modified file 'unittest/gunit/my_regex-t.cc' --- a/unittest/gunit/my_regex-t.cc 2010-07-26 10:39:38 +0000 +++ b/unittest/gunit/my_regex-t.cc 2010-07-27 13:02:03 +0000 @@ -13,7 +13,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -// Must include gtest first, since MySQL source has macros for min() etc .... +// First include (the generated) my_config.h, to get correct platform defines, +// then gtest.h (before any other MySQL headers), to avoid min() macros etc ... +#include "my_config.h" #include #include "my_regex.h" === modified file 'unittest/gunit/sql_list-t.cc' --- a/unittest/gunit/sql_list-t.cc 2010-04-21 07:26:14 +0000 +++ b/unittest/gunit/sql_list-t.cc 2010-07-27 13:02:03 +0000 @@ -20,7 +20,9 @@ http://code.google.com/p/googletest/wiki/GoogleTestPrimer */ -// Must include gtest first, since MySQL source has macros for min() etc .... +// First include (the generated) my_config.h, to get correct platform defines, +// then gtest.h (before any other MySQL headers), to avoid min() macros etc ... +#include "my_config.h" #include #include "sql_list.h" === modified file 'unittest/gunit/tap_event_listener.cc' --- a/unittest/gunit/tap_event_listener.cc 2010-03-19 07:48:37 +0000 +++ b/unittest/gunit/tap_event_listener.cc 2010-07-27 13:02:03 +0000 @@ -13,7 +13,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +// First include (the generated) my_config.h, to get correct platform defines, +// then gtest.h (before any other MySQL headers), to avoid min() macros etc ... +#include "my_config.h" #include + #include #include #include === modified file 'unittest/gunit/thread_utils-t.cc' --- a/unittest/gunit/thread_utils-t.cc 2010-03-18 13:39:53 +0000 +++ b/unittest/gunit/thread_utils-t.cc 2010-07-27 13:02:03 +0000 @@ -13,7 +13,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -// Must include gtest first, since MySQL source has macros for min() etc .... +// First include (the generated) my_config.h, to get correct platform defines, +// then gtest.h (before any other MySQL headers), to avoid min() macros etc ... +#include "my_config.h" #include #include "thread_utils.h" === modified file 'unittest/gunit/thread_utils.cc' --- a/unittest/gunit/thread_utils.cc 2010-07-23 12:49:56 +0000 +++ b/unittest/gunit/thread_utils.cc 2010-07-27 13:02:03 +0000 @@ -13,7 +13,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +// First include (the generated) my_config.h, to get correct platform defines, +// then gtest.h (before any other MySQL headers), to avoid min() macros etc ... +#include "my_config.h" #include + #include "thread_utils.h" #include "mysql/psi/mysql_thread.h" --===============6414458055714471255== MIME-Version: 1.0 Content-Type: text/bzr-bundle; charset="us-ascii"; name="bzr/tor.didriksen@stripped" Content-Transfer-Encoding: 7bit Content-Disposition: inline # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: tor.didriksen@stripped\ # 8wufa1ssxxn1froj # target_branch: file:///export/home/didrik/repo/next-mr-bf-bug54805-\ # pp/ # testament_sha1: 84bf057803140eab640eeaafa534902e39edbbeb # timestamp: 2010-07-27 15:02:07 +0200 # base_revision_id: epotemkin@stripped\ # 3y00a5fqjhlilo07 # # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWREJngwABiZfgEAQWGf/93cG bAC////wYAod99rJVIAAA2MUFKCAKoARzAATAAEwAAAAAOYACYAAmAAAAABzAATAAEwAAAAAGIlG Jk0T9TU9EyZBggeoaaNMmhgiigTJomGQmjST08TQIyQYhk0CqQgCNGmjQIBMRNJoZA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