summaryrefslogtreecommitdiff
path: root/mysys
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup - remove HAVE_AIOWAIT and associated code from mysysVladislav Vaintroub2020-06-051-250/+0
| | | | HAVE_AIOWAIT had not been disabled and unused for at least 10 years.
* FreeBSD compilation fixesSergei Golubchik2020-06-041-1/+1
| | | | | | | * FreeBSD calls amd64 what Linux calls x86_64 * signal returns void (*)(int) * struct pam_message has char*, not const char* * krb5_free_unparsed_name exists, but is deprecated
* MDEV-22641: postfix - crc32{,c} fixups for ppc64Daniel Black2020-06-032-2/+2
|
* MDEV-22641: Provide SIMD optimized wrapper for zlib crc32() (#1558)mysqlonarm2020-06-019-19/+4143
| | | | | | | | | | | | | | | | | | | | | | Existing implementation used my_checksum (from mysys) for calculating table checksum and binlog checksum. This implementation was optimized for powerpc only and lacked SIMD implementation for x86 (using clmul) and ARM (using ACLE) instead used zlib-crc32. mariabackup had its own copy of the crc32 implementation using hardware optimized implementation only for x86 and lagged hardware based implementation for powerpc and ARM. Patch helps unifies all such calls and help aggregate all of them using an unified interface my_checksum(). Said unification also enables hardware optimized calls for all architecture viz. x86, ARM, POWERPC. Default always fallback to zlib crc32. Thanks to Daniel Black for reviewing, fixing and testing PowerPC changes. Thanks to Marko and Daniel for early code feedback.
* Merge 10.4 into 10.5Marko Mäkelä2020-05-311-22/+34
|\
| * Merge 10.3 into 10.4Marko Mäkelä2020-05-301-22/+34
| |\
| | * Merge 10.2 into 10.3Marko Mäkelä2020-05-291-22/+34
| | |\
| | | * assert(a && b); -> assert(a); assert(b);Sergei Golubchik2020-05-271-22/+34
| | | |
* | | | Fixed wrong length in my_default.cMonty2020-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | This couldn't cause any bugs as ptr was zero terminated, but still better to have the length correct.
* | | | Fixed bug thr_lock_info_initMonty2020-05-231-1/+1
| | | | | | | | | | | | | | | | This bug didn't cause any issues with current usage
* | | | largepages: osx compile warning fixDaniel Black2020-05-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | my_is_2pow is only used on linux. fixes compile warning: mysys/my_largepage.c:48:23: warning: unused function 'my_is_2pow' [-Wunused-function] static inline my_bool my_is_2pow(size_t n) { return !((n) & ((n) - 1)); } ^ 1 warning generated.
* | | | Merge 10.4 into 10.5Marko Mäkelä2020-05-181-2/+5
|\ \ \ \ | |/ / /
| * | | MDEV-22556: Incorrect result for window function when using encrypt-tmp-files=ONVarun Gupta2020-05-171-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue here is that end_of_file for encrypted temporary IO_CACHE (used by filesort) is updated using lseek. Encryption adds storage overhead and hides it from the caller by recalculating offsets and lengths. Two different IO_CACHE cannot possibly modify the same file because the encryption key is randomly generated and stored in the IO_CACHE. So when the tempfiles are encrypted DO NOT use lseek to change end_of_file. Further observations about updating end_of_file using lseek 1) The end_of_file update is only used for binlog index files 2) The whole point is to update file length when the file was modified via a different file descriptor. 3) The temporary IO_CACHE files can never be modified via a different file descriptor. 4) For encrypted temporary IO_CACHE, end_of_file should not be updated with lseek
* | | | Merge 10.4 into 10.5Marko Mäkelä2020-05-131-2/+2
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2020-05-131-2/+2
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2020-05-131-2/+2
| | |\ \ | | | |/
| | | * Merge 10.1 into 10.2Marko Mäkelä2020-05-131-2/+2
| | | |\
| | | | * MDEV-22344: Fix typos in commentsAnel Husakovic2020-05-061-2/+2
| | | | |
* | | | | Merge 10.4 into 10.5Marko Mäkelä2020-05-051-79/+90
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.3 into 10.4Marko Mäkelä2020-05-051-79/+90
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-05-041-79/+90
| | |\ \ \ | | | |/ /
| | | * | Merge branch '10.1' into 10.2Oleksandr Byelkin2020-05-021-79/+90
| | | |\ \ | | | | |/
| | | | * Merge branch '5.5' into 10.1Oleksandr Byelkin2020-04-301-79/+90
| | | | |\
| | | | | * BUG#30301356 - SOME EVENTS ARE DELAYED AFTER DROPPING EVENTSergei Golubchik2020-04-301-79/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | queues.c cleanup and refactoring. Restore old version of _downhead() (from before cd483c55209) that works well in an average case. Use it for queue_fix(). Move existing specialized version of _downhead() to queue_replace() where it'll be handling the case it was specifically optimized for (moving the element to the end of the queue). And correct it to fix the heap not only down, but also up (this fixes BUG#30301356). Add unit tests. Collateral cosmetic fixes.
| | | * | | MDEV-20685: compile fixes for Solaris/OSX/AIXDaniel Black2020-04-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-22454 Allow -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ONVladislav Vaintroub2020-05-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable IPO (interprocedural optimization, aka /GL) on Windows on libraries, from which server.dll exports symbols - exporting symbols does not work for objects compiled with /GL.
* | | | | | Merge 10.4 into 10.5Marko Mäkelä2020-04-291-7/+7
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge 10.3 into 10.4Marko Mäkelä2020-04-271-7/+7
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge 10.2 into 10.3Marko Mäkelä2020-04-271-7/+7
| | |\ \ \ \ | | | |/ / /
| | | * | | cleanup THR_KEY_mysysEugene Kosov2020-04-251-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | read TLS with my_thread_var write TLS with set_mysys_var() my_thread_var is no longer __attribute__ ((const)): this attribute is simply incorrect here. Read gcc manual for more information. sql/threadpool_generic.cc fails with that attribute.
* | | | | | Merge 10.4 into 10.5Marko Mäkelä2020-04-258-11/+31
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | The functional changes of commit 5836191c8f0658d5d75484766fdcc3d838b0a5c1 (MDEV-21168) are omitted due to MDEV-742 having addressed the issue.
| * | | | | Merge 10.3 into 10.4Marko Mäkelä2020-04-163-8/+22
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In main.index_merge_myisam we remove the test that was added in commit a2d24def8cc42d27c72d833abfb39ef24a2b96ba because it duplicates the test case that was added in commit 5af12e463549e4bbc2ce6ab720d78937d5e5db4e.
| | * | | | Merge 10.2 into 10.3Marko Mäkelä2020-04-153-8/+22
| | |\ \ \ \ | | | |/ / /
| | | * | | Correct FreeBSD cpuset_t typeDaniel Black2020-04-031-0/+4
| | | | | |
| | | * | | A better fix for edd7e7cSergey Vojtovich2020-04-011-9/+11
| | | | | |
| | | * | | MDEV-22074 UBSAN: applying zero offset to null pointer in hash.cEugene Kosov2020-03-311-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | The fix: return fast when no work should be performed.
| | | * | | MDEV-22069 UBSAN: runtime error: member access within null pointer of type ↵Eugene Kosov2020-03-311-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'MY_DIR_HANDLE' in mysys/my_lib.c This is an error handling bug. When opendir() fails dirh is NULL and we shouldn't try to free it.
| * | | | | Shrink my_atomic.h and my_cpu.h scopeSergey Vojtovich2020-04-155-0/+5
| | | | | |
| * | | | | my_file_opened to my_atomicSergey Vojtovich2020-04-152-3/+4
| | | | | |
* | | | | | Added support for more functions when using partitioned S3 tablesMonty2020-04-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-22088 S3 partitioning support All ALTER PARTITION commands should now work on S3 tables except REBUILD PARTITION TRUNCATE PARTITION REORGANIZE PARTITION In addition, PARTIONED S3 TABLES can also be replicated. This is achived by storing the partition tables .frm and .par file on S3 for partitioned shared (S3) tables. The discovery methods are enchanced by allowing engines that supports discovery to also support of the partitioned tables .frm and .par file Things in more detail - The .frm and .par files of partitioned tables are stored in S3 and kept in sync. - Added hton callback create_partitioning_metadata to inform handler that metadata for a partitoned file has changed - Added back handler::discover_check_version() to be able to check if a table's or a part table's definition has changed. - Added handler::check_if_updates_are_ignored(). Needed for partitioning. - Renamed rebind() -> rebind_psi(), as it was before. - Changed CHF_xxx hadnler flags to an enum - Changed some checks from using table->file->ht to use table->file->partition_ht() to get discovery to work with partitioning. - If TABLE_SHARE::init_from_binary_frm_image() fails, ensure that we don't leave any .frm or .par files around. - Fixed that writefrm() doesn't leave unusable .frm files around - Appended extension to path for writefrm() to be able to reuse to function for creating .par files. - Added DBUG_PUSH("") to a a few functions that caused a lot of not critical tracing.
* | | | | | Handle errors from external_unlock & mysql_unlock_tablesMonty2020-04-191-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Other things: - Handler errors from ha_maria::implict_commit - Disable DBUG in safe_mutex_lock to get trace file easier to read
* | | | | | Post-fixes for MDEV-18851 for WindowsVladislav Vaintroub2020-04-171-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - On Windows, do not handle lack of SeLockMemory privilege as fatal error. Just like on any other platform, there is a fallback to ordinary pages. It is better than server that does not start, silently. - On Windows, remove incorrect irritating "fallback to conventional pages failed" from the warning, when allocating large pages fails.
* | | | | | my_pagepages: perror -> my_errorDaniel Black2020-04-082-3/+7
| | | | | |
* | | | | | my_largepage: fprintf -> my_{printf_,}errorDaniel Black2020-04-082-34/+50
| | | | | |
* | | | | | add EE_BADMEMORY_RELEASEDaniel Black2020-04-081-1/+3
| | | | | |
* | | | | | my_large_malloc: style fixDaniel Black2020-04-081-3/+3
| | | | | |
* | | | | | my_largepage: reduce includes already in my_global.hDaniel Black2020-04-081-7/+0
| | | | | |
* | | | | | my_large_pages: simplify solaris constantsDaniel Black2020-04-081-9/+2
| | | | | |
* | | | | | my_large_pages: remove conventional memory(my_malloc_lock) fallbackDaniel Black2020-04-081-23/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both Windows and MMAP capable implementations fell back to a non-MEM_LARGE_PAGES/HugeTLB allocation with the large page implementaion failed. These can can be freed by the corresponding function. Prior to this, if we fell back to a conventional memory, than will results in deallocation using munmap/VirtualFree on a memory allocated using my_malloc_lock. At worst this could succeed and the my_malloc_lock looses its memory without knowing about it.
* | | | | | Fixed build failureSergey Vojtovich2020-04-051-1/+2
| | | | | |