summaryrefslogtreecommitdiff
path: root/mysys
Commit message (Collapse)AuthorAgeFilesLines
* Fixed compiler warnings and test failures found by buildbotMonty2016-06-244-12/+12
| | | | Fixed ccfilter to detect errors where the column is included in the error message
* General spell fixing in comments and stringsOtto Kekäläinen2016-06-081-1/+1
|
* MDEV-9857 - CACHE_LINE_SIZE in innodb should be 128 on POWERSergey Vojtovich2016-06-071-1/+0
| | | | | | Replaced hard-coded cache line size. Changes based on Daniel Black's work.
* Reuse THD for new user connectionsMonty2016-06-042-5/+6
| | | | | | | | | | | | | | - To ensure that mallocs are marked for the correct THD, even if it's allocated in another thread, I added the thread_id to the THD constructor - Added st_my_thread_var to thr_lock_info_init() to avoid a call to my_thread_var - Moved things from THD::THD() to THD::init() - Moved some things to THD::cleanup() - Added THD::free_connection() and THD::reset_for_reuse() - Added THD to CONNECT::create_thd() - Added THD::thread_dbug_id and st_my_thread_var->dbug_id. These are needed to ensure that we have a constant thread_id used for debugging with a THD, even if it changes thread_id (=connection_id) - Set variables.pseudo_thread_id in constructor. Removed not needed sets.
* MDEV-9154 : Remove workarounds (mainly dynamic function loading)Vladislav Vaintroub2016-06-013-302/+24
| | | | for running obsolete versions of Windows
* MDEV-6353 my_ismbchar() and my_mbcharlen() refactoringAlexander Barkov2016-05-171-9/+11
|
* CleanupsMonty2016-04-281-1/+1
| | | | | | | | - Avoid some realloc() during startup - Ensure that file_key_management_plugin frees it's memory early, even if it's linked statically. - Fixed compiler warnings from unused variables and missing destructors - Fixed wrong indentation
* fix compile error on Windows, intrduced by previous monty's pushVladislav Vaintroub2016-04-061-1/+1
|
* Added new range of MariaDB error messages, starting from 3000Monty2016-04-052-11/+9
| | | | | | | | | This is done by splitting variables.errmsg and locale.errmsg to variables.errmsg_extra and locale.errmsg_extra The ER() macros in unireg.h now looks more complex than before, but this isn't critical as most usage of them are with constants and the compiler will remove most of the test code.
* MDEV-9811 LOAD DATA INFILE does not work well with gbk in some casesAlexander Barkov2016-03-311-0/+1
| | | | MDEV-9824 LOAD DATA does not work with multi-byte strings in LINES TERMINATED BY when IGNORE is specified
* MDEV-8360 Clean-up CHARSET_INFO: strnncollsp: diff_if_only_endspace_differenceAlexander Barkov2016-03-311-13/+5
| | | | | | | | | | | | | | | | | | | - Removing the "diff_if_only_endspace_difference" argument from MY_COLLATION_HANDLER::strnncollsp(), my_strnncollsp_simple(), as well as in the function template MY_FUNCTION_NAME(strnncollsp) in strcoll.ic - Removing the "diff_if_only_space_different" from ha_compare_text(), hp_rec_key_cmp(). - Adding a new function my_strnncollsp_padspace_bin() and reusing it instead of duplicate code pieces in my_strnncollsp_8bit_bin(), my_strnncollsp_latin1_de(), my_strnncollsp_tis620(), my_strnncollsp_utf8_cs(). - Adding more tests for better coverage of the trailing space handling. - Removing the unused definition of HA_END_SPACE_ARE_EQUAL
* Merge branch '10.1' into 10.2Oleksandr Byelkin2016-03-251-1/+1
|\
| * Merge branch '10.0' into 10.1Oleksandr Byelkin2016-03-241-1/+1
| |\
| | * MDEV-9773: Memory corruption in mariadb_dyncol_unpackOleksandr Byelkin2016-03-241-1/+1
| | | | | | | | | | | | Fixed calculating pointer to memory allocated for names in numeric format in unpacking procedure.
* | | Merge branch '10.1' into 10.2Sergei Golubchik2016-03-236-7/+14
|\ \ \ | |/ /
| * | Merge branch '10.0' into 10.1Sergei Golubchik2016-03-216-7/+14
| |\ \ | | |/
| | * Merge branch '5.5' into 10.0Sergei Golubchik2016-03-211-1/+8
| | |\
| | | * MDEV-9733 Server crashes in lf_pinbox_real_free on replication slavesSergei Golubchik2016-03-171-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | don't allocate all the stack, leave some stack for function calls. To test I added the following line: alloca_size = available_stack_size() - X at X=4096 or less mysqld crashed, at 8192 mtr test passed.
| | * | Fix spelling: occurred, execute, which etcOtto Kekäläinen2016-03-045-6/+6
| | | |
* | | | Fixed compilarion failure on 32bit systemsSergey Vojtovich2016-02-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Compile time assertion "sizeof(struct st_irem) % sizeof(double) == 0" started to fail on 32bit systems after my_thread_id was changed from ulong to int64. Fixed by added padding to struct st_irem on 32bit systems.
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-02-257-17/+15
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2016-02-236-16/+14
| |\ \ \ | | |/ /
| | * | Merge branch '5.5' into 10.0Sergei Golubchik2016-02-155-12/+14
| | |\ \ | | | |/
| | | * fix my_gethwaddr() for solarisSergei Golubchik2016-02-151-1/+1
| | | | | | | | | | | | | | | | it caused feedback plugin tests to fail
| | | * Fix memory leak when failing to read config fileVicențiu Ciorbaru2016-02-141-0/+1
| | | | | | | | | | | | | | | | | | | | In the case of error during my_load_defaults, we would not free the args array.
| | | * Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-02-092-2/+4
| | | |\ | | | | | | | | | | | | | | | | | | | | reverted about half of commits as either not applicable or outright wrong
| | | | * Bug#21770366 backport bug#21657078 to 5.5 and 5.6Ajo Robert2016-01-072-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem Statement ========= Fix various issues when building MySQL with Visual Studio 2015. Fix: ======= - Visual Studio 2015 adds support for timespec. Add check and related code to use this and only use our replacement if timespec is not defined. - Rename lfind/lsearch to my* to avoid redefinition problems. - Set default value for TMPDIR to "" on Windows as P_tmpdir no longer exists. - using VS definition of snprintf if available - tzname are now renamed to _tzname.
| | | * | MDEV-9024 Build fails with VS2015Sergei Golubchik2016-02-061-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cherry-pick f1daf9ce from 10.0 branch ------------------------------------- Fix build failures caused by new C runtime library - isnan, snprintf, struct timespec are now defined, attempt to redefine them leads - P_tmpdir, tzname are no more defined - lfind() and lsearch() in lf_hash.c had to be renamed, declaration conflicts with some C runtime functions with the same name declared in a header included by stdlib.h Also fix couple of annoying warnings : - remove #define NOMINMAX from config.h to avoid "redefined" compiler warnings(NOMINMAX is already in compile flags) - disable incremental linker in Debug as well (feature not used much and compiler crashes often) Also simplify package building with Wix, require Wix 3.9 or later (VS2015 is not compatible with old Wix 3.5/3.6)
| | | * | MDEV-4664 mysql_upgrade crashes if root's password contains an ↵Sergei Golubchik2016-02-061-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | apostrophe/single quotation mark fix dynstr_append_os_quoted() to escape single quotes correctly for a POSIX shell
| | | * | unit test for dynstr_append_os_quoted()Sergei Golubchik2016-02-061-9/+7
| | | | | | | | | | | | | | | | | | | | and a trivial cleanup to avoid manually-specified lengths
| | * | | Merge pull request #150 from grooverdan/10.0-my_rnd_cppVicențiu-Marian Ciorbaru2016-02-061-4/+0
| | |\ \ \ | | | | | | | | | | | | MDEV-9433: mysys/my_rnd.c - remove #ifdef __cplusplus
| | | * | | mysys/my_rnd.c - remove #ifdef __cplusplusDaniel Black2016-01-191-4/+0
| | | | | |
* | | | | | MDEV-6150 Speed up connection speed by moving creation of THD to new threadMonty2016-02-073-29/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Creating a CONNECT object on client connect and pass this to the working thread which creates the THD. Split LOCK_thread_count to different mutexes Added LOCK_thread_start to syncronize threads Moved most usage of LOCK_thread_count to dedicated functions Use next_thread_id() instead of thread_id++ Other things: - Thread id now starts from 1 instead of 2 - Added cast for thread_id as thread id is now of type my_thread_id - Made THD->host const (To ensure it's not changed) - Removed some DBUG_PRINT() about entering/exiting mutex as these was already logged by mutex code - Fixed that aborted_connects and connection_errors_internal are counted in all cases - Don't take locks for current_linfo when we set it (not needed as it was 0 before)
* | | | | | Merge branch '10.1' into 10.2Monty2016-02-062-14/+61
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: VERSION cmake/plugin.cmake config.h.cmake configure.cmake plugin/server_audit/server_audit.c sql/sql_yacc.yy
| * | | | | [MDEV-9468]: Client hangs in my_addr_resolveVicențiu Ciorbaru2016-01-261-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Account for timeout of select returning a 0 error code.
| * | | | | Merge branch '10.0' into 10.1Sergei Golubchik2016-01-251-0/+2
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge branch '5.5' into 10.0Alexey Botchkov2016-01-251-0/+2
| | |\ \ \ \ | | | |/ / / | | |/| / / | | | |/ / | | | | | Conflicts: plugin/server_audit/server_audit.c
| | | * | MDEV-9106 Audit plugin compiled with MariaDB can't install on MySQL 5.7.Alexey Botchkov2016-01-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The audit API was seriously changed in MySQL 5.7. so we had to adapt the plugin's code to that.
| * | | | Remove warning in my_addr_resolveVicențiu Ciorbaru2016-01-171-2/+3
| | | | | | | | | | | | | | | | | | | | ISO C90 does not allow mixed declarations and code.
| * | | | [MDEV-9427] Server does not build on OpenSUSE 42.1Vicențiu Ciorbaru2016-01-171-7/+9
| | | | | | | | | | | | | | | | | | | | Changed code to comply to C90 standard.
| * | | | Fixed a crash during stacktrace printing if addr2line failed to start.Vicențiu Ciorbaru2016-01-171-14/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to get all the input from addr2line we must read in a loop, until the response is complete. Also, in case that the response is malformed, we must not end up reading invalid memory.
* | | | | Merge remote-tracking branch 'origin/10.1' into 10.2Alexander Barkov2015-12-296-10/+22
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.0' into 10.1Sergei Golubchik2015-12-214-9/+8
| |\ \ \ \ | | |/ / /
| | * | | MDEV-8378 - Debian: the Lintian complains about many "shlib-calls-exit" in manymariadb-10.0.23Sergey Vojtovich2015-12-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of the plugins Removed exit() from daemon_example, pass error to caller instead. Also removed unused my_abort_hook.
| | * | | MDEV-9167: COLUMN_CHECK fails on valid decimal dataOleksandr Byelkin2015-12-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check now allows zero length decimals too. (backporting Adam Chainz patch to 10.0)
| | * | | Merge branch '5.5' into 10.0Sergei Golubchik2015-12-131-1/+1
| | |\ \ \ | | | |/ /
| | | * | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2015-12-091-1/+1
| | | |\ \ | | | | |/
| | | | * Bug #21503595 : --QUERY-ALLOC-BLOCK-SIZE=-1125899906842624 +Arun Kuruvila2015-09-041-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PID_FILE CHECK LEADS TO OOM SIG 11 Description:- A server started with 'query_alloc_block_size' option set to a certain range of negative values on a machine without enough memory may lead to OOM. Analysis:- Server uses 'strtoull()' to convert server variable values of type 'GET_UINT', 'GET_ULONG' or 'GET_ULL' from string to unsigned long long. According to the man page, 'strtoull()' function returns either the result of the conversion or, if there was a leading minus sign, the negation of the result of the conversion represented as an unsigned value, unless the original(nonnegated) value would overflow; in the latter case, strtoull() returns ULLONG_MAX and sets errno to ERANGE. So 'strtoull()' converts a small negative value to a larger postive value. For example string '-1125899906842624' will be converted to an unsigned value, '18445618173802708992' (ulonglong typecast of '-1125899906842624'). So a server started with 'query_alloc_block_size' set to "-1125899906842624" on a machine without enough memory will lead to OOM since server allocates '18445618173802708992' bytes(17178820608 GB) for query allocation block. Fix:- When server is started with any server variable, of type "GET_UINT", "GET_ULONG" or "GET_ULL", set to a negative value, a warning, "option xxx: value -yyy adjusted to zzz" is thrown and the value is adjusted to the lowest possible value for that variable. The dynamic server variable which is configured through the client exhibit the same behavior as fix made for variables configured during the server start up.
| | | | * Bug# 20376760: STACK-BUFFER-OVERFLOW WITH LONG PATHS TO CERTAIN VARIABLESYashwant Sahu2015-06-241-2/+2
| | | | |
| | * | | MDEV-8521 Drastic loss of precision in COLUMN_JSON() on DOUBLEsOleksandr Byelkin2015-12-101-1/+3
| | | | | | | | | | | | | | | | | | | | fixed conversion