summaryrefslogtreecommitdiff
path: root/mysys/mf_iocache.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.4 into 10.5Marko Mäkelä2021-04-211-1/+1
|\
| * Merge 10.3 into 10.4Marko Mäkelä2021-04-211-1/+1
| |\
| | * Merge 10.2 into 10.3Marko Mäkelä2021-04-211-1/+1
| | |\
| | | * MDEV-15064: IO_CACHE mysys read_pos, not libmaria rc_posbb-10.2-danielblack-MDEV-15064-IO_CACHE-read_posRainer Orth2021-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems some overly tolerant compilers (gcc) allow the structure of IO_CACHE that is defined differently in libmaria to have members equalivance to the iocache in mysys. More strict Solaris compilers recognise that rc_pos really isn't a structure member and won't compile.
* | | | Merge 10.4 into 10.5Marko Mäkelä2020-10-301-3/+3
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2020-10-291-3/+3
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2020-10-281-3/+3
| | |\ \ | | | |/
| | | * MDEV-23867: insert... select crash in compute_window_funcVarun Gupta2020-10-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are 2 issues here: Issue #1: memory allocation. An IO_CACHE that uses encryption uses a larger buffer (it needs space for the encrypted data, decrypted data, IO_CACHE_CRYPT struct to describe encryption parameters etc). Issue #2: IO_CACHE::seek_not_done When IO_CACHE objects are cloned, they still share the file descriptor. This means, operation on one IO_CACHE may change the file read position which will confuse other IO_CACHEs using it. The fix of these issues would be: Allocate the buffer to also include the extra size needed for encryption. Perform seek again after one IO_CACHE reads the file.
* | | | Merge 10.4 into 10.5Marko Mäkelä2020-09-041-3/+5
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2020-09-031-3/+5
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2020-09-031-3/+5
| | |\ \ | | | |/
| | | * Merge 10.1 into 10.2Marko Mäkelä2020-09-031-3/+5
| | | |\
| | | | * MDEV-22387: Do not pass null pointer to some memcpy()Marko Mäkelä2020-09-031-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing a null pointer to a nonnull argument is not only undefined behaviour, but it also grants the compiler the permission to optimize away further checks whether the pointer is null. GCC -O2 at least starting with version 8 may do that, potentially causing SIGSEGV. These problems were caught in a WITH_UBSAN=ON build with the Bug#7024 test in main.view.
| | | * | fix MDEV-18750: failed to flashback large-size binlog fileZicheng Huang2019-06-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix MDEV-18750: failed to flashback large-size binlog file fix mysqlbinlog flashback failure caused by reading io_cache without MY_FULL_IO flag fix MDEV-18750: mysqlbinlog flashback failure on large binlog
* | | | | Added checks for uninitalized memory when writing to IO_CACHEMonty2020-06-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This was done to be able to track some cases of unallocated memory in replication tests reported by MSAN.
* | | | | 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.
* | | | | 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
* | | | | perfschema file instrumentation related changesSergei Golubchik2020-03-101-8/+19
| | | | |
* | | | | perfschema memory related instrumentation changesSergei Golubchik2020-03-101-2/+2
|/ / / /
* | | | 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
* | | | | MDEV-19117 Don't keep binary log index file locked during show binary logsMonty2019-04-011-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some systems with 10,000+ binlogs, show binary logs could block log rotation for more than 10 seconds. This patch fixes this by first caching all binary log names and releases all mutexes while calculating the sizes of the binary logs. Other things: - Ensure that reinit_io_cache() sets end_of_file when moving to read_cache. This ensures that external changes of the underlying file is known to the cache. - get_binlog_list() is made more efficent and show_binlogs() is changed to call get_binlog_list() Reviewed by Andrei Elkin
* | | | | Merge branch '10.3' into 10.4Sergei Golubchik2019-01-261-8/+4
|\ \ \ \ \ | |/ / / /
| * | | | MDEV-17401: LOAD DATA from very big file into MyISAM table results in EOF ↵Oleksandr Byelkin2019-01-251-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | error and corrupt index fix of incorrect 10.3 merge
* | | | | Merge 10.3 into 10.4mariadb-10.4.0Marko Mäkelä2018-11-081-0/+4
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.2 into 10.3Marko Mäkelä2018-11-071-0/+4
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.1 into 10.2Marko Mäkelä2018-11-071-0/+4
| | |\ \ \ | | | |/ /
| | | * | Merge 10.0 into 10.1Marko Mäkelä2018-11-071-0/+4
| | | |\ \
| | | | * \ Merge 5.5 into 10.0Marko Mäkelä2018-11-071-0/+4
| | | | |\ \ | | | | | |/
| | | | | * MDEV-17401: LOAD DATA from very big file into MyISAM table results in EOF ↵Oleksandr Byelkin2018-11-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | error and corrupt index my_read fixed as in higher versions. my_pread made as my_read aware of partial read of huge chunks of files MY_FULL_IO enabled for file operations
* | | | | | Merge 10.3 into 10.4Marko Mäkelä2018-11-061-2/+14
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge 10.2 into 10.3Marko Mäkelä2018-11-061-2/+14
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | main.derived_cond_pushdown: Move all 10.3 tests to the end, trim trailing white space, and add an "End of 10.3 tests" marker. Add --sorted_result to tests where the ordering is not deterministic. main.win_percentile: Add --sorted_result to tests where the ordering is no longer deterministic.
| | * | | | Merge 10.1 into 10.2Marko Mäkelä2018-11-061-2/+5
| | |\ \ \ \ | | | |/ / /
| | | * | | MDEV-17133 dump thread reads from a past positionAndrei Elkin2018-10-211-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to logs analysis the Dump thread attempted to read again data which was already sent. The reason of regressed read turns out in an _my_b_cache_read() early exit branch which missed to distinguish between total zero size read (e.g ineffective read when Count argument is zero) from a case when the requested amount of data is fully read out by sole accessing the cache's file. In the latter case such then *effective* reading was not reflected in the cache's state to screw the cache's state. Fixed with a check introduced of whether the file reading was effective prior to early exit. When this is the case conduct standard cache state change to account the actual read size. Notice the bug can show up also as an error to read binlog event e.g through BINLOG_GTID_POS() (of MDEV-16886).
| | * | | | MDEV-12779 Oracle/DB2 Compatibility Implicit Ordering for ROW_NUMBER OVERVicențiu Ciorbaru2018-11-011-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users expect window functions to produce a certain ordering of rows in the final result set. Although the standard does not require this, we already have the filesort result done for when we computed the window function. If there is no ORDER BY attached to the query, just keep it till the SELECT is completely evaluated and use that to print the result. Update test cases as many did not take care to guarantee a stable result.
* | | | | | mysys: remove dead ME_xxx flagsSergei Golubchik2018-06-041-4/+2
|/ / / / /
* | | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2018-02-151-2/+2
|\ \ \ \ \
| * \ \ \ \ Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2018-02-121-1/+1
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge branch '10.1' into 10.2Sergei Golubchik2018-02-111-1/+1
| | |\ \ \ \ | | | |/ / /
| | | * | | MDEV-14868 MariaDB server crashes after using ROLLBACK TO when ↵Sergei Golubchik2018-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | encrypt_tmp_files=ON Fix reinit_io_cache(WRITE_CACHE) with non-zero seek_offset. Run encryption.tempfiles with and without binlog checksums.
| * | | | | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2018-02-081-1/+1
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge branch 'github/10.1' into 10.2Sergei Golubchik2018-02-061-1/+1
| | |\ \ \ \ | | | |/ / /
| | | * | | Merge 10.0 into 10.1Marko Mäkelä2018-02-031-1/+1
| | | |\ \ \ | | | | |/ /
| | | | * | Merge remote-tracking branch 'origin/5.5' into 10.0Vicențiu Ciorbaru2018-02-021-1/+1
| | | | |\ \ | | | | | |/
| | | | | * Fix an out of scope bzeroVicențiu Ciorbaru2018-01-301-1/+1
| | | | | |
* | | | | | MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from ↵Vladislav Vaintroub2018-02-061-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '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.