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 <gtest/gtest.h>
#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 <gtest/gtest.h>
#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 <string>
#include <iostream>
#include <stdio.h>
=== 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 <gtest/gtest.h>
#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 <gtest/gtest.h>
#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 <gtest/gtest.h>
+
#include <stdarg.h>
#include <string>
#include <sstream>
=== 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 <gtest/gtest.h>
#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 <gtest/gtest.h>
+
#include "thread_utils.h"
#include "mysql/psi/mysql_thread.h"
Attachment: [text/bzr-bundle] bzr/tor.didriksen@oracle.com-20100727130203-8wufa1ssxxn1froj.bundle
| Thread |
|---|
| • bzr push into mysql-next-mr-bugfixing branch (tor.didriksen:3318 to 3319)Bug#54805 | Tor Didriksen | 27 Jul |