summaryrefslogtreecommitdiff
path: root/mysys
Commit message (Collapse)AuthorAgeFilesLines
* Fix debug assert to match its intention.Vladislav Vaintroub2019-06-171-1/+1
| | | | | Do not check my_errno before it is set, check errno instead. Also, do not check errno, if prior pread() did not fail.
* MDEV-19750 mysql command wrong encodingVladislav Vaintroub2019-06-171-1/+217
| | | | | | | | | Restore the detection of default charset in command line utilities. It worked up to 10.1, but was broken by Connector/C. Moved code for detection of default charset from sql-common/client.c to mysys, and make command line utilities to use this code if charset was not specified on the command line.
* Portability fix.Vladislav Vaintroub2019-06-171-1/+1
|
* MDEV-19055 Failures with temporary tables and AriaMichael Widenius2019-06-171-0/+2
| | | | | | | | | | | | There was two separate problems: - Aria pagecache didn't properly handle re-reading of blocks that have given errors before (this triggered an assert) - temporary tables that where opened several times where not properly closed in ALTER, REPAIR or OPTIMIZE table Other things - Added a couple of asserts that will make it easier to find problems like this in the future.
* 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
* Only link mysys_ssl when required.Vladislav Vaintroub2019-06-031-2/+2
| | | | | Do not use TARGET_LINK_LIBRARIES(mysys mysys_ssl), this means that mysys_ssl is linked to practically everything.
* Merge 10.1 into 10.2Marko Mäkelä2019-05-281-1/+2
|\
| * Merge 5.5 into 10.1Marko Mäkelä2019-05-281-1/+2
| |\
| | * MDEV-17799 Add ASAN-poisoned redzones for MEM_ROOT and mem_heap_tEugene Kosov2019-05-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | This patch is for MEM_ROOT only. In debug mode add 8 byte of poisoned memory before every allocated chunk. On the right of every chunk there will be either 1-7 trailing poisoned bytes, or next chunk's redzone, or poisoned non allocated memory or redzone of a malloc()ed buffer.
* | | Merge 10.1 into 10.2Marko Mäkelä2019-05-13128-128/+128
|\ \ \ | |/ /
| * | Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-11117-117/+117
| |\ \ | | |/
| | * Update FSF AddressVicențiu Ciorbaru2019-05-11119-119/+119
| | | | | | | | | | | | * Update wrong zip-code
| * | Update FSF addressVicențiu Ciorbaru2019-05-111-1/+1
| | |
| * | Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-1110-10/+10
| |\ \ | | |/
| | * Follow-up to changing FSF addressVicențiu Ciorbaru2019-05-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some places didn't match the previous rules, making the Floor address wrong. Additional sed rules: sed -i -e 's/Place.*Suite .*, Boston/Street, Fifth Floor, Boston/g' sed -i -e 's/Suite .*, Boston/Fifth Floor, Boston/g'
| | * Update FSF addressMichal Schorm2019-05-1010-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is based on the work of Michal Schorm, rebased on the earliest MariaDB version. Th command line used to generate this diff was: find ./ -type f \ -exec sed -i -e 's/Foundation, Inc., 59 Temple Place, Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/Foundation, Inc. 59 Temple Place.* Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/MA.*.....-1307.*USA/MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/Foundation, Inc., 59 Temple/Foundation, Inc., 51 Franklin/g' {} \; \ -exec sed -i -e 's/Place, Suite 330, Boston, MA.*02111-1307.*USA/Street, Fifth Floor, Boston, MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/MA.*.....-1307/MA 02110-1335/g' {} \;
* | | Merge branch '10.1' into 10.2Oleksandr Byelkin2019-05-041-25/+23
|\ \ \ | |/ /
| * | cleanup: cosmetic fixesSergei Golubchik2019-04-241-1/+1
| | |
| * | cleanup: make TREE copyableSergei Golubchik2019-04-241-24/+22
| | | | | | | | | | | | | | | move per-object TREE::null_element to be one global static null_element.
| * | Remove unused declarationsMarko Mäkelä2019-04-031-11/+0
| | |
* | | MDEV-18204 - fixupVladislav Vaintroub2019-02-191-1/+2
| | |
* | | MDEV-18204 Fix rocksdb incremental backupVladislav Vaintroub2019-02-181-0/+60
| | | | | | | | | | | | | | | Fix incremental prepare to copy #rocksdb subdirectory from the incremental dir.
* | | Merge 10.1 into 10.2Marko Mäkelä2019-02-031-4/+3
|\ \ \ | |/ / | | | | | | | | | | | | Temporarily disable a test for commit 2175bfce3e9da8332f10ab0e0286dc93915533a2 because fixing it in 10.2 requires updating libmariadb.
| * | Merge 10.1 into 10.1Marko Mäkelä2019-02-021-4/+3
| |\ \ | | | | | | | | | | | | This is joint work with Oleksandr Byelkin.
| | * \ Merge branch '5.5' into 10.0Oleksandr Byelkin2019-01-281-4/+3
| | |\ \ | | | |/
| | | * MDEV-18360 Prevent set_max_open_files from allocating too many filesVicențiu Ciorbaru2019-01-271-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If the rlimit.rlim_cur value returned by getrlimit is not the RLIM_INFINITY magic constant, but a *very* large number, we can allocate too many open files. Restrict set_max_open_files to only return at most max_file_limit, as passed via its parameter.
* | | | Merge 10.1 into 10.2Marko Mäkelä2019-02-022-28/+34
|\ \ \ \ | |/ / /
| * | | my_malloc(): Invoke TRASH_ALLOC even WITH_SAFEMALLOC=OFFMarko Mäkelä2019-02-011-0/+1
| | | |
| * | | MDEV-10963 Fragmented BINLOG queryAndrei Elkin2019-01-241-28/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was originally stated in http://bugs.mysql.com/bug.php?id=82212 The size of an base64-encoded Rows_log_event exceeds its vanilla byte representation in 4/3 times. When a binlogged event size is about 1GB mysqlbinlog generates a BINLOG query that can't be send out due to its size. It is fixed with fragmenting the BINLOG argument C-string into (approximate) halves when the base64 encoded event is over 1GB size. The mysqlbinlog in such case puts out SET @binlog_fragment_0='base64-encoded-fragment_0'; SET @binlog_fragment_1='base64-encoded-fragment_1'; BINLOG @binlog_fragment_0, @binlog_fragment_1; to represent a big BINLOG. For prompt memory release BINLOG handler is made to reset the BINLOG argument user variables in the middle of processing, as if @binlog_fragment_{0,1} = NULL is assigned. Notice the 2 fragments are enough, though the client and server still may need to tweak their @@max_allowed_packet to satisfy to the fragment size (which they would have to do anyway with greater number of fragments, should that be desired). On the lower level the following changes are made: Log_event::print_base64() remains to call encoder and store the encoded data into a cache but now *without* doing any formatting. The latter is left for time when the cache is copied to an output file (e.g mysqlbinlog output). No formatting behavior is also reflected by the change in the meaning of the last argument which specifies whether to cache the encoded data. Rows_log_event::print_helper() is made to invoke a specialized fragmented cache-to-file copying function which is copy_cache_to_file_wrapped() that takes care of fragmenting also optionally wraps encoded strings (fragments) into SQL stanzas. my_b_copy_to_file() is refactored to into my_b_copy_all_to_file(). The former function is generalized to accepts more a limit argument to constraint the copying and does not reinitialize anymore the cache into reading mode. The limit does not do any effect on the fully read cache.
* | | | Merge 10.1 into 10.2Marko Mäkelä2019-01-171-1/+1
|\ \ \ \ | |/ / /
| * | | Merge 10.0 into 10.1Marko Mäkelä2019-01-171-1/+1
| |\ \ \ | | |/ /
| | * | safemalloc: warn, flush after fprintfDaniel Black2019-01-171-1/+1
| | | | | | | | | | | | | | | | Corrects 94d722b6a43b86ee760f07915921cf58f9869a5d
* | | | Merge 10.1 into 10.2Marko Mäkelä2018-11-073-29/+49
|\ \ \ \ | |/ / /
| * | | Merge 10.0 into 10.1Marko Mäkelä2018-11-073-29/+49
| |\ \ \ | | |/ /
| | * | Merge 5.5 into 10.0Marko Mäkelä2018-11-073-29/+49
| | |\ \ | | | |/
| | | * MDEV-17401: LOAD DATA from very big file into MyISAM table results in EOF ↵Oleksandr Byelkin2018-11-023-31/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.1 into 10.2Marko Mäkelä2018-11-064-4/+15
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2018-10-303-2/+10
| |\ \ \ | | |/ /
| | * | Merge branch '5.5' into 10.0Sergei Golubchik2018-10-272-2/+3
| | |\ \ | | | |/
| | | * Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2018-10-232-8/+10
| | | |\
| | | | * Bug#27788907 SOME FILE OPERATIONS IN MF_IOCACHE2.C ARE NOT INSTRUMENTEDmysql-5.5.62Marc Alff2018-08-201-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MySQL bug number 90264 Contribution by Yura Sorokin. Problem: File mysys/mf_iocache2.c contains non instrumented file io operations. This causes inaccurate statistics in PERFORMANCE_SCHEMA. Solution: Use the instrumentation apis (mysql_file_tell instead of my_tell, etc).
| | | | * Bug #26275510 BUNDLED ZLIB DOESN'T INCLUDE FIXES FOR SOME VULNERABILITIESAditya A2018-07-091-2/+2
| | | | | | | | | | | | | | | | | | | | Upgrading the zlib lib to 1.2.11
| | * | | MDEV-17020: Assertion `length > 0' failed in ptr_compare upon ORDER BY with ↵Varun Gupta2018-10-151-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bad conversion This assert is hit when we do filesort using the priority queue and try to insert elements in the queue. The compare function used for the priority queue should handle the case for zerolength sortkey.
| * | | | 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.
* | | | | Merge branch '10.1' into 10.2Sergei Golubchik2018-09-241-1/+2
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.0' into 10.1Sergei Golubchik2018-09-231-1/+2
| |\ \ \ \ | | |/ / /
| | * | | Merge 5.5 into 10.0Marko Mäkelä2018-09-211-1/+2
| | |\ \ \ | | | |/ /
| | | * | MDEV-17248 Improve ASAN memory pool instrumentationEugene Kosov2018-09-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | alloc_root(): unpoison only requested amount of bytes instead of a possible bigger aligned-sized buffer.
* | | | | Merge 10.1 into 10.2Marko Mäkelä2018-08-021-1/+4
|\ \ \ \ \ | |/ / / /