From: Tor Didriksen Date: July 27 2010 1:02pm Subject: bzr push into mysql-next-mr-bugfixing branch (tor.didriksen:3318 to 3319) Bug#54805 List-Archive: http://lists.mysql.com/commits/114443 X-Bug: 54805 Message-Id: <20100727130228.E48103593@atum07.norway.sun.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2953394813534136179==" --===============2953394813534136179== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 3318 Evgeny Potemkin 2010-07-27 [merge] Auto-merge. removed: include/config-win.h include/my_trie.h include/my_vle.h libmysql/dll.c mysql-test/r/raid.result mysys/default_modify.c mysys/make-conf.c mysys/mf_wfile.c mysys/my_append.c mysys/my_clock.c mysys/my_dup.c mysys/my_net.c mysys/my_vle.c mysys/test_fn.c mysys/trie.c sql/sql_map.cc sql/sql_map.h sql/sql_olap.cc strings/bmove512.c strings/bmove_upp-sparc.s strings/r_strinstr.c strings/strappend-sparc.s strings/strend-sparc.s strings/strings-not-used.h strings/strinstr-sparc.s strings/strinstr.c strings/strmake-sparc.s strings/strmov-sparc.s strings/strnmov-sparc.s strings/strstr-sparc.s strings/strxmov-sparc.s added: mysql-test/include/ctype_unicode520.inc mysql-test/suite/innodb/r/innodb_bug54044.result mysql-test/suite/innodb/t/innodb_bug54044.test mysql-test/suite/perfschema/include/upgrade_check.inc mysql-test/suite/perfschema/t/selects-master.opt packaging/Makefile.am packaging/WiX/custom_ui.wxs unittest/gunit/my_regex-t.cc modified: BUILD/SETUP.sh Makefile.am client/mysql.cc client/mysqlbinlog.cc client/mysqldump.c client/mysqltest.cc cmake/cpack_source_ignore_files.cmake cmake/make_dist.cmake.in cmake/os/WindowsCache.cmake config.h.cmake config/ac-macros/character_sets.m4 configure.cmake configure.in extra/replace.c extra/resolve_stack_dump.c extra/yassl/CMakeLists.txt extra/yassl/taocrypt/CMakeLists.txt include/Makefile.am include/atomic/gcc_builtins.h include/atomic/nolock.h include/atomic/x86-gcc.h include/m_ctype.h include/m_string.h include/my_atomic.h include/my_attribute.h include/my_bit.h include/my_bitmap.h include/my_global.h include/my_net.h include/my_nosys.h include/my_sys.h include/myisam.h include/mysql_embed.h libmysql/Makefile.am libmysql/Makefile.shared libmysql/errmsg.c libmysql/libmysql.c libmysql_r/Makefile.am libmysqld/CMakeLists.txt libmysqld/Makefile.am mysql-test/collections/default.experimental mysql-test/r/ctype_ldml.result mysql-test/r/ctype_uca.result mysql-test/r/ctype_ucs.result mysql-test/r/ctype_utf16_uca.result mysql-test/r/ctype_utf32_uca.result mysql-test/r/func_regexp.result mysql-test/r/update.result mysql-test/std_data/Index.xml mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result mysql-test/suite/engines/funcs/t/db_alter_collate_utf8.test mysql-test/suite/innodb/r/innodb_mysql.result mysql-test/suite/innodb/t/innodb_mysql.test mysql-test/suite/perfschema/r/query_cache.result mysql-test/suite/perfschema/r/selects.result mysql-test/suite/perfschema/r/server_init.result mysql-test/suite/perfschema/t/bad_option_1.test mysql-test/suite/perfschema/t/bad_option_2.test mysql-test/suite/perfschema/t/global_read_lock.test mysql-test/suite/perfschema/t/pfs_upgrade.test mysql-test/suite/perfschema/t/privilege.test mysql-test/suite/perfschema/t/query_cache.test mysql-test/suite/perfschema/t/read_only.test mysql-test/suite/perfschema/t/selects.test mysql-test/suite/perfschema/t/server_init.test mysql-test/suite/rpl/r/rpl_do_grant.result mysql-test/suite/rpl/r/rpl_grant.result mysql-test/suite/rpl/t/rpl_grant.test mysql-test/suite/sys_vars/inc/collation_basic.inc mysql-test/suite/sys_vars/r/collation_connection_basic.result mysql-test/suite/sys_vars/r/collation_database_basic.result mysql-test/suite/sys_vars/r/collation_server_basic.result mysql-test/t/ctype_ldml.test mysql-test/t/ctype_uca.test mysql-test/t/ctype_ucs.test mysql-test/t/ctype_utf16_uca.test mysql-test/t/ctype_utf32_uca.test mysql-test/t/func_regexp.test mysql-test/t/show_check.test mysql-test/t/update.test mysys/CMakeLists.txt mysys/Makefile.am mysys/charset-def.c mysys/charset.c mysys/checksum.c mysys/default.c mysys/mf_iocache.c mysys/mf_iocache2.c mysys/mf_keycache.c mysys/my_atomic.c mysys/my_bit.c mysys/my_bitmap.c mysys/my_handler.c mysys/my_init.c mysys/my_pthread.c mysys/my_static.c mysys/my_static.h mysys/rijndael.c mysys/test_charset.c mysys/thr_alarm.c packaging/WiX/CMakeLists.txt packaging/WiX/CPackWixConfig.cmake packaging/WiX/create_msi.cmake.in packaging/WiX/extra.wxs.in packaging/WiX/mysql_server.wxs.in regex/CMakeLists.txt regex/engine.c regex/main.c regex/my_regex.h regex/regcomp.c regex/regcomp.ih regex/regerror.c regex/regex2.h regex/regexec.c regex/tests scripts/make_win_bin_dist sql/CMakeLists.txt sql/Makefile.am sql/binlog.cc sql/field.cc sql/field.h sql/field_conv.cc sql/filesort.cc sql/gen_lex_hash.cc sql/ha_partition.cc sql/ha_partition.h sql/handler.cc sql/handler.h sql/hostname.cc sql/item_cmpfunc.cc sql/item_cmpfunc.h sql/item_geofunc.cc sql/item_subselect.h sql/log.h sql/mysqld.cc sql/mysqld.h sql/nt_servc.cc sql/opt_range.h sql/protocol.cc sql/rpl_record.cc sql/rpl_slave.cc sql/sql_acl.cc sql/sql_binlog.cc sql/sql_class.cc sql/sql_delete.cc sql/sql_error.cc sql/sql_lex.cc sql/sql_lex.h sql/sql_parse.cc sql/sql_plugin.cc sql/sql_priv.h sql/sql_select.cc sql/sql_show.cc sql/sql_table.cc sql/sql_update.cc sql/sys_vars.cc sql/table.cc sql/udf_example.c storage/csv/ha_tina.cc storage/federated/ha_federated.cc storage/heap/ha_heap.cc storage/heap/hp_test2.c storage/innobase/dict/dict0crea.c storage/innobase/handler/ha_innodb.cc storage/innobase/os/os0file.c storage/myisam/ft_boolean_search.c storage/myisam/ft_nlq_search.c storage/myisam/ft_parser.c storage/myisam/ft_update.c storage/myisam/mi_check.c storage/myisam/mi_create.c storage/myisam/mi_delete_table.c storage/myisam/mi_dynrec.c storage/myisam/mi_key.c storage/myisam/mi_log.c storage/myisam/mi_open.c storage/myisam/mi_packrec.c storage/myisam/mi_rename.c storage/myisam/mi_static.c storage/myisam/mi_test1.c storage/myisam/mi_test2.c storage/myisam/mi_test3.c storage/myisam/mi_unique.c storage/myisam/mi_write.c storage/myisam/myisam_ftdump.c storage/myisam/myisamchk.c storage/myisam/myisamdef.h storage/myisam/myisamlog.c storage/myisam/myisampack.c storage/myisam/rt_test.c storage/myisam/sp_key.c storage/myisam/sp_test.c storage/myisammrg/ha_myisammrg.cc storage/ndb/include/kernel/signaldata/FsOpenReq.hpp storage/ndb/include/util/ndb_opts.h storage/ndb/src/cw/cpcd/main.cpp storage/ndb/src/kernel/blocks/dbtux/Dbtux.hpp storage/ndb/src/kernel/vm/Configuration.cpp storage/ndb/src/mgmclient/main.cpp storage/ndb/src/mgmsrv/main.cpp storage/ndb/src/ndbapi/TransporterFacade.hpp storage/ndb/test/ndbapi/testIndexStat.cpp storage/ndb/test/ndbapi/test_event_merge.cpp storage/ndb/test/ndbapi/test_event_multi_table.cpp storage/ndb/test/run-test/main.cpp storage/ndb/test/src/NDBT_Test.cpp storage/ndb/test/tools/connect.cpp storage/ndb/tools/delete_all.cpp storage/ndb/tools/desc.cpp storage/ndb/tools/drop_index.cpp storage/ndb/tools/drop_tab.cpp storage/ndb/tools/listTables.cpp storage/ndb/tools/ndb_config.cpp storage/ndb/tools/restore/restore_main.cpp storage/ndb/tools/select_all.cpp storage/ndb/tools/select_count.cpp storage/ndb/tools/waiter.cpp storage/perfschema/pfs_events_waits.cc strings/CMakeLists.txt strings/Makefile.am strings/bfill.c strings/bmove.c strings/bmove_upp.c strings/conf_to_src.c strings/ctype-big5.c strings/ctype-bin.c strings/ctype-cp932.c strings/ctype-czech.c strings/ctype-euc_kr.c strings/ctype-eucjpms.c strings/ctype-extra.c strings/ctype-gb2312.c strings/ctype-gbk.c strings/ctype-latin1.c strings/ctype-mb.c strings/ctype-simple.c strings/ctype-sjis.c strings/ctype-tis620.c strings/ctype-uca.c strings/ctype-ucs2.c strings/ctype-ujis.c strings/ctype-utf8.c strings/ctype-win1250ch.c strings/ctype.c strings/do_ctype.c strings/str_test.c strings/strcend.c strings/strend.c strings/string.doc strings/strings-x86.s strings/strmov.c strings/uca-dump.c tests/mysql_client_test.c tests/thread_test.c unittest/gunit/CMakeLists.txt unittest/gunit/gunit_test_main.cc unittest/gunit/thread_utils.cc unittest/gunit/thread_utils.h unittest/mysys/my_atomic-t.c unittest/mytap/tap.c === 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" --===============2953394813534136179== 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:28 +0200 # base_revision_id: epotemkin@stripped\ # 3y00a5fqjhlilo07 # # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWREJngwABiZfgEAQWGf/93cG bAC////wYAod99rJVIAAA2MUFKCAKoARzAATAAEwAAAAAOYACYAAmAAAAABzAATAAEwAAAAAGIlG Jk0T9TU9EyZBggeoaaNMmhgiigTJomGQmjST08TQIyQYhk0CqQgCNGmjQIBMRNJoZAeoGlAIsuhj TeXUJiJQj8+4qlkCEqj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