summaryrefslogtreecommitdiff
path: root/mysys
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-9172 - Analyze patches for IBM System zSergey Vojtovich2015-12-091-0/+9
| | | | | Extended my_timer_cycles() to support s390. Some compiler tunings for RHEL/SLES RPM packages on s390.
* Merge branch '10.0' into 10.1Sergei Golubchik2015-11-193-23/+50
|\
| * MDEV-9024 Build fails with VS2015Vladislav Vaintroub2015-11-062-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-8692 prefschema test failures on ARM (on Debian build system)Alexander Barkov2015-10-301-0/+25
| | | | | | | | | | | | A few tests assumes that the CYCLE timer is always available, which is not true on some platforms (e.g. ARM). Fixing the tests not to reply on the CYCLE availability.
| * MDEV-8565: COLUMN_CHECK fails on valid dataOleksandr Byelkin2015-10-191-2/+4
| | | | | | | | Check allows zero lengts int/uint now.
* | add missing DBUG_RETURN-sSergei Golubchik2015-11-161-1/+1
| |
* | MDEV-9021: MYSQLD SEGFAULTS WHEN BUILT USING --WITH-MAX-INDEXES=128Nirbhay Choubey2015-11-091-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bitmap implementation defines two template Bitmap classes. One optimized for 64-bit (default) wide bitmaps while the other is used for all other widths. In order to optimize the computations, Bitmap<64> class has defined its own member functions for bitmap operations, the other one, however, relies on mysys' bitmap implementation (mysys/my_bitmap.c). Issue 1: In case of non 64-bit Bitmap class, intersect() wrongly reset the received bitmap while initialising a new local bitmap structure (bitmap_init() clears the bitmap buffer) thus, the received bitmap was getting cleared. Fixed by initializing the local bitmap structure by using a temporary buffer and later copying the received bitmap to the initialised bitmap structure. Issue 2: The non 64-bit Bitmap class had the Iterator missing which caused compilation failure. Also added a cmake variable to hold the MAX_INDEXES value when supplied from the command prompt. (eg. cmake .. -DMAX_INDEXES=128U). Checks have been put in place to trigger build failure if MAX_INDEXES value is greater than 128. Test modifications: * Introduced include/have_max_indexes_[64|128].inc to facilitate skipping of tests for which the output differs with different MAX_INDEXES. * Introduced include/max_indexes.inc which would get modified by cmake to reflect the MAX_INDEXES value used to build the server. This file simply sets an mtr variable '$max_indexes' to show the MAX_INDEXES value, which will then be consumed by the above introduced include file. * Some tests (portions), dependent on MAX_INDEXES value, have been moved to separate test files.
* | fix build on sol10-64Sergei Golubchik2015-10-151-1/+1
| |
* | MDEV-8208: Sporadic SEGFAULT on startupNirbhay Choubey2015-09-251-1/+4
| | | | | | | | | | | | | | | | | | | | Addendum: * Before calling THD::init_for_queries(), flip the current_thd to wsrep thread so that memory gets allocated for the right THD. * Use wsrep_creating_startup_threads instead of plugins_are_initialized as the condition for the execution of THD::init_for_queries() within start_wsrep_THD(), as use of latter could still leave some room for race.
* | MDEV-6066: Merge new defaults from 5.6 and 5.7Sergei Golubchik2015-09-041-2/+2
| | | | | | | | cosmetic fixes. test fixes.
* | MDEV-6066: Merge new defaults from 5.6 and 5.7 (autoset)Oleksandr Byelkin2015-09-041-5/+45
| | | | | | | | --autoset- command line prefix added
* | cleanup: my_checksumSergei Golubchik2015-09-041-4/+0
| | | | | | | | | | remove my_crc_dbug_check (gdb can do it itself). use 0 instead of my_checkum(0, 0, 0) - just as 10.0 does now.
* | New encryption API. Piece-wise encryption.Sergei Golubchik2015-09-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Instead of encrypt(src, dst, key, iv) that encrypts all data in one go, now we have encrypt_init(key,iv), encrypt_update(src,dst), and encrypt_finish(dst). This also causes collateral changes in the internal my_crypt.cc encryption functions and in the encryption service. There are wrappers to provide the old all-at-once encryption functionality. But binlog events are often written piecewise, they'll need the new api.
* | Merge branch '10.0' into 10.1Sergei Golubchik2015-09-036-26/+83
|\ \ | |/ | | | | | | referenced_by_foreign_key2(), needed for InnoDB to compile, was taken from 10.0-galera
| * Fixed overrun in key cache if one tried to allocate a key cacheMonty2015-08-132-11/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | of more than 45G with a key_cache_block_size of 1024 or less. The problem was that some of the arguments to my_multi_malloc() got to be more than 4G. Fix: - Inntroduced my_multi_malloc_large() that can handle big regions. - Changed MyISAM and Aria key caches to use my_multi_malloc_large(). I didn't change the default my_multi_malloc() as this would be a too big patch and we don't allocate 4G blocks anywhere else.
| * Merge branch '5.5' into 10.0Sergei Golubchik2015-08-051-1/+2
| |\ | | | | | | | | | 5.5 without InnoDB/XtraDB changes
| | * Merge tag 'mysql-5.5.45' into 5.5Sergei Golubchik2015-08-011-1/+2
| | |\
| | | * Bug#19660891 HANDLE_FATAL_SIGNAL (SIG=11) IN QUEUE_INSERTTor Didriksen2015-06-171-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | Backport from 5.6 to 5.5 This makes filesort robust to misc variants of order by / group by on columns/expressions with zero length.
| | | * Bug#19974500: SERVER 5.5 / DEBUG DOESN\'T COMPILE WITH GCC 4.9.1Jon Olav Hauglid2014-11-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix broken gcc 4.9.1 debug build by removing end of line noise. In 5.6+ this issue was already fixed by: ------------------------------------------------------------ revno: 3091 committer: Davi Arnaut <davi.arnaut@oracle.com> branch nick: mysql-trunk timestamp: Mon 2011-05-16 11:30:54 -0300 message: Fix warnings emitted by Clang.
| | | * Bug #18808072 MYSQLBINLOG USES LOCALTIME() TO PRINT EVENTS, CAUSES KERNEL ↵Venkatesh Duggirala2014-10-081-23/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MUTEX CONTENTION Problem: For every event read, mysqlbinlog calls localtime() which in turn calls stat(/etc/localtime) which is causing kernel mutex contention. Analysis and Fix: localtime() calls stat(/etc/localtime) for every instance of the call where as localtime_r() the reentrant version was optimized to store the read only tz internal structure. Hence it will not call stat(/etc/localtime). It will call only once at the beginning. The mysql server is calling localtime_r() and mysqlbinlog tool is one place where we are still using localtime(). Once the process (mysqlbinlog) is started if timezone is changed it will be not picked up the the process and it will continue with the same values as the beginning of the process. This behavior is in-lined with mysql server. Also adding localtime_r() and gmtime_r() support for windows.
| | | * Bug#18207212 : FILE NAME IS NOT ESCAPED IN BINLOG FOR LOAD DATA INFILE STATEMENTNeeraj Bisht2014-05-151-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Load_log_event::print_query() function does not put escape character in file name for "LOAD DATA INFILE" statement. Analysis: When we have "'" in our file name for "LOAD DATA INFILE" statement, Load_log_event::print_query() function does not put escape character in our file name. This one result that when we show binary-log, we get file name without escape character. Solution: To put escape character when we have "'" in file name, for this instead of using simple memcpy() to put file-name, we will use pretty_print_str().
| | | * Backport from trunk:Tor Didriksen2014-05-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#18187290 ISSUE WITH BUILDING MYSQL USING CMAKE 2.8.12 We want to upgrade to VS2013 on Windows. In order to do this, we need to upgrade to cmake 2.8.12 This has introduced some incompatibilities for .pdb files, and "make install" no longer works. To reproduce: cmake --build . --target package --config debug The fix: Rather than installing .pdb files for static libraries, we use the /Z7 flag to store symbolic debugging information in the .obj files.
| | | * Bug #17514920 MYSQL_THREAD_INIT() CALL WITHOUT MYSQL_INIT() IS CRASHING IN ↵Igor Solodovnikov2014-04-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WINDOWS It is error to call mysql_thread_init() before libmysql is initialized with mysql_library_init(). Thus to fix this bug we need to detect if library was initialized and return error result if mysql_thread_init() is called with uninitialized library. Fixed by checking my_thread_global_init_done and returning nonzero if the library is not initialized.
| | | * Updated/added copyright header. Added line "use is subject to license terms" Murthy Narkedimilli2014-02-175-0/+5
| | | | | | | | | | | | | | | | to copyright header.
| | | * Updated/added copyright headersMurthy Narkedimilli2014-01-0627-27/+43
| | | |
| | | * Bug#16316074 RFE: MAKE TMPDIR A BUILD-TIME CONFIGURABLE OPTIONTor Didriksen2013-12-182-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#68338 RFE: make tmpdir a build-time configurable option Background: Some distributions use tmpfs for mounting /tmp by default, which has some advantages, but brings also new issues. Fedora started using tmpfs on /tmp in version 18 for example. If not configured otherwise in my.cnf, MySQL uses system's constant P_tmpdir expanded to /tmp on Linux. This can introduce some problems with limited space in /tmp and also some data loss in case of replication slave [1]. In case distributions would like to use /var/tmp, which should be better for MySQL purposes, then we have to patch the source or change tmpdir option in my.cnf, which is however not updated in case it has already existed. Thus, it would be useful to be able to specify default tmpdir path using a configure option, while using P_tmpdir in case it is not defined explicitly. Based on a contribution from Honza Horak
| | | * Bug#17702677 WRONG INSTRUMENTATION INTERFACE FOR MYSQL_COND_TIMEDWAITChristopher Powers2013-11-071-2/+2
| | | | | | | | | | | | Fix Windows build break
| | | * Bug 13878021 - WINDOWS PACKAGE THAT INCLUDES .PDB FILES FOR INTERMEDIATE ↵Sreedhar.S2013-10-091-0/+5
| | | | | | | | | | | | | | | | LIBRARIES USED
| | | * Bug #16978278 : BUFFER OVERFLOW WHEN PRINTING A LARGE 64-BIT INTEGERmithun2013-09-101-2/+2
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | WITH MY_B_VPRINTF() [Merge from 5.1]
| | | | * Bug #16978278 : BUFFER OVERFLOW WHEN PRINTING A LARGE 64-BIT INTEGERmithun2013-09-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WITH MY_B_VPRINTF() Issue : In LP 64 machine max long value can be 20 digit decimal value. But in my_b_vprintf() the intermediate buffer storage used is 17 bytes length. This will lead to buffer overflow. Solution : Increased the buffer storage from 17 to 32 bytes. code is backported from 5.6
| | | * | Bug#16865959 - PLEASE BACKPORT BUG 14749800.Praveenkumar Hulakund2013-07-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since log_throttle is not available in 5.5. Logging of error message for failure of thread to create new connection in "create_thread_to_handle_connection" is not backported. Since, function "my_plugin_log_message" is not available in 5.5 version and since there is incompatibility between sql_print_XXX function compiled with g++ and alog files with gcc to use sql_print_error, changes related to audit log plugin is not backported.
| | | * | merge back to the 5.5 tree and fix indentationGeorgi Kodinov2013-06-281-1/+11
| | | |\ \
| | | | * | Bug #16996656: UNIQUE OPTION PREFIXES NOT DEPRECATED IN 5.5+Georgi Kodinov2013-06-261-1/+11
| | | |/ / | | | | | | | | | | Backported the deprecation warnings from WL#6978 to 5.5
| | | * | Bug#16729109: FIX COMPILATION WARNINGS WITH GCC 4.8Tor Didriksen2013-06-141-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Backport to 5.5 (external Bug#69407 Build warnings with mysql)
| | | * | Bug#16194302: SUPPORT FOR FLOATING-POINT SYSTEM VARIABLESAshish Agarwal2013-05-191-5/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | USING THE PLUGIN INTERFACE. ISSUE: No support for floating-point plugin system variables. SOLUTION: Allowing plugins to define and expose floating-point system variables of type double. MYSQL_SYSVAR_DOUBLE and MYSQL_THDVAR_DOUBLE are added. ISSUE: Fractional part of the def, min, max values of system variables are ignored. SOLUTION: Adding functions that are used to store the raw representation of a double in the raw bits of unsigned longlong in a way that the binary representation remains the same.
| | | * | Bug#16626742 IN MY_MD5FINAL IN MYSYS/MD5.C, CTX IS NOT PROPERLY ZEROED AS ↵Tor Didriksen2013-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | INTENDED Zero out the entire struct, rather than the first sizeof(void*) bytes.
| | | * | Merge from mysql-5.1 to mysql-5.5Sujatha Sivakumar2013-03-282-2/+13
| | | |\ \ | | | | |/
| | | | * Bug#14324766:PARTIALLY WRITTEN INSERT STATEMENT IN BINLOGSujatha Sivakumar2013-03-282-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NO ERRORS REPORTED Problem: ======= Errors from my_b_fill are ignored. MYSQL_BIN_LOG::write_cache code assumes that 0 returned from my_b_fill always means end-of-cache, but that is incorrect. It can result in error and the error is ignored. Other callers of my_b_fill don't check for error: my_b_copy_to_file, maybe my_b_gets. Fix: === An error handler is already present to check the "cache" error that is reported during "MYSQL_BIN_LOG::write_cache" call. Hence error handlers are added for "my_b_copy_to_file" and "my_b_gets". During my_b_fill() function call, when the cache read fails info->error= -1 is set. Hence a check for "info->error" is added for the above to callers upon their return.
| | | | * Bug 16395495 - OLD FSF ADDRESS IN GPL HEADERMurthy Narkedimilli2013-03-1975-75/+75
| | | | |
| | | | * Updated/added copyright headers.Murthy Narkedimilli2013-02-2581-85/+81
| | | | |
| | | * | Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADERMurthy Narkedimilli2013-03-1929-29/+29
| | | | |
| | | * | BUG#11753923-SQL THREAD CRASHES ON DISK FULLVenkatesh Duggirala2013-03-012-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixing post push issue Simulator name used needs to be changed to make it work properly. Analysis: Debug control list addition (ListAddDel function dbug.c file) code was written in such a way that if new element is subset of already existing element, then the new element is not added. i.e., set @@global.debug = '+d,abcd', is existing in the list then you cannot add "a" or "ab" or "abc" in the list.
| | | * | Bug #11752803 SERVER CRASHES IF MAX_CONNECTIONS DECREASED BELOW Venkata Sidagam2013-01-241-14/+8
| | | |\ \ | | | | |/ | | | | | | | | | | | | | | | CERTAIN LEVEL Merging from 5.1 to 5.5
| | | | * Bug #11752803 SERVER CRASHES IF MAX_CONNECTIONS DECREASED BELOW Venkata Sidagam2013-01-241-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CERTAIN LEVEL Problem description: mysqld crashes when we update the max_connections variable to lesser value than the number of currently open connections. Analysis: The "alarm_queue.max_elements" size will be decided at the server start time and it will get modified if we change max_connections value. In the current scenario the value of "alarm_queue.max_elements" is decremented when the max_connections is set to 2. When updating the "alarm_queue.max_elements" value we are not updating "max_used_alarms" value. Hence, instead of getting the warning "thr_alarm queue is full" it is ending up in asserting the server at the time of inserting new elements in the queue. Fix: the fix is to dynamically increase the size of the alarm_queue. In order to do that, queue_insert_safe() should be used instead if queue_insert().
| | | * | Bug#11757464:SERVER CRASH IN RECURSIVE CALL WHEN OOMNisha Gopalakrishnan2013-01-154-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Analysis: --------- When the server is out of memory, an error is raised to indicate the same. Handling the error requires more memory to be allocated which fails, hence the error handling loops in a recursion and causes the server to crash. Fix: --- a) Prevents pushing the 'out of memory' error condition to the diagnostic area as it requires memory allocation. GET DIAGNOSTICS, SHOW WARNINGS and SHOW ERRORS statements will not show information about this error. However the 'out of memory' error is returned to the client. b) It sets the ME_FATALERROR flag when 'out of memory' errors are reported (for places where the flag is not already set). This flag prevents activation of SP error handlers which also require memory allocation and therefore are likely to fail.
| | | * | Merge of patch for Bug#16066243 from mysql-5.1.Nirbhay Choubey2013-01-072-6/+8
| | | |\ \ | | | | |/
| | | | * Bug#16066243 PB2 FAILURES I_MAIN.BUG15912213 ANDNirbhay Choubey2013-01-072-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I_MAIN.CTYPE_UTF8 FOR MACOSX10.6 FOR 5.1 Part 2: Fix for test failures on Windows.
| | | * | Merge of patch for bug#16066243 from mysql-5.1.Nirbhay Choubey2013-01-041-2/+3
| | | |\ \ | | | | |/
| | | | * Bug#16066243 PB2 FAILURES I_MAIN.BUG15912213 ANDNirbhay Choubey2013-01-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I_MAIN.CTYPE_UTF8 FOR MACOSX10.6 FOR 5.1 While converting directory name to filename, a file separator (FN_LIBCHAR) might get appended to the resulting file name. This can result in off-by-one error when length of the input string is equal to FN_REFLEN. In this case, the terminating '\0' gets written beyond the buffer allocated to store the result. Fixed by incrementing the dst buffer size by 1. As extra safety, switched to strnmov() and added a debug assert to check the length of the input file name. No test case added as the scenario is already covered by the test cases added for bugs in the description.
| | | * | BUG#11753923-SQL THREAD CRASHES ON DISK FULLVenkatesh Duggirala2013-01-023-6/+44
| | | |\ \ | | | | |/ | | | | | Merging fix from mysql-5.1