summaryrefslogtreecommitdiff
path: root/mysys
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'bb-10.2-ext' into 10.3Sergei Golubchik2018-02-231-0/+7
|\
| * Merge branch '10.2' into bb-10.2-extSergei Golubchik2018-02-221-0/+7
| |\
| | * MDEV-15345 Compilation fails to build my_addr_resolve.cSergei Golubchik2018-02-221-0/+7
| | | | | | | | | | | | | | | fix the compilation error. no support for plugins yet.
* | | Make possible to use clang on Windows (clang-cl)Vladislav Vaintroub2018-02-2014-25/+27
| | | | | | | | | | | | | | | | | | -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-157-93/+162
|\ \ \ | |/ /
| * | 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 10.2 into bb-10.2-extMarko Mäkelä2018-02-081-1/+1
| |\ \ \ | | |/ /
| | * | Merge 10.1 into 10.2Marko Mäkelä2018-02-081-1/+1
| | |\ \ | | | |/
| | | * Merge 10.0 into 10.1Marko Mäkelä2018-02-081-1/+1
| | | |\
| | | | * MDEV-15230: column_json breaks cyrillic in 10.1.31Oleksandr Byelkin2018-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | Use unsigned comparison.
| * | | | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2018-02-087-92/+161
| |\ \ \ \ | | |/ / /
| | * | | Merge branch 'github/10.1' into 10.2Sergei Golubchik2018-02-067-93/+161
| | |\ \ \ | | | |/ /
| | | * | 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
| | | | | |
| | | * | | my_addr_resolve fixesSergei Golubchik2018-02-021-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * use a longer timeout, 10ms is not always enough * stop waiting as long as the data is read, do not unconditionally wait for timeout every time
| | | * | | Merge branch 'github/10.0' into 10.1Sergei Golubchik2018-02-026-63/+133
| | | |\ \ \ | | | | |/ /
| | | | * | Merge remote-tracking branch '5.5' into 10.0Vicențiu Ciorbaru2018-01-246-49/+77
| | | | |\ \ | | | | | |/
| | | | | * improve ASAN instrumentation: MEM_ROOTSergei Golubchik2018-01-221-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | more complete TRASH-ing of memroots
| | | | | * Correct TRASH() macro usageSergei Golubchik2018-01-222-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TRASH was mapped to TRASH_FREE and was supposed to be used for memory that should not be accessed anymore, while TRASH_ALLOC() is to be used for uninitialized but to-be-used memory. But sometimes TRASH() was used in the latter sense. Remove TRASH() macro, always use explicit TRASH_ALLOC() or TRASH_FREE().
| | | | | * MDEV-14229: Stack trace is not resolved for shared objectsVicențiu Ciorbaru2018-01-192-32/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolving a stacktrace including functions in dynamic libraries requires us to look inside the libraries for the symbols. Addr2line needs to be started with the correct binary for each address on the stack. To do this, figure out which library it is using dladdr, then if the addr2line binary was started with a different binary, fork it again with the correct one. We only have one addr2line process running at any point during the stacktrace resolving step. The maximum number of forks for addr2line should generally be around 6. One for server stacktrace code, one for plugin code, one when going back into server code, one for pthread library, one for libc, one for the _start function in the server. More can come up if plugin calls server function which goes back to a plugin, etc.
| | | | | * Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2018-01-181-2/+3
| | | | | |\
| | | | | | * Bug#23072792 MYSQL_GROUP_SUFFIX DOES NOT WORKTor Didriksen2017-09-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reintroduce environment variable MYSQL_GROUP_SUFFIX to be used as --default-group-suffix value if not already set. The environment variable was accidentally renamed to DEFAULT_GROUP_SUFFIX_ENV in MySQL server 5.5.
| | | | | | * BUG#25451091:CREATE TABLE DATA DIRECTORY / INDEX DIRECTORYNisha Gopalakrishnan2017-05-121-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SYMLINK CHECK RACE CONDITIONS ANALYSIS: ========= A potential defect exists in the handling of CREATE TABLE .. DATA DIRECTORY/ INDEX DIRECTORY which gives way to the user to gain access to another user table or a system table. FIX: ==== The lstat and fstat output of the target files are now stored which help in determining the identity of the target files thus preventing the unauthorized access to other files.
| | | | | | * Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLEJon Olav Hauglid2016-08-191-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD) is created. When repair finishes, this file is renamed to the original .MYD file. The problem was that during this rename, we copied the stats from the old file to the new file with chmod/chown. If a user managed to replace the temporary file before chmod/chown was executed, it was possible to get an arbitrary file with the privileges of the mysql user. This patch fixes the problem by not copying stats from the old file to the new file. This is not needed as the new file was created with the correct stats. This fix only changes server behavior - external utilities such as myisamchk still does chmod/chown. No test case provided since the problem involves synchronization with file system operations.
| | | | | | * Bug#23251517: SEMISYNC REPLICATION HANGINGSujatha Sivakumar2016-05-132-16/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert following bug fix: Bug#20685029: SLAVE IO THREAD SHOULD STOP WHEN DISK IS FULL Bug#21753696: MAKE SHOW SLAVE STATUS NON BLOCKING IF IO THREAD WAITS FOR DISK SPACE This fix results in a deadlock between slave IO thread and SQL thread.
| | | | | * | MDEV-14469 build with cmake -DMYSQL_MAINTAINER_MODE=ON fails: 'readdir_r' is ↵Sergei Golubchik2018-01-151-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | deprecated 1. test readdir_r() availability under -Werror 2. don't protect readdir() with mutexes, it's not needed for the way we use readdir()
| | | | * | | MDEV-7533: COLUMN_JSON() doesn't escape control characters in string valuesOleksandr Byelkin2018-01-231-2/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | escape all charecters less or equal 0x1F (control symbols) (shorter sequence are not used to make code simple, long encoding is always legal according to the rfc4627)
* | | | | | | Windows, compiling : reenable warning C4996 (deprecated functions)Vladislav Vaintroub2018-02-071-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from ↵Vladislav Vaintroub2018-02-069-20/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '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-02-044-11/+19
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Added name to MEM_ROOT for esier debuggingMonty2018-02-024-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will make it easier to how memory allocation is done when debugging with either DBUG or gdb. Will especially help when debugging stored procedures Main change is a name argument as second argument to init_alloc_root() init_sql_alloc() Other things: - Added DBUG_ENTER/EXIT to some Virtual_tmp_table functions
* | | | | | | Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3Alexander Barkov2018-01-292-2/+9
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Added TRASH_FREED_MEMORY compilation optionMonty2018-01-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One can use -DTRASH_FREED_MEMORY to enable TRASH macros. Useful to do when one suspects that there is accesses to freed memory. Extended my_free() to TRASH freed memory
| * | | | | | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extMonty2018-01-271-2/+2
| |\ \ \ \ \ \ | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | Conflicts: sql/table.cc
| | * | | | | 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-171-1/+3
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Do not define unused function mark_blocks_free()Marko Mäkelä2018-01-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up to commit 9ec19b9b41804d8d4491f0f58ac06ae417e02ffa
| * | | | | | Fixed compiler warnings in guess_malloc_libraryMonty2018-01-151-6/+7
| | | | | | |
* | | | | | | Merge branch 'github/10.3' into bb-10.3-temporalmariadb-10.3.4Sergei Golubchik2018-01-174-5/+5
|\ \ \ \ \ \ \
| * | | | | | | Minor spelling fixes in code comments, docs and outputOtto Kekäläinen2018-01-124-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit does not touch any variable names or any other actual code, and thus should not in any way affect how the code works.
* | | | | | | | System Versioning 1.0 pre8Aleksey Midenkov2018-01-109-65/+56
|\ \ \ \ \ \ \ \ | |/ / / / / / / | | | | | | | | | | | | | | | | Merge branch '10.3' into trunk
| * | | | | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2018-01-046-55/+43
| |\ \ \ \ \ \ \ | | |/ / / / / /
| | * | | | | | Fixed crashing bug in mysqlbinlogMonty2018-01-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The fix in mf_iocache2.c was just to fix a compiler warning
| | * | | | | | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extMonty2018-01-013-17/+3
| | |\ \ \ \ \ \ | | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cmake/make_dist.cmake.in mysql-test/r/func_json.result mysql-test/r/ps.result mysql-test/t/func_json.test mysql-test/t/ps.test sql/item_cmpfunc.h
| | | * | | | | Merge remote-tracking branch 'origin/10.1' into 10.2Vicențiu Ciorbaru2017-12-223-17/+3
| | | |\ \ \ \ \ | | | | |/ / / /
| | | | * | | | MDEV-14265 - RPMLint warning: shared-lib-calls-exitSergey Vojtovich2017-12-193-17/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | find_type_or_exit() client helper did exit(1) on error, exit(1) moved to clients. mysql_read_default_options() did exit(1) on error, error is passed through and handled now. my_str_malloc_default() did exit(1) on error, replaced my_str_ allocator functions with normal my_malloc()/my_realloc()/my_free(). sql_connect.cc did many exit(1) on hash initialisation failure. Removed error check since my_hash_init() never fails. my_malloc() did exit(1) on error. Replaced with abort(). my_load_defaults() did exit(1) on error, replaced with return 2. my_load_defaults() still does exit(0) when invoked with --print-defaults.
| | * | | | | | Made IO_CACHE safe for reading big blocks (> 2G)Monty2017-12-292-22/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reason for adding this was that while testing mysqlbinlog on a replication event with 3G event output, Linux failed reading the whole file in memory with one read (only got 2G on first read even if file had just been written). - Don't reset info->error on write error in IO_CACHE. - In case of write_error in IO_CACHE , always return -1 - Fixed wrong result from my_read when using MY_FULL_IO. Also don't give an error in case of retry.