summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Bug #45058 init_available_charsets uses double checked lockingStaale Smedseng2010-02-261-1/+1
| | | | | | | | | | | A client doing multiple mysql_library_init() and mysql_library_end() calls over the lifetime of the process may experience lost character set data, potentially even a SIGSEGV. This patch reinstates the reloading of character set data when a mysql_library_init() is done after a mysql_library_end().
* Merging from 5.0-bugteamStaale Smedseng2010-01-271-1/+1
|\
* \ mergeGeorgi Kodinov2009-12-241-6/+3
|\ \ | |/
| * Bug #48866: mysql.test fails under Fedora 12Georgi Kodinov2009-12-161-6/+3
| | | | | | | | | | | | | | | | strmov() is not guaranteed to work correctly on overlapping source and destination buffers. On some OSes it may work, but Fedora 12 has a stpcpy() that's not working correctly on overlapping buffers. Fixed to use the overlap-safe version of strmov instead. Re-vitalized the overlap-safe version of strmov.
* | Bug#43397 mysql headers redefine pthread_mutex_init Staale Smedseng2009-12-201-1/+1
| | | | | | | | | | | | | | unnecessarily Changing an instance of the define that was missed in the original commit due to the fact that it was misspelled.
* | merge mysql-5.0-bugteam to mysql-5.1-bugteamSatya B2009-12-172-1/+4
|\ \ | |/
| * Fix for Bug#37408 - Compressed MyISAM files should not require/use mmap()Satya B2009-12-172-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When compressed myisam files are opened, they are always memory mapped sometimes causing memory swapping problems. When we mmap the myisam compressed tables of size greater than the memory available, the kswapd0 process utilization is very high consuming 30-40% of the cpu. This happens only with linux kernels older than 2.6.9 With newer linux kernels, we don't have this problem of high cpu consumption and this option may not be required. The option 'myisam_mmap_size' is added to limit the amount of memory used for memory mapping of myisam files. This option is not dynamic. The default value on 32 bit system is 4294967295 bytes and on 64 bit system it is 18446744073709547520 bytes. Note: Testcase only tests the option variable. The actual bug has be to tested manually.
* | Bug #45058 init_available_charsets uses double checked lockingStaale Smedseng2009-12-123-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As documented in the bug report, the double checked locking pattern has inherent issues, and cannot guarantee correct initialization. This patch replaces the logic in init_available_charsets() with the use of pthread_once(3). A wrapper function, my_pthread_once(), is introduced and is used in lieu of direct calls to init_available_charsets(). Related defines MY_PTHREAD_ONCE_* are also introduced. For the Windows platform, the implementation in lp:sysbench is ported. For single-thread use, a simple define calls the function and sets the pthread_once control variable. Charset initialization is modified to use my_pthread_once().
* | Merge from 5.0Staale Smedseng2009-12-061-1/+1
|\ \ | |/
* | Post-merge fix for bug 41728: revert fix that was pushed in mistake to 5.1 ↵Davi Arnaut2009-11-242-20/+0
| | | | | | | | and up.
* | Bug#47571 : idle named pipe connection is unkillableVladislav Vaintroub2009-11-201-2/+2
| | | | | | | | implement Davi's review suggestions (post-push fixes)
* | mergeVladislav Vaintroub2009-11-033-0/+24
|\ \
| * \ Automerge.Davi Arnaut2009-11-022-0/+20
| |\ \ | | |/
| | * Bug#41728: Dropped symbol but no soname changeDavi Arnaut2009-09-292-72/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restore a stub of the removed mysql_odbc_escape_string function to fix a ABI breakage. The function was intended to be private and used only by Connector/ODBC, but, unfortunately, it was exported as part of the ABI. Nonetheless, only a stub is restored as the original function is inherently broken and shouldn't be used. This restoration only applies to MySQL 5.0. This will be addressed differently in later versions -- reworked library versioning.
| * | A follow-up to fix forSergey Vojtovich2009-10-271-0/+4
| | | | | | | | | | | | | | | | | | | | | BUG#47073 - valgrind errs, corruption,failed repair of partition, low myisam_sort_buffer_size Fixed race conditions discovered with the provided test case and stabilized test case.
* | | Bug#47571: idle named pipe connection is unkillableVladislav Vaintroub2009-11-021-2/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#31621: Windows server hanging during shutdown using named pipes and idle connection Problem: when idle pipe connection is forcefully closed with KILL statement or when the server goes down, thread that is closing connection would hang infinitely in CloseHandle(). The reason for the hang is that named pipe operations are performed synchronously. In this mode all IOs on pipe are serialized, that is CloseHandle() will not abort ReadFile() in another thread, but wait for ReadFile() to complete. The fix implements asynchrnous mode for named pipes, where operation of file are not synchronized. Read/Write operation would fire an async IO and wait for either IO completion or timeout. Note, that with this patch timeouts are properly handled for named pipes. Post-review: Win32 timeout code has been fixed for named pipes and shared memory. We do not store pointer to NET in vio structure, only the read and write timeouts.
* | Bug#47857 strip_sp function in mysys/mf_strip.c never used and cause name clashMagnus Blåudd2009-10-061-1/+0
| | | | | | - Remove mf_strip.c and the declaration of 'strip_sp'
* | WL#4259 - Debug Sync FacilityIngo Struewing2009-09-291-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport from 6.0 to 5.1. Only those sync points are included, which are used in debug_sync.test. The Debug Sync Facility allows to place synchronization points in the code: open_tables(...) DEBUG_SYNC(thd, "after_open_tables"); lock_tables(...) When activated, a sync point can - Send a signal and/or - Wait for a signal Nomenclature: - signal: A value of a global variable that persists until overwritten by a new signal. The global variable can also be seen as a "signal post" or "flag mast". Then the signal is what is attached to the "signal post" or "flag mast". - send a signal: Assign the value (the signal) to the global variable ("set a flag") and broadcast a global condition to wake those waiting for a signal. - wait for a signal: Loop over waiting for the global condition until the global value matches the wait-for signal. Please find more information in the top comment in debug_sync.cc or in the worklog entry.
* | Bug #43414 Parenthesis (and other) warnings compiling MySQLStaale Smedseng2009-09-231-3/+3
| | | | | | | | | | | | with gcc 4.3.2 Cleaning up warnings not present in 5.0.
* | Merge from 5.0Staale Smedseng2009-09-171-6/+0
|\ \ | |/
| * Bug #43414 Parenthesis (and other) warnings compiling MySQLStaale Smedseng2009-09-171-6/+0
| | | | | | | | | | | | | | | | with gcc 4.3.2 This is the fifth patch cleaning up more GCC warnings about variables used before initialized using the new macro UNINIT_VAR().
| * Bug#17332 - changing key_buffer_size on a running serverIngo Struewing2009-09-071-0/+6
| | | | | | | | | | | | | | | | | | | | can crash under load Backport from 5.1. Does also include key cache fixes from: Bug 44068 (RESTORE can disable the MyISAM Key Cache) Bug 40944 (Backup: crash after myisampack)
* | Add DBUG_VIOLATION_HELPER_LEAVE definition to non-debug build.Alexander Nozdrin2009-09-101-0/+1
| |
* | A patch for Bug#45118 (mysqld.exe crashed in debug modeAlexander Nozdrin2009-09-101-4/+47
| | | | | | | | | | on Windows in dbug.c) -- part 2: a patch for the DBUG subsystem to detect misuse of DBUG_ENTER / DBUG_RETURN macros. 5.1 version.
* | merge mysql-5.0-bugteam to mysql-5.1-bugteamSatya B2009-09-031-0/+1
|\ \ | |/
| * Fix for BUG#46591 - .frm file isn't sync'd with sync_frm enabled for Satya B2009-09-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | CREATE TABLE...LIKE... The mysql server option 'sync_frm' is ignored when table is created with syntax CREATE TABLE .. LIKE.. Fixed by adding the MY_SYNC flag and calling my_sync() from my_copy() when the flag is set. In mysql_create_table(), when the 'sync_frm' is set, MY_SYNC flag is passed to my_copy(). Note: TestCase is not attached and can be tested manually using debugger.
* | Merge from 5.0 for 43414Staale Smedseng2009-08-281-0/+19
|\ \ | |/
| * Bug #43414 Parenthesis (and other) warnings compiling MySQLStaale Smedseng2009-08-281-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with gcc 4.3.2 This patch fixes a number of GCC warnings about variables used before initialized. A new macro UNINIT_VAR() is introduced for use in the variable declaration, and LINT_INIT() usage will be gradually deprecated. (A workaround is used for g++, pending a patch for a g++ bug.) GCC warnings for unused results (attribute warn_unused_result) for a number of system calls (present at least in later Ubuntus, where the usual void cast trick doesn't work) are also fixed.
* | Merge mysql-5.1-innodb_plugin to mysql-5.1.Sergey Vojtovich2009-08-114-10/+33
|\ \
| * \ Merge 5.1-bugteam -> 5.1-innodb_plugin.Sergey Vojtovich2009-07-144-4/+5
| |\ \
| * | | Backport WL#3653 to 5.1 to enable bundled innodb plugin.Vladislav Vaintroub2009-06-104-10/+33
| | | | | | | | | | | | | | | | | | | | Remove custom DLL loader code from innodb plugin code, use symbols exported from mysqld.
* | | | Auto-mergeIgnacio Galarza2009-07-312-2/+4
|\ \ \ \ | | |_|/ | |/| |
| * | | Bug#17270 - mysql client tool could not find ../share/charsets folder and fails.Ignacio Galarza2009-07-312-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Define and pass compile time path variables as pre-processor definitions to mimic the makefile build. - Set new CMake version and policy requirements explicitly. - Changed DATADIR to MYSQL_DATADIR to avoid conflicting definition in Platform SDK header ObjIdl.h which also defines DATADIR.
* | | | Bug#45800 crash when replacing into a merge table and there is a duplicateV Narayanan2009-07-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A REPLACE in the MERGE engine is actually a REPLACE into one (FIRST or LAST) of the underlying MyISAM tables. So in effect the server works on the meta data of the MERGE table, while the real insert happens in the MyISAM table. The MERGE table has no index, while MyISAM has a unique index. When a REPLACE into a MERGE table ( and the REPLACE conflicts with a duplicate in a child table) is done, we try to access the duplicate key information for the MERGE table. This information actually does not exist, hence this results in a crash. The problem can be resolved by modifying the MERGE engine to provide us the duplicate key information directly, instead of just returning the MyISAM index number as the error key. Then the SQL layer (or "the server") does not try to access the key_info of the MERGE table, which does not exist. The current patch modifies the MERGE engine to provide the position for a record where a unique key violation occurs.
* | | | merge 5.0-bugteam to 5.1-bugteamSatya B2009-07-241-1/+2
|\ \ \ \ | |/ / /
| * | | merge to mysql-5.0-bugteamSatya B2009-07-241-1/+9
| |\ \ \
| * | | | Fix for BUG#18828 - If InnoDB runs out of undo slots, Satya B2009-07-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it returns misleading 'table is full' Innodb returns a misleading error message "table is full" when the number of active concurrent transactions is greater than 1024. Fixed by adding errorcode "ER_TOO_MANY_CONCURRENT_TRXS" to the error codes. Innodb should return HA_TOO_MANY_CONCURRENT_TRXS to mysql which is then mapped to ER_TOO_MANY_CONCURRENT_TRXS Note: testcase is not written as this was reproducible only by changing innodb code.
* | | | | Merge from 5.0Staale Smedseng2009-07-231-1/+9
|\ \ \ \ \ | | |/ / / | |/| | |
| * | | | Bug #45770 errors reading server SSL files are printed, butStaale Smedseng2009-07-231-1/+9
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not logged Errors encountered during initialization of the SSL subsystem are printed to stderr, rather than to the error log. This patch adds a parameter to several SSL init functions to report the error (if any) out to the caller. The function init_ssl() in mysqld.cc is moved after the initialization of the log subsystem, so that any error messages can be logged to the error log. Printing of messages to stderr has been retained to get diagnostic output in a client context.
| * | | Bug #45287: phase 2 : 5.0 64 bit compilation warningsGeorgi Kodinov2009-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | Fixed various compilation warnings when compiling on a 64 bit windows.
* | | | automergeGeorgi Kodinov2009-07-161-9/+0
|\ \ \ \ | |/ / / | | | / | |_|/ |/| |
| * | Bug #45287: phase 1 : 32 bit compilation warningsGeorgi Kodinov2009-07-151-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed the following problems: 1. cmake 2.6 warning because of a changed default on how the dependencies to libraries with a specified path are resolved. Fixed by requiring cmake 2.6. 2. Removed an obsolete pre-NT4 hack including defining Windows system defines to alter the behavior of windows.h. 3. Disabled warning C4065 on compiling sql_yacc.cc because of a know incompatibility in some of the newer bison binaries.
* | | Automerge.Alexey Kopytov2009-07-121-1/+2
|\ \ \
| * | | Bug #45796: invalid memory reads and writes when altering merge Alexey Kopytov2009-07-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and base tables myrg_attach_children() could reuse a buffer that was allocated previously based on a definition of a child table. The problem was that the child's definition might have been changed, so reusing the buffer could lead to crashes or valgrind errors under some circumstances. Fixed by changing myrg_attach_children() so that the rec_per_key_part buffer is reused only when the child table have not changed, and reallocated otherwise (the old buffer is deallocated if necessary).
* | | | Bug #43397 mysql headers redefine pthread_mutex_initStaale Smedseng2009-07-081-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unnecessarily The problem is that libmysqlclient.so is built with THREAD undefined, while a client compiling against the same header files will see THREAD as defined and definitions in my_pthread.h will be included, possibly resulting in undefined symbols that cannot be resolved with libmysqlclient.so. The suggested solution is to require that clients wanting to link with libmysqlclient.so should be built with MYSQL_CLIENT_NO_THREADS defined. This requires a documentation change, and more details for this will be supplied if this patch is approved. The MYSQL_CLIENT_NO_THREADS define was renamed from UNDEF_THREADS_HACK, to get a more suitable (less suspicious) name for the define. (The UNDEF_THREADS_HACK is retained for backwards compatibility, though.) This patch is also in anticipation of WL#4958, which will remove this problem altogether by dropping the building of libmysqlclient.
* | | merging with mysql-5.0-bugteamV Narayanan2009-06-191-1/+1
|\ \ \ | |/ /
| * | Bug#43572 Handle failures from hash_initV Narayanan2009-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Failure to allocate memory for the hash->array element, caused hash_init to return without initializing the other members of the hash. Thus although the dynamic array buffer may be allocated at a later point in the code, the incompletely initialized hash caused fatal failures. This patch moves the initialization of the other members of the hash above the array allocation, so that the usage of this hash will not result in fatal failures.
| * | MySQL 5.0 backport of Chad Miller's patch for Bug#34309:Davi Arnaut2009-05-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#34309: '_PC' macro redefinition For reasons that are now a mystery, we had defined a CPP symbol to help ancient compilers work better (in some way that's lost to history). This interferes with at least one modern compiler. Now, don't define the _PC symbol. Those other underscore-leading symbols are suspect also, but at least the names aren't inscrutable. Let's leave them for now.
| * | Updates to build with community features enabled for community builds.MySQL Build Team2009-05-201-3/+0
| | |
| * | Merge community up to enterprise, thus ending the community-serverChad MILLER2009-05-062-0/+4
| |\ \ | | | | | | | | | | | | adventure.