summaryrefslogtreecommitdiff
path: root/cmake/os
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup log2() portability checksSergey Vojtovich2018-05-261-1/+0
|
* Cleanup rint() portability checksSergey Vojtovich2018-05-261-1/+0
|
* Cleanup isnan() portability checksSergey Vojtovich2018-05-261-1/+0
|
* remove check for finite/isfiniteHoward Su2018-05-242-3/+0
| | | | | finite is not used anymore in code base. isfinite is part of C99 and we assume we only support compilers that support C99.
* MDEV-8743: use mkostemp when available with O_CLOEXECDaniel Black2018-05-211-0/+1
| | | | Closes #639
* MDEV-15583 create_temp_file: remove tempnam implementationDaniel Black2018-05-211-1/+0
| | | | | | | | In the spirit of the man page "Never use this function." lets purge off this implementation. mkstemp is a widely available alternative. Closes #661.
* Merge 10.2 into 10.3Marko Mäkelä2018-03-301-1/+1
|\
| * MDEV-13785: move defination HAVE_LARGE_PAGES -> HAVE_LINUX_LARGE_PAGESDaniel Black2018-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HAVE_LARGE_PAGES was always Linux but now there is HAVE_SOLARIS_LARGE_PAGES in the code base. Innodb was using HAVE_LINUX_LARGE_PAGES so keep this consistent everywhere. Test plan: $ grep Hugepagesize: /proc/meminfo Hugepagesize: 2048 kB $ sudo sysctl vm.nr_hugepages=1024 vm.nr_hugepages = 1024 $ sudo sysctl kernel.shmmax=$(( 2 * 1024 *1024 * 1024 )) kernel.shmmax = 2147483648 No errors in ouput: $ sql/mysqld --skip-networking --datadir=/tmp/datadir --log-bin=/tmp/datadir/mysqlbin --socket /tmp/s.sock --lc-messages-dir=${PWD}/sql/share --verbose --large-pages=1 2018-03-23 12:51:18 139697428129984 [Note] sql/mysqld (mysqld 10.2.14-MariaDB-log) starting as process 25406 ... 2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Uses event mutexes 2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Compressed tables use zlib 1.2.11 2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Using Linux native AIO 2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Number of pools: 1 2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Using SSE2 crc32 instructions 2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Completed initialization of buffer pool 2018-03-23 12:51:18 139696883590912 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). 2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Highest supported file format is Barracuda. 2018-03-23 12:51:18 139697428129984 [Note] InnoDB: 128 out of 128 rollback segments are active. 2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1" 2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Creating shared tablespace for temporary tables 2018-03-23 12:51:18 139697428129984 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2018-03-23 12:51:18 139697428129984 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 2018-03-23 12:51:18 139697428129984 [Note] InnoDB: 5.7.21 started; log sequence number 1620099 2018-03-23 12:51:18 139696713733888 [Note] InnoDB: Loading buffer pool(s) from /tmp/datadir/ib_buffer_pool 2018-03-23 12:51:18 139696713733888 [Note] InnoDB: Buffer pool(s) load completed at 180323 12:51:18 2018-03-23 12:51:18 139697428129984 [Note] Plugin 'FEEDBACK' is disabled. 2018-03-23 12:51:18 139697428129984 [Note] Reading of all Master_info entries succeded 2018-03-23 12:51:18 139697428129984 [Note] Added new Master_info '' to hash table 2018-03-23 12:51:18 139697428129984 [Note] sql/mysqld: ready for connections. Version: '10.2.14-MariaDB-log' socket: '/tmp/s.sock' port: 0 Source distribution $ grep -i huge /proc/25406/smaps | grep -v ' 0 kB' Private_Hugetlb: 8192 kB Private_Hugetlb: 2048 kB $ grep huge /proc/25406/numa_maps 7f0d74400000 default file=/SYSV00000000\040(deleted) huge 7f0dbd200000 default file=/SYSV00000000\040(deleted) huge dirty=4 N0=4 kernelpagesize_kB=2048 7f0dc5600000 default file=/SYSV00000000\040(deleted) huge 7f0dd1200000 default file=/SYSV00000000\040(deleted) huge dirty=1 N0=1 kernelpagesize_kB=2048 $ grep Huge /proc/meminfo AnonHugePages: 0 kB ShmemHugePages: 0 kB HugePages_Total: 940 HugePages_Free: 935 HugePages_Rsvd: 177 HugePages_Surp: 0 Hugepagesize: 2048 kB Ran again with --memlock (note needs ulimit -l > size) $ grep Huge /proc/meminfo AnonHugePages: 0 kB ShmemHugePages: 0 kB HugePages_Total: 940 HugePages_Free: 758 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB $ grep huge /proc/26020/numa_maps 7fe870400000 default file=/SYSV00000000\040(deleted) huge dirty=62 N0=62 kernelpagesize_kB=2048 7fe8b3a00000 default file=/SYSV00000000\040(deleted) huge dirty=66 N0=66 kernelpagesize_kB=2048 7fe8bd600000 default file=/SYSV00000000\040(deleted) huge dirty=53 N0=53 kernelpagesize_kB=2048 7fe8c8400000 default file=/SYSV00000000\040(deleted) huge dirty=1 N0=1 kernelpagesize_kB=2048 $ grep -i huge /proc/26020/smaps | grep -v ' 0 kB' Private_Hugetlb: 126976 kB Private_Hugetlb: 135168 kB Private_Hugetlb: 108544 kB Private_Hugetlb: 2048 kB
* | Make possible to use clang on Windows (clang-cl)Vladislav Vaintroub2018-02-201-4/+46
| | | | | | | | | | | | -DWITH_ASAN can be used as well now, on x64 Fix many clang-cl warnings.
* | Merge bb-10.2-ext into 10.3Marko Mäkelä2018-02-191-4/+7
|\ \ | |/
| * Disable noisy warning in old compiler (VS2015)Vladislav Vaintroub2018-02-141-1/+5
| |
| * Windows, compiling - disable pkg_configVladislav Vaintroub2018-02-141-3/+2
| | | | | | | | | | | | | | | | | | pkg_config usually comes with Strawberry perl, and tends to find packages that might work in mingw compilation, but not with MSVC. Thus disable PKG_CONFIG, otherwise any FIND_PACKAGE() that is using PkgConfig can find something (like LibXml2 from connect), can potentially find something that is not going to compile.
* | Windows, compiling : use /permissive- switch to improve conformanceVladislav Vaintroub2018-02-071-0/+3
| | | | | | | | fix a couple "initialization skipped by goto" and other new errors.
* | Windows, compile : reenable previously disabled warning C4291Vladislav Vaintroub2018-02-071-1/+1
| | | | | | | | | | | | no matching operator delete found; memory will not be freed if initialization throws an exception Added a no-op delete() for MEM_ROOT based placement-new()
* | Windows, compiling : reenable warning C4996 (deprecated functions)Vladislav Vaintroub2018-02-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | But set _CRT_NONSTDC_NO_WARNINGS to silence silly warnings about ANSI C function being non-standard Remove now deprecated GetVersion()/GetVersionEx(),except single case where where it is really needed, in feedback plugin. Remove checks for Windows NT. Avoid old IPv4-only inet_aton, which generated the warning.
* | Windows : reenable warning C4805 (unsafe mix of types in bool operations)Vladislav Vaintroub2018-02-071-2/+2
| |
* | MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from ↵Vladislav Vaintroub2018-02-061-4/+0
| | | | | | | | | | | | | | | | | | | | | | 'size_t' to 'type', possible loss of data) Handle string length as size_t, consistently (almost always:)) Change function prototypes to accept size_t, where in the past ulong or uint were used. change local/member variables to size_t when appropriate. This fix excludes rocksdb, spider,spider, sphinx and connect for now.
* | Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3Alexander Barkov2018-01-291-5/+15
|\ \ | |/
| * Fix MinSizeRel build on Windows.Vladislav Vaintroub2018-01-261-2/+9
| | | | | | | | do not include test suite in release zip anymore.
| * Windows : fix compile warnings C4267, on 32bit firstVladislav Vaintroub2018-01-261-2/+5
| |
| * Fix and reenable Windows compiler warning C4800 (size_t conversion).Vladislav Vaintroub2018-01-261-2/+2
| |
* | Merge bb-10.2-ext into 10.3Marko Mäkelä2018-01-111-0/+5
|\ \ | |/
| * Windows, compilation : Treat warning as error, if MYSQL_MAINTAINER_MODEVladislav Vaintroub2018-01-091-0/+5
| | | | | | | | | | | | is set to ERR This matches gcc/clang handling.
* | fix TSAN build with ClangEugene Kosov2017-10-061-2/+2
| |
* | Merge bb-10.2-ext into 10.3Marko Mäkelä2017-10-042-4/+4
|\ \ | |/
| * MDEV-13384 - misc Windows warnings fixedVladislav Vaintroub2017-09-282-4/+4
| |
| * MDEV-13844 : Fix Windows warnings. Fix DBUG_PRINT.Vladislav Vaintroub2017-09-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | - Fix win64 pointer truncation warnings (usually coming from misusing 0x%lx and long cast in DBUG) - Also fix printf-format warnings Make the above mentioned warnings fatal. - fix pthread_join on Windows to set return value.
* | Fix compile warnings.Vladislav Vaintroub2017-09-011-1/+0
|/
* Merge 10.1 into 10.2Marko Mäkelä2017-08-291-2/+2
|\
| * Merge 10.0 into 10.1Marko Mäkelä2017-08-281-2/+2
| |\
| | * Windows compile : make compilation fail on "uninitialized variable used" ↵Vladislav Vaintroub2017-08-241-2/+2
| | | | | | | | | | | | | | | | | | | | | warning C4700 This is a genuine error, and will crash debug buildd in runtime checks if not fixed. it is better to fail during compile.
| * | MDEV-11520 after-merge fix for 10.1: Use sparse files.Marko Mäkelä2017-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If page_compression (introduced in MariaDB Server 10.1) is enabled, the logical action is to not preallocate space to the data files, but to only logically extend the files with zeroes. fil_create_new_single_table_tablespace(): Create smaller files for ROW_FORMAT=COMPRESSED tables, but adhere to the minimum file size of 4*innodb_page_size. fil_space_extend_must_retry(), os_file_set_size(): On Windows, use SetFileInformationByHandle() and FILE_END_OF_FILE_INFO, which depends on bumping _WIN32_WINNT to 0x0600. FIXME: The files are not yet set up as sparse, so this will currently end up physically extending (preallocating) the files, wasting storage for unused pages. os_file_set_size(): Add the parameter "bool sparse=false" to declare that the file is to be extended logically, instead of being preallocated. The only caller with sparse=true is fil_create_new_single_table_tablespace(). (The system tablespace cannot be created with page_compression.) fil_space_extend_must_retry(), os_file_set_size(): Outside Windows, use ftruncate() to extend files that are supposed to be sparse. On systems where ftruncate() is limited to files less than 4GiB (if there are any), fil_space_extend_must_retry() retains the old logic of physically extending the file.
* | | Windows, compiling : Remove _DEBUG preprocessor constant, to fixVladislav Vaintroub2017-04-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | debug build with older cmake. The constant is implicitely defined by VS when chosen C runtime is Debug (/MTd, MDd). CMake does not define it since https://public.kitware.com/Bug/view.php?id=15777 was fixed. We remove it from compile flags, to be able to build Debug with /MT runtime using older cmakes.
* | | Allow to specify C runtime library used for compilation.Vladislav Vaintroub2017-04-021-8/+21
| | | | | | | | | | | | | | | Default to static release (previously static debug was used in debug builds, but not is appears to be too slow)
* | | Merge branch '10.1' into 10.2Sergei Golubchik2016-12-291-1/+1
|\ \ \ | |/ /
| * | Merge branch '10.0' into 10.1Sergei Golubchik2016-12-111-1/+1
| |\ \ | | |/
| | * Merge branch '5.5' into 10.0Sergei Golubchik2016-12-091-1/+1
| | |\
| | | * VS2015 build fixesVladislav Vaintroub2016-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | - new location of signtool - silence a nonsensical warning from stl header (complain about noexcept() function attribute, if /EHsc is not set)
| | | * MDEV-9024 Build fails with VS2015Sergei Golubchik2016-02-062-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cherry-pick f1daf9ce from 10.0 branch ------------------------------------- Fix build failures caused by new C runtime library - isnan, snprintf, struct timespec are now defined, attempt to redefine them leads - P_tmpdir, tzname are no more defined - lfind() and lsearch() in lf_hash.c had to be renamed, declaration conflicts with some C runtime functions with the same name declared in a header included by stdlib.h Also fix couple of annoying warnings : - remove #define NOMINMAX from config.h to avoid "redefined" compiler warnings(NOMINMAX is already in compile flags) - disable incremental linker in Debug as well (feature not used much and compiler crashes often) Also simplify package building with Wix, require Wix 3.9 or later (VS2015 is not compatible with old Wix 3.5/3.6)
* | | | MDEV-9154 : Remove workarounds (mainly dynamic function loading)Vladislav Vaintroub2016-06-011-1/+1
| | | | | | | | | | | | | | | | for running obsolete versions of Windows
* | | | cmake: remove unused checks, options, and symbolsSergei Golubchik2015-11-231-64/+1
|/ / /
* | | Merge branch '10.0' into 10.1Sergei Golubchik2015-11-192-8/+7
|\ \ \ | |/ /
| * | MDEV-9024 Build fails with VS2015Vladislav Vaintroub2015-11-062-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix build failures caused by new C runtime library - isnan, snprintf, struct timespec are now defined, attempt to redefine them leads - P_tmpdir, tzname are no more defined - lfind() and lsearch() in lf_hash.c had to be renamed, declaration conflicts with some C runtime functions with the same name declared in a header included by stdlib.h Also fix couple of annoying warnings : - remove #define NOMINMAX from config.h to avoid "redefined" compiler warnings(NOMINMAX is already in compile flags) - disable incremental linker in Debug as well (feature not used much and compiler crashes often) Also simplify package building with Wix, require Wix 3.9 or later (VS2015 is not compatible with old Wix 3.5/3.6)
* | | dbug: correct trace for DBUG_RETURN(func()); -- gcc onlySergei Golubchik2015-11-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when func1 calls func2 from DBUG_RETURN, dbug shows the trace as | > func1 | < func1 | > func2 | < func2 because DBUG_LEAVE happens before func2(). Change that to invoke DBUG_LEAVE when the local variable goes out of scope. This uses gcc specific __attribute__((cleanup)).
* | | Merge branch '10.0' into 10.1Sergei Golubchik2015-10-121-4/+6
|\ \ \ | |/ /
| * | Merge branch '5.5' into 10.0Sergei Golubchik2015-10-091-4/+6
| |\ \ | | |/
| | * Merge remote-tracking branch 'mysql/5.5' into 5.5Sergei Golubchik2015-10-081-4/+6
| | |\
| | | * Bug #20168526 YASSL: CORRUPT SSL-KEY CRASHES CLIENTTor Didriksen2015-07-131-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Post-push fix: broken build on windows. The problem is min/max macros from windows.h which interfere with a template function callex max. Solution: ADD_DEFINITIONS(-DNOMINMAX)
| | | * Bug#17633291: SET PROPER COMPILE OPTIONS FOR CLANGJon Olav Hauglid2014-10-131-20/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#17959689: MAKE GCC AND CLANG GIVE CONSISTENT COMPILATION WARNINGS Bug#18313717: ENABLE -WERROR IN MAINTANER MODE WHEN COMPILING WITH CLANG Bug#18510941: REMOVE CMAKE WORKAROUNDS FOR OLDER VERSIONS OF OS X/XCODE Backport from mysql-5.6 to mysql-5.5
| | | * Bug #18808072 MYSQLBINLOG USES LOCALTIME() TO PRINT EVENTS, CAUSES KERNEL ↵Venkatesh Duggirala2014-10-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MUTEX CONTENTION Problem: For every event read, mysqlbinlog calls localtime() which in turn calls stat(/etc/localtime) which is causing kernel mutex contention. Analysis and Fix: localtime() calls stat(/etc/localtime) for every instance of the call where as localtime_r() the reentrant version was optimized to store the read only tz internal structure. Hence it will not call stat(/etc/localtime). It will call only once at the beginning. The mysql server is calling localtime_r() and mysqlbinlog tool is one place where we are still using localtime(). Once the process (mysqlbinlog) is started if timezone is changed it will be not picked up the the process and it will continue with the same values as the beginning of the process. This behavior is in-lined with mysql server. Also adding localtime_r() and gmtime_r() support for windows.