summaryrefslogtreecommitdiff
path: root/include/my_global.h
Commit message (Collapse)AuthorAgeFilesLines
* Revert "MDEV-26713 Windows - improve utf8 support for command line tools"st-10.8-wladVladislav Vaintroub2021-11-191-8/+0
| | | | This reverts commit several commits pushed by mistake.
* MDEV-26713 Windows- UTF8 encoding in the installerVladislav Vaintroub2021-11-181-0/+8
| | | | | | | | | | | | | | | | | | | | Workaround Windows' bug in services "ANSI" when process ANSI codepage is UTF8. They turn out to work unlike any other API . Expected behavior : strings be converted from GetACP() to Unicode, and "wide" function would be then called. Actual current behavior : it seems to handle strings as-if they would be encoded in system-default ACP, rather than process-specific GetACP() Fix: redefine the OpenService,CreateService and ChangeServiceConfig and do ANSI-Wide conversion outselves. Tell compiler to deprecate some ANSI service functions. xxx
* Merge 10.5 into 10.6Marko Mäkelä2021-10-131-1/+1
|\ | | | | | | | | | | | | The changes to galera.galear_var_replicate_myisam_on in commit d9b933bec6061758c5d7b34f55afcae32a85c110 are omitted due to conflicts with commit 27d66d644cf2ebe9201e0362f2050036cce2908a.
| * Merge 10.4 into 10.5Marko Mäkelä2021-10-131-1/+1
| |\
| | * Merge 10.3 into 10.4Marko Mäkelä2021-10-131-1/+1
| | |\
| | | * Merge 10.2 into 10.3Marko Mäkelä2021-10-131-1/+1
| | | |\
| | | | * Apple Silicon is a 64-bit platform (#1922)SergMariaDB2021-10-111-1/+1
| | | | | | | | | | | | | | | Co-authored-by: FX Coudert <fxcoudert@gmail.com>
* | | | | Fix clang-cl warningVladislav Vaintroub2021-08-111-1/+1
| | | | |
* | | | | MDEV-25602 Eliminate the rest of __WIN__ in ConnectVladislav Vaintroub2021-08-051-4/+0
| | | | |
* | | | | MDEV-25602 get rid of __WIN__ in favor of standard _WIN32Vladislav Vaintroub2021-06-061-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixed the MySQL bug# 20338 about misuse of double underscore prefix __WIN__, which was old MySQL's idea of identifying Windows Replace it by _WIN32 standard symbol for targeting Windows OS (both 32 and 64 bit) Not that connect storage engine is not fixed in this patch (must be fixed in "upstream" branch)
* | | | | Remove trailing newline from error message in dlerror() on WindowsSergey Zolotarev2021-03-081-1/+3
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Add FORMAT_MESSAGE_MAX_WIDTH_MASK flag to remove trailing \r\n from the error message returned by FormatMessageA(). 2. Also, add FORMAT_MESSAGE_IGNORE_INSERTS to avoid potential problems with system messages that have argument placeholders. Quote from FormatMessage docs on MSDN: If this function is called without FORMAT_MESSAGE_IGNORE_INSERTS, the Arguments parameter must contain enough parameters to satisfy all insertion sequences in the message string, and they must be of the correct type. Therefore, do not use untrusted or unknown message strings with inserts enabled because they can contain more insertion sequences than Arguments provides, or those that may be of the wrong type. In particular, it is unsafe to take an arbitrary system error code returned from an API and use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS.
* | | | Mac M1 build support proposal (minus rocksdb option) (#1743)David CARLIER2021-01-301-1/+1
| | | |
* | | | Apple Silicon is a 64-bit platformFX Coudert2021-01-301-1/+1
| | | |
* | | | Add build on AIXEtienne Guesnet2020-12-161-46/+0
| | | |
* | | | Clean up Item_uint() & Item_int()Monty2020-07-231-0/+2
| | | | | | | | | | | | | | | | | | | | - Removed val_str() and print() as these are handled by Item_int() - Use local StringBuffer for Item_int::print() to avoid mallocs
* | | | Merge 10.4 into 10.5Marko Mäkelä2020-05-051-7/+0
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2020-05-051-7/+0
| |\ \ \ | | |/ /
| | * | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-05-041-7/+0
| | |\ \ | | | |/
| | | * MDEV-20685: compile fixes for Solaris/OSX/AIXDaniel Black2020-04-291-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sig_return: Solaris/OSX returns different function ptr Move defination to my_alarm.h as its the only use. prevents compile warnings (copied from 10.3 branch) mysys/my_sync.c:136:19: error: 'cur_dir_name' defined but not used [-Werror=unused-const-variable=] 136 | static const char cur_dir_name[]= {FN_CURLIB, 0}; | ^~~~~~~~~~~~ fix compile error (DEPRECATED) leaked from ssl headers. In file included from /export/home/dan/mariadb-server-10.4/sql/sys_vars.cc:37: /export/home/dan/mariadb-server-10.4/sql/sys_vars.ic:69: error: "DEPRECATED" redefined [-Werror] 69 | #define DEPRECATED(X) X | In file included from /export/home/dan/mariadb-server-10.4/include/violite.h:150, from /export/home/dan/mariadb-server-10.4/sql/sql_class.h:38, from /export/home/dan/mariadb-server-10.4/sql/sys_vars.cc:36: /usr/include/openssl/ssl.h:2356: note: this is the location of the previous definition 2356 | # define DEPRECATED __attribute__((deprecated)) | Avoid Werror condition on non-Linux: plugin/server_audit/server_audit.c:2267:7: error: variable 'db_len_off' set but not used [-Werror=unused-but-set-variable] 2267 | int db_len_off; | ^~~~~~~~~~ plugin/server_audit/server_audit.c:2266:7: error: variable 'db_off' set but not used [-Werror=unused-but-set-variable] 2266 | int db_off; | ^~~~~~ auth_gssapi fix include path for Solaris Consistent with the upstream packaged patch: https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/components/database/mariadb-103/patches/06-gssapi.h.patch compile warnings on Solaris [ 91%] Building C object plugin/server_audit/CMakeFiles/server_audit.dir/server_audit.c.o /plugin/server_audit/server_audit.c: In function 'auditing_v8': /plugin/server_audit/server_audit.c:2194:20: error: unused variable 'db_len_off' [-Werror=unused-variable] 2194 | static const int db_len_off= 128; | ^~~~~~~~~~ /plugin/server_audit/server_audit.c:2193:20: error: unused variable 'db_off' [-Werror=unused-variable] 2193 | static const int db_off= 120; | ^~~~~~ /plugin/server_audit/server_audit.c:2192:20: error: unused variable 'cmd_off' [-Werror=unused-variable] 2192 | static const int cmd_off= 4432; | ^~~~~~~ At top level: /plugin/server_audit/server_audit.c:2192:20: error: 'cmd_off' defined but not used [-Werror=unused-const-variable=] /plugin/server_audit/server_audit.c:2193:20: error: 'db_off' defined but not used [-Werror=unused-const-variable=] 2193 | static const int db_off= 120; | ^~~~~~ /plugin/server_audit/server_audit.c:2194:20: error: 'db_len_off' defined but not used [-Werror=unused-const-variable=] 2194 | static const int db_len_off= 128; | ^~~~~~~~~~ cc1: all warnings being treated as errors tested on: $ uname -a SunOS openindiana 5.11 illumos-b97b1727bc i86pc i386 i86pc
| | | * MDEV-21082: isnan/isinf compilation errors, isfinite warnings on MacOSVlad Lesin2019-11-191-19/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix consists of three commits backported from 10.3: 1) Cleanup isnan() portability checks (cherry picked from commit 7ffd7fe9627d1f750a3712aebb4503e5ae8aea8e) 2) Cleanup isinf() portability checks Original problem reported by Wlad: re-compilation of 10.3 on top of 10.2 build would cache undefined HAVE_ISINF from 10.2, whereas it is expected to be 1 in 10.3. std::isinf() seem to be available on all supported platforms. (cherry picked from commit bc469a0bdf85400f7a63834f5b7af1a513dcdec9) 3) Use std::isfinite in C++ code This is addition to parent revision fixing build failures. (cherry picked from commit 54999f4e75f42baca484ae436b382ca8817df1dd)
* | | | Merge 10.4 into 10.5Marko Mäkelä2019-10-111-0/+14
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2019-10-101-0/+14
| |\ \ \ | | |/ /
| | * | MDEV-20684: innodb/query cache use madvise CORE/NOCORE on FreeBSDDaniel Black2019-10-021-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This applies to large allocations. This maps to the way Linux does it in MDEV-10814 except FreeBSD uses different constants. Adjust error string to match to implementation. Tested on FreeBSD-12.0
* | | | Merge 10.4 into 10.5Marko Mäkelä2019-09-061-14/+14
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2019-08-311-14/+14
| |\ \ \ | | |/ /
| | * | MDEV-20425 Implement Boolean debug build option debug_assertbb-10.3-MDEV-20425Marko Mäkelä2019-08-291-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 536215e32fc43aa423684e9807640dcf3453924b in MariaDB Server 10.3.1 introduced the compiler flag (not cmake option) DBUG_ASSERT_AS_PRINTF that converts DBUG_ASSERT in non-debug builds into printouts. For debug builds, it could be useful to be able to convert DBUG_ASSERT into a warning or error printout, to allow execution to continue. This would allow debug builds to be used for reproducing hard failures that occur with release builds. my_assert: A Boolean flag (set by default), tied to the new option debug_assert that is available on debug builds only. When set, DBUG_ASSERT() will invoke assert(), like it did until now. When unset, DBUG_ASSERT() will invoke fprintf(stderr, ...) with the file name, line number and assertion expression.
* | | | MDEV-19897 Rename source code variable names from utf8 to utf8mb3Alexander Barkov2019-06-281-2/+2
|/ / /
* | | MDEV-18531 : Use WolfSSL instead of YaSSL as "bundled" SSL/encryption libraryVladislav Vaintroub2019-05-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | - Add new submodule for WolfSSL - Build and use wolfssl and wolfcrypt instead of yassl/taocrypt - Use HAVE_WOLFSSL instead of HAVE_YASSL - Increase MY_AES_CTX_SIZE, to avoid compile time asserts in my_crypt.cc (sizeof(EVP_CIPHER_CTX) is larger on WolfSSL)
* | | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-05-191-1/+1
|\ \ \ | |/ /
| * | Merge 10.2 into 10.3Marko Mäkelä2019-05-141-1/+1
| |\ \ | | |/
| | * Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
| | |\
| | | * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| | | |\
| | | | * Update FSF AddressVicențiu Ciorbaru2019-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | * Update wrong zip-code
| * | | | Merge 10.2 into 10.3Marko Mäkelä2018-12-131-1/+1
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.1 into 10.2Marko Mäkelä2018-12-131-1/+1
| | |\ \ \ | | | |/ /
| | | * | Merge 10.0 into 10.1Marko Mäkelä2018-12-131-1/+1
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, apply the MDEV-17957 changes to encrypted page checksums, and remove error message output from the checksum function, because these messages would be useless noise when mariabackup is retrying reads of corrupted-looking pages, and not that useful during normal server operation either. The error messages in fil_space_verify_crypt_checksum() should be refactored separately.
| | | | * | Fix UNICODE issue of dlerrorJiaye Wu2018-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation is conflicting. If UNICODE is defined, FormatMessage() will be FormatMessageW(), and variable win_errormsg with type char can not be passed to it, which should be changed to TCHAR instead. Since we don't use UNICODE here, we can use FormatMessageA() directly to avoid conversion error. ``` my_global.h(1092): error C2664: 'DWORD FormatMessageW(D WORD,LPCVOID,DWORD,DWORD,LPWSTR,DWORD,va_list *)' : cannot convert argument 5 from 'char [2048]' to 'LPWSTR' ```
* | | | | | Fix UNICODE issue of dlerror()Jiaye Wu2018-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation is conflicting. If `UNICODE` is defined, `FormatMessage()` will be `FormatMessageW()`, and variable `win_errormsg` with type `char` can not be passed to it, which should be changed to `TCHAR` instead. Since we don't use UNICODE here, we can use `FormatMessageA()` directly to avoid conversion error. ``` my_global.h(1092): error C2664: 'DWORD FormatMessageW(D WORD,LPCVOID,DWORD,DWORD,LPWSTR,DWORD,va_list *)' : cannot convert argument 5 from 'char [2048]' to 'LPWSTR' ```
* | | | | | Merge 10.3 into 10.4mariadb-10.4.0Marko Mäkelä2018-11-081-1/+0
|\ \ \ \ \ \ | |/ / / / /
| * | | | | MDEV-16697: Fix difference between 32bit/windows and 64bit systems in ↵Oleksandr Byelkin2018-11-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | allowed select nest level
* | | | | | Merge 10.3 into 10.4Marko Mäkelä2018-10-171-1/+3
|\ \ \ \ \ \ | |/ / / / /
| * | | | | MDEV-8765: mysqldump -use utf8mb4 by defaultDaniel Black2018-10-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Bump mysqldump to a version greater than that on the 10.3 branch.
* | | | | | Merge 10.3 into 10.4Marko Mäkelä2018-10-051-1/+3
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge branch '10.2' into 10.3Sergei Golubchik2018-09-281-1/+3
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge branch '10.1' into 10.2Oleksandr Byelkin2018-09-141-1/+3
| | |\ \ \ \ | | | |/ / /
* | | | | | MDEV-16536 Remove shared memory transportVladislav Vaintroub2018-08-201-7/+0
|/ / / / /
* | | | | Merge branch '10.2' into 10.3Sergei Golubchik2018-06-301-0/+2
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.1' into 10.2Sergei Golubchik2018-06-211-0/+2
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.0-galera' into 10.1Vicențiu Ciorbaru2018-06-121-0/+2
| | |\ \ \
| | | * | | MDEV-8743: mysqld port/socket - FD_CLOEXEC if no SOCK_CLOEXECDaniel Black2018-04-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In MDEV-8743, the port/socket of mysqld was changed to set FD_CLOEXEC. The existing mysql_socket_socket function already set that with SOCK_CLOEXEC when the socket was created. So here we move the fcntl functionality to the mysql_socket_socket as port/socket are the only callers. Preprocessor checks of SOCK_CLOEXEC cannot be done as its a 0 if not there and SOCK_CLOEXEC (being the value of the enum in bits/socket_type.h) Preprocesssor logic for arithmetic and non-arithmetic defines are hard/nonportable/ugly to read. As such we just check in my_global.h and define HAVE_SOCK_CLOEXEC if we have it. There was a disparity in behaviour between defined(WITH_WSREP) and not depending on the OS, so the WITH_WSREP condition was removed from setting calling fcntl. All sockets are now maked SOCK_CLOEXEC/FD_CLOEXEC. strace of mysqld with SOCK_CLOEXEC: socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_TCP) = 10 write(2, "180419 14:52:40 [Note] Server socket created on IP: '127.0.0.1'.\n", 65180419 14:52:40 [Note] Server socket created on IP: '127.0.0.1'. ) = 65 setsockopt(10, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 bind(10, {sa_family=AF_INET, sin_port=htons(16020), sin_addr=inet_addr("127.0.0.1")}, 16) = 0 listen(10, 150) = 0 socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_TCP) = 11 write(2, "180419 14:52:40 [Note] Server socket created on IP: '127.0.0.1'.\n", 65180419 14:52:40 [Note] Server socket created on IP: '127.0.0.1'. ) = 65 setsockopt(11, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 bind(11, {sa_family=AF_INET, sin_port=htons(16021), sin_addr=inet_addr("127.0.0.1")}, 16) = 0 listen(11, 150) = 0 socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 12 unlink("/home/dan/repos/build-mariadb-server-10.0/mysql-test/var/tmp/mysqld.1.sock") = -1 ENOENT (No such file or directory) setsockopt(12, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 umask(000) = 006 bind(12, {sa_family=AF_UNIX, sun_path="/home/dan/repos/build-mariadb-server-10.0/mysql-test/var/tmp/mysqld.1.sock"}, 110) = 0 umask(006) = 000 listen(12, 150) = 0