summaryrefslogtreecommitdiff
path: root/dbug
Commit message (Collapse)AuthorAgeFilesLines
* MergeKent Boortz2010-12-291-0/+15
|\
| * MergeKent Boortz2010-12-291-0/+15
| |\
| | * - Added/updated copyright headersKent Boortz2010-12-281-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removed files specific to compiling on OS/2 - Removed files specific to SCO Unix packaging - Removed "libmysqld/copyright", text is included in documentation - Removed LaTeX headers for NDB Doxygen documentation - Removed obsolete NDB files - Removed "mkisofs" binaries - Removed the "cvs2cl.pl" script - Changed a few GPL texts to use "program" instead of "library"
| | * Bug #45287: phase 2 : 5.0 64 bit compilation warningsGeorgi Kodinov2009-07-161-6/+7
| | | | | | | | | | | | | | | | | | Fixed various compilation warnings when compiling on a 64 bit windows.
| * | Bug #58426 Crashing tests not failing as they are supposed to on Solaris 10 ↵Tor Didriksen2010-12-131-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | debug On this platform we seem to get lots of other signals while waiting for SIGKILL to be delivered. Solution: use sigsuspend(<all signals blocked>) dbug/dbug.c: New function _db_suicide_() which does kill(myself, -9) and then waits forever. include/my_dbug.h: Let DBUG_SUICE wait forever until the KILL signal is delivered, and process dies.
* | | Automerge 5.1-bugteam => 5.5-bugteamTor Didriksen2010-12-131-0/+19
|\ \ \
| * | | Bug #58426 Crashing tests not failing as they are supposed to on Solaris 10 ↵Tor Didriksen2010-12-131-0/+19
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | debug On this platform we seem to get lots of other signals while waiting for SIGKILL to be delivered. Solution: use sigsuspend(<all signals blocked>) dbug/dbug.c: New function _db_suicide_() which does kill(myself, -9) and then waits forever. include/my_dbug.h: Let DBUG_SUICE wait forever until the KILL signal is delivered, and process dies.
* | | WL#5665: Removal of the autotools-based build systemDavi Arnaut2010-11-201-68/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The autotools-based build system has been superseded and is being removed in order to ease the maintenance burden on developers tweaking and maintaining the build system. In order to support tools that need to extract the server version, a new file that (only) contains the server version, called VERSION, is introduced. The file contents are human and machine-readable. The format is: MYSQL_VERSION_MAJOR=5 MYSQL_VERSION_MINOR=5 MYSQL_VERSION_PATCH=8 MYSQL_VERSION_EXTRA=-rc The CMake based version extraction in cmake/mysql_version.cmake is changed to extract the version from this file. The configure to CMake wrapper is retained for backwards compatibility and to support the BUILD/ scripts. Also, a new a makefile target show-dist-name that prints the server version is introduced. VERSION: Add top-level version file. cmake/mysql_version.cmake: Get version information from the top-level VERSION file. Do not cache the version components (MAJOR_VERSION, etc). Add MYSQL_RPM_VERSION as a replacement for MYSQL_U_SCORE_VERSION.
* | | Merge from mysql-5.1-bugteam to mysql-5.5-bugteamJon Olav Hauglid2010-10-191-0/+1
|\ \ \ | |/ / | | | | | | No conflicts
| * | Bug #57274 SET GLOBAL debug crashes on Solaris in embedded server modeJon Olav Hauglid2010-10-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (variables_debug fails) The problem was that "SET GLOBAL debug" could cause a crash on Solaris. The crash happened if the server failed to open the trace file given in the "SET GLOBAL debug" statement. This caused an error message to be printed to stderr containing the process name. However, printing to stderr crashed the server since the pointer to the process name had not been initialized. This patch fixes the problem by initializing the process name properly when doing "SET GLOBAL debug". No test case added as this bug was repeatable with existing test coverage in variables_debug.test.
* | | automerge from 5.1-bugteam: Bug#52172 post-push fix: init auto-variable to NULLTor Didriksen2010-10-191-1/+1
|\ \ \ | |/ /
| * | Bug#52172 post-push fix: init auto-variable to NULLTor Didriksen2010-10-191-1/+1
| | |
| * | Bug#52172 test binlog.binlog_index needs --skip-core-file to avoid leaving ↵Tor Didriksen2010-10-181-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | core files For crash testing: kill the server without generating core file. include/my_dbug.h Use kill(getpid(), SIGKILL) which cannot be caught by signal handlers. All DBUG_XXX macros should be no-ops in optimized mode, do that for DBUG_ABORT as well. sql/handler.cc Kill server without generating core. sql/log.cc Kill server without generating core.
* | | Manual merge from mysql-5.1-bugteam into mysql-5.5-bugteam.Alexey Kopytov2010-10-021-2/+3
|\ \ \ | |/ / | | | | | | | | | | | | | | | conflicts: conflict dbug/dbug.c conflict sql/sql_load.cc
| * | Bug #56709: Memory leaks at running the 5.1 test suiteAlexey Kopytov2010-09-221-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed a number of memory leaks discovered by valgrind. dbug/dbug.c: This is actually an addendum to the fix for bug #52629: - there is no point in limiting the fix to just global variables, session ones are also affected. - zero all fields when allocating a new 'state' structure so that FreeState() does not deal with unitialized data later. - add a check for a NULL pointer in DBUGCloseFile() mysql-test/r/partition_error.result: Added a test case for bug #56709. mysql-test/r/variables_debug.result: Added a test case for bug #56709. mysql-test/t/partition_error.test: Added a test case for bug #56709. mysql-test/t/variables_debug.test: Added a test case for bug #56709. sql/item_timefunc.cc: There is no point in declaring 'value' as a member of Item_extract and dynamically allocating memory for it in Item_extract::fix_length_and_dec(), since this string is only used as a temporary storage in Item_extract::val_int(). sql/item_timefunc.h: Removed 'value' from the Item_extract class definition. sql/sql_load.cc: - we may need to deallocate 'buffer' even when 'error' is non-zero in some cases, since 'error' is public, and there is external code modifying it. - assign NULL to buffer when deallocating it so that we don't do it twice in the destructor - there is no point in changing 'error' in the destructor.
* | | Bug #46165 server crash in dbugJon Olav Hauglid2010-09-281-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This crash occured if the same debug trace file was closed twice, leading to the same memory being free'd twice. This could occur if the "debug" server system variable refered to the same trace file in both global and session scope. Example of an order of events that would lead to a crash: 1) Enable debug tracing to a trace file (global scope) 2) Enable debug tracing to the same trace file (session scope) 3) Reset debug settings (global scope) 4) Reset debug settings (session scope) This caused a crash because the trace file was, by mistake, closed in 3), leading to the same memory being free'd twice when the file was closed again in 4). Internally, the debug settings are stored in a stack, with session settings (if any) on top and the global settings below. Each connection has its own stack. When a set of settings is changed, it must be determined if its debug trace file is to be closed. Before, this was done by only checking below on the settings stack. So if the global settings were changed, an existing debug trace file reference in session settings would be missed. This caused the file to be closed even if it was in use, leading to a crash later when it was closed again. This patch fixes the problem by preventing the trace file from being shared between global and session settings. If session debug settings are set without specifying a new trace file, stderr is used for output. This is a change in behaviour and should be reflected in the documentation. Test case added to variables.test.
* | | Fix for Bug#54478 "mysqld crashes during boot when running mtr with --debug ↵Olav Sandstaa2010-09-151-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | option" The crash during boot was caused by a DBUG_PRINT statement in fill_schema_schemata() (in sql_show.cc). This DBUG_PRINT statement contained several instances of %s in the format string and for one of these we gave a NULL pointer as the argument. This caused the call to vsnprintf() to crash when running on Solaris. The fix for this problem is to replace the call to vsnprintf() with my_vsnprintf() which handles that a NULL pointer is passed as argumens for %s. This patch also extends my_vsnprintf() to support %i in the format string. dbug/dbug.c: Replace the use of vsnprintf() with my_vsnprintf(). On some platforms vsnprintf() did not handle that a NULL pointer was given as an argument for a %s in the format string. include/mysql/service_my_snprintf.h: Add support for %i in format string to my_vsnprintf(). strings/my_vsnprintf.c: Add support for %i in format string to my_vsnprintf(). unittest/mysys/my_vsnprintf-t.c: Add unit tests for %i in format string to my_vsnprintf().
* | | Patch for Bug#55854 (MySQL AB should not be AUTHOR, copyright incorrect).Alexander Nozdrin2010-08-121-2/+2
| | | | | | | | | | | | Fixing copyright text.
* | | Merge of mysql-trunk-bugfixing into mysql-trunk-merge.Davi Arnaut2010-07-156-244/+9
|\ \ \
| * | | WL#5486: Remove code for unsupported platformsDavi Arnaut2010-07-152-200/+5
| | | | | | | | | | | | | | | | Remove MS-DOS specific code.
| * | | Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabledDavi Arnaut2010-07-085-44/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Essentially, the problem is that safemalloc is excruciatingly slow as it checks all allocated blocks for overrun at each memory management primitive, yielding a almost exponential slowdown for the memory management functions (malloc, realloc, free). The overrun check basically consists of verifying some bytes of a block for certain magic keys, which catches some simple forms of overrun. Another minor problem is violation of aliasing rules and that its own internal list of blocks is prone to corruption. Another issue with safemalloc is rather the maintenance cost as the tool has a significant impact on the server code. Given the magnitude of memory debuggers available nowadays, especially those that are provided with the platform malloc implementation, maintenance of a in-house and largely obsolete memory debugger becomes a burden that is not worth the effort due to its slowness and lack of support for detecting more common forms of heap corruption. Since there are third-party tools that can provide the same functionality at a lower or comparable performance cost, the solution is to simply remove safemalloc. Third-party tools can provide the same functionality at a lower or comparable performance cost. The removal of safemalloc also allows a simplification of the malloc wrappers, removing quite a bit of kludge: redefinition of my_malloc, my_free and the removal of the unused second argument of my_free. Since free() always check whether the supplied pointer is null, redudant checks are also removed. Also, this patch adds unit testing for my_malloc and moves my_realloc implementation into the same file as the other memory allocation primitives. client/mysqldump.c: Pass my_free directly as its signature is compatible with the callback type -- which wasn't the case for free_table_ent.
* | | | Unset the execute bit where it's not needed.Davi Arnaut2010-07-031-0/+0
| | | |
* | | | Fix for Bug#53925 (valgrind failures in rpl.rpl_get_master_version_and_clockAlexander Nozdrin2010-05-241-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in mysql-trunk-merge). There were two problems: - a mistake during merge of a patch for Bug 52629 from 5.1; - MTR treated auxilary output of newer valgrind as an error. The fixes are: - Fix merge error; - Teach MTR to skip 'HEAP summary' section of valgrind output.
* | | | Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.Alexey Kopytov2010-05-241-3/+0
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: conflict Makefile.am conflict mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result conflict mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test conflict sql/opt_sum.cc conflict sql/set_var.cc conflict sql/sql_base.cc conflict sql/sql_priv.h conflict sql/sql_show.cc
| * | | Bug#52884 mysql-test-run does not work with --debug optionSergey Glukhov2010-05-201-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Server crashes on 64bit linux with 'double free or corruption' message, on 32bit mysql-test-run silently fails on bootstrap stage. The problem is that FreeState() is called twice for init_settings struct in _db_end_ function. The fix is to remove superfluous FreeState() call. Additional fix: fixed discrepancy of result file when debug & valgrind options are enabled for MTR. dbug/dbug.c: The problem is that FreeState() is called twice for init_settings struct in _db_end_ function. The fix is to remove superfluous FreeState() call. mysql-test/r/variables_debug.result: fixed discrepancy of result file when debug & valgrind options are enabled for MTR. mysql-test/t/variables_debug.test: fixed discrepancy of result file when debug & valgrind options are enabled for MTR. sql/set_var.cc: fixed discrepancy of result file when debug & valgrind options are enabled for MTR.
* | | | Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.Alexey Kopytov2010-04-301-1/+10
|\ \ \ \ | |/ / / | | / / | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Text conflict in configure.in Text conflict in dbug/dbug.c Text conflict in mysql-test/r/ps.result Text conflict in mysql-test/t/ps.test Text conflict in sql/CMakeLists.txt Text conflict in sql/ha_ndbcluster.cc Text conflict in sql/mysqld.cc Text conflict in sql/sql_plugin.cc Text conflict in sql/sql_table.cc
| * | Bug #52629: memory leak from sys_var_thd_dbug in binlog.binlog_write_errorGeorgi Kodinov2010-04-161-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When re-setting (SET GLOBAL debug='') the GLOBAL debug settings the server was not freeing the data elements from the top (initial) frame before setting them to 0 without freeing the underlying memory. As these are global settings there's a chance that something is there already. Fixed by : 1. making sure the allocated data are cleaned up before re-setting them while parsing a debug string 2. making sure the stuff allocated in the global settings is freed on shutdown.
* | | Merge the changes of the 5.5.3-m3 release buildJoerg Bruehe2010-04-181-1/+1
|\ \ \ | | | | | | | | | | | | | | | | back into the development branches.
| * | | Another case of C++ syntax used for a comment in C.Joerg Bruehe2010-03-151-1/+1
| | | |
* | | | Fix errors when building releaseVladislav Vaintroub2010-03-191-1/+1
|/ / / | | | | | | | | | | | | | | | | | | - package some more perl scripts on Windows (mysqlhotcopy and mysqldumpslow) - do not try to pack .map files (no more produced) - (CMake-unrelated) fix debug build on FreeBSD, trying to use uninitialized attribute MY_MUTEX_INIT_FAST
* | | mergeVladislav Vaintroub2009-12-111-1/+5
|\ \ \
| * | | Use vsnprintf() rather than my_vsnprintf() in DbugVfprintf,Tor Didriksen2009-11-271-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | since support for "%g" and "%f" has not been backported yet. dbug/dbug.c: Use vsnprintf rather than my_vsnprintf.
* | | | implement convenience librariesVladislav Vaintroub2009-11-241-2/+1
| | | |
* | | | WL#5161 : Cross-platform build with CMakeVladislav Vaintroub2009-11-091-8/+8
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BUILD-CMAKE: WL#5161 : Documentation on how to build with CMake on Unix/Windows BUILD/Makefile.am: Add new file BUILD/autorun.sh: WL#5161 : use choose_configure instead of autotools configure script (choose configure will call cmake if cmake is available) BUILD/choose_configure.sh: WL#5161 : use choose_configure instead of autotools configure script (choose configure will call cmake if cmake is available) CMakeLists.txt: WL#5161 : Rewrite top-level CMakeLists.txt. Remove Windows specifics - compiler flags handling moved to configure.cmake - storage engine/plugin stuff moved into cmake/plugin.cmake - copy docs Makefile.am: Added new files client/CMakeLists.txt: WL#5161 : Rewrite CMakeLists.txt to be platform-independent Handle packagng (add INSTALL commands) cmake/Makefile.am: WL#5161 : use choose_configure instead of autotools configure script (choose configure will call cmake if cmake is available) cmake/abi_check.cmake: Custom targets for abi_check (for cmake) cmake/bison.cmake: - Check bison availability - Add RUN_BISON macro (used to create sql_yacc.cc and sql_yacc.h) cmake/cat.cmake: Add helper script to concatenate files. cmake/character_sets.cmake: Handle configuration parameters WITH_EXTRA_CHARSETS cmake/check_minimal_version.cmake: Helper script to check the minimum required version of cmake cmake/configure.pl: Add perl script to convert ./configure parameters for cmake cmake/create_initial_db.cmake.in: Add script helper to create initial database. (on Windows, we pack initial db with the redistribution package) cmake/do_abi_check.cmake: Perform abi check cmake/dtrace.cmake: Handle dtrace in CMake Build. Check for dtrace availablility, run dtrace -G on solaris in prelink step cmake/dtrace_prelink.cmake: Run dtrace -G on Solaris in pre-link step, link the object it creates together with library or executable cmake/install_macros.cmake: Helper macros for packaging (install pdb on Windows, install symlinks on Unix) cmake/make_dist.cmake.in: "make dist" - - pack autotools ./configure script with the source (renamed to configure.am) - pack bison output cmake/merge_archives_unix.cmake.in: script to merge static libraries on Unix cmake/misc.cmake: Build helper macros - MERGE_STATIC_LIBS We use it when building client library and embedded (avoid recompilation) - Convert source file paths to absolute names. We use it in to locate files of a different project, when the files need to be recompiled (e.g in embedded several storage engines are recompiled with -DEMBEDDED_LIBRARY) cmake/mysql_version.cmake: Extract version info from configure.in Handle package names. cmake/plugin.cmake: Rewrote storage/mysql_storage_engine.cmake to handle other types of plugins and do it in OS-independent manner. cmake/readline.cmake: Macros to handle WITH_READLINE/WITH_LIBEDIT parameters cmake/ssl.cmake: Add macros to handle WITH_SSL parameter. cmake/stack_direction.c: Helper to check stack direction. cmake/zlib.cmake: Add macros to handle WITH_ZLIB parameter cmd-line-utils/libedit/CMakeLists.txt: Build libedit with cmake. cmd-line-utils/libedit/Makefile.am: Add new file cmd-line-utils/readline/CMakeLists.txt: Build readline with CMake. cmd-line-utils/readline/Makefile.am: Add new file config.h.cmake: WL#5161 : Add config.h template for cmake configure.cmake: WL#5161 : Add platform tests ( for cmake) configure.in: Added new subdirectories dbug/CMakeLists.txt: WL#5161 extra/CMakeLists.txt: WL#5161 extra/yassl/CMakeLists.txt: WL#5161 extra/yassl/taocrypt/CMakeLists.txt: WL#5161 include/Makefile.am: Add new file include/keycache.h: remove configure-win.h and remove HUGE_PTR defined there. include/my_global.h: use my_config.h for Windows, not config-win.h anymore include/my_pthread.h: - Move thread_safe_increment from config-win.h to other headers (config-win.h is not used anymore) - Declare pthread_cancel on Windows (it is used in daemon_example) include/my_sys.h: Add malloc.h on Windows (we use -D_WIN32_LEAN_AND_MEAN now, and with this define malloc.h is not included automatically via windows.h) include/mysql/plugin.h: Handle pure-C plugins with Microsoft compiler. include/thr_alarm.h: remove rf_SetTimer that used to be defined in config-win.h Replace with UINT_PTR (we do not use config-win.h anymore and typedef was needed in this single place only) libmysql/CMakeLists.txt: Avoid pointless recompilation of source files in client library if possible. Merge static libs (dbug, mysys) to create static client library. libmysqld/CMakeLists.txt: Avoid pointless recompilation of source files when building embedded. Instead, merge dbug and mysys (and some other static libs) into embedded. libmysqld/examples/CMakeLists.txt: Embedded compilation on Unix libmysqld/lib_sql.cc: Do not define THD::clear_error() in lib_sql.cc for embedded. Instead, use the same inline definition from sql_class.h as in none-embedded case (fixes duplicate symbol errors on Windows and removes pointless #ifdef EMBEDDED) man/CMakeLists.txt: Install man files. man/Makefile.am: Add new file. mysql-test/CMakeLists.txt: Install mysql-test files mysql-test/Makefile.am: Add new files mysql-test/lib/My/ConfigFactory.pm: Allow testing with mtr in out-of-source builds. mysql-test/lib/My/Find.pm: the build configurations are now also available on Unix Xcode on Mac uses the Release, RelwithDebinfo and Debug subdirectories for executables. Earlier, build configurations were available only on Windows. mysql-test/lib/My/SafeProcess.pm: Allow testing with mtr in out-of-source builds. mysql-test/lib/My/SafeProcess/CMakeLists.txt: Port CMakeLists.txt to Unix mysql-test/lib/My/SafeProcess/safe_kill_win.cc: add stdlib.h (to be able to compile with -DWIN32_LEAN_AND_MEAN) mysql-test/lib/My/SafeProcess/safe_process_win.cc: Add stdlib.h (to be able to compile with -DWIN32_LEAN_AND_MEAN) define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE if not defined (can happen using MinGW compiler that comes with old SDK) mysql-test/mtr.out-of-source: Allow testing with mtr in out-of-source builds. mysql-test/mysql-test-run.pl: Allow testing with mtr in out-of-source builds. Use common find_plugin macro for Windows and unix. mysql-test/t/fulltext_plugin.test: This test can now run on Windows as well. mysys/CMakeLists.txt: Port CMakeLists.txt to Unix mysys/my_create.c: config-win.h is dead => NO_OPEN_3 is never defined. mysys/my_getsystime.c: config-win.h is dead => define OFFSET_TO_EPOCH where it is used. mysys/my_winthread.c: Add win32 pthread_cancel - used by daemon_example mysys/mysys_priv.h: config-win.h is dead => include <sys/stat.h> where it is used fix prototype of my_win_(f)stat plugin/daemon_example/CMakeLists.txt: Compile daemon_example with CMake plugin/daemon_example/Makefile.am: Add new file plugin/fulltext/CMakeLists.txt: Compile full-text example with CMake plugin/fulltext/Makefile.am: Add new file. plugin/semisync/CMakeLists.txt: Fix semisync to use common macro for plugins. regex/CMakeLists.txt: Use absolute filenames, when adding regex library (we recompile files in embedded, and want to locate sources via GET_TARGET_PROPERTY( ... SOURCES ..)) regex/regex2.h: Remove pointless typedef (produces error with MinGW compiler) scripts/CMakeLists.txt: Add configure/install for scripts sql-bench/CMakeLists.txt: install sql-bench files sql-bench/Makefile.am: Add new file sql/CMakeLists.txt: Port CmakeLists.txt to Unix sql/nt_servc.cc: compile server with -DWIN32_LEAN_AND_MEAN sql/share/CMakeLists.txt: Install charsets sql/share/Makefile.am: Add new file sql/sql_builtin.cc.in: Handle pure-C plugins on Windows. sql/sql_class.h: Use the same clear_error macro in embedded and not embedded. Fixes pointless #ifdef and avoids duplicate symbols when linking on Windows. storage/Makefile.am: storage/mysql_storage_engine.cmake => cmake/plugin.cmake storage/archive/CMakeLists.txt: Add names for static and dynamic plugin libraries. Link archive with zlib storage/blackhole/CMakeLists.txt: Add names for static and dynamic storage engine libraries storage/csv/CMakeLists.txt: Add names for static and dynamic storage engine libraries storage/example/CMakeLists.txt: Add names for static and dynamic storage engine libraries storage/federated/CMakeLists.txt: Add names for static and dynamic storage engine libraries storage/heap/CMakeLists.txt: Add names for static and dynamic storage engine libraries storage/ibmdb2i/CMakeLists.txt: Better port for ibmdb2i plugin storage/innobase/CMakeLists.txt: Run system checks. Add names for static and dynamic storage engine libraries. storage/innobase/include/page0page.ic: Fix compile error on OpenSolaris. storage/myisam/CMakeLists.txt: Port CmakeLists.txt to Unix storage/myisammrg/CMakeLists.txt: Add names for static and dynamic storage engine libraries storage/mysql_storage_engine.cmake: storage/mysql_storage_engine.cmake => cmake/plugin.cmake support-files/CMakeLists.txt: Configure and install some files from support-files. support-files/Makefile.am: Add new file tests/CMakeLists.txt: In general case, mysqlclient library can be dependent on C++ runtime(if it includes yassl and is not compiled with gcc or MSVC) unittest/mysys/CMakeLists.txt: Add unit tests unittest/mysys/Makefile.am: Add new file unittest/mytap/CMakeLists.txt: Add library for unit tests unittest/mytap/Makefile.am: Add new file unittest/mytap/tap.c: fix function definitions to match declarations win/create_def_file.js: Fix link error with intel compiler (icl defines of special label for exception handler)
* | | robust protection against missing DBUG_RETURNSergei Golubchik2009-10-311-34/+26
| | | | | | | | | | | | (instead of a C++ only thingy that was lost in a merge)
* | | backport of dbug extensions from 6.0:Sergei Golubchik2009-10-3013-635/+1178
| | | | | | | | | | | | | | | | | | | | | function/ syntax glob(7) wildcards unit tests
* | | manual merge: mysql-5.1-rep+2-delivery1 --> mysql-5.1-rpl-mergeLuis Soares2009-10-221-0/+28
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts ========= Text conflict in .bzr-mysql/default.conf Text conflict in libmysqld/CMakeLists.txt Text conflict in libmysqld/Makefile.am Text conflict in mysql-test/collections/default.experimental Text conflict in mysql-test/extra/rpl_tests/rpl_row_sp006.test Text conflict in mysql-test/suite/binlog/r/binlog_tmp_table.result Text conflict in mysql-test/suite/rpl/r/rpl_loaddata.result Text conflict in mysql-test/suite/rpl/r/rpl_loaddata_fatal.result Text conflict in mysql-test/suite/rpl/r/rpl_row_create_table.result Text conflict in mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result Text conflict in mysql-test/suite/rpl/r/rpl_stm_log.result Text conflict in mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result Text conflict in mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result Text conflict in mysql-test/t/mysqlbinlog.test Text conflict in sql/CMakeLists.txt Text conflict in sql/Makefile.am Text conflict in sql/log_event_old.cc Text conflict in sql/rpl_rli.cc Text conflict in sql/slave.cc Text conflict in sql/sql_binlog.cc Text conflict in sql/sql_lex.h 21 conflicts encountered. NOTE ==== mysql-5.1-rpl-merge has been made a mirror of mysql-next-mr: - "mysql-5.1-rpl-merge$ bzr pull ../mysql-next-mr" This is the first cset (merge/...) committed after pulling from mysql-next-mr.
| * | | WL#4828 and BUG#45747Alfranio Correia2009-09-291-0/+28
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTE: Backporting the patch to next-mr. WL#4828 Augment DBUG_ENTER/DBUG_EXIT to crash MySQL in different functions ------- The assessment of the replication code in the presence of faults is extremely import to increase reliability. In particular, one needs to know if servers will either correctly recovery or print out appropriate error messages thus avoiding unexpected problems in a production environment. In order to accomplish this, the current patch refactories the debug macros already provided in the source code and introduces three new macros that allows to inject faults, specifically crashes, while entering or exiting a function or method. For instance, to crash a server while returning from the init_slave function (see module sql/slave.cc), one needs to do what follows: 1 - Modify the source replacing DBUG_RETURN by DBUG_CRASH_RETURN; DBUG_CRASH_RETURN(0); 2 - Use the debug variable to activate dbug instructions: SET SESSION debug="+d,init_slave_crash_return"; The new macros are briefly described below: DBUG_CRASH_ENTER (function) is equivalent to DBUG_ENTER which registers the beginning of a function but in addition to it allows for crashing the server while entering the function if the appropriate dbug instruction is activate. In this case, the dbug instruction should be "+d,function_crash_enter". DBUG_CRASH_RETURN (value) is equivalent to DBUG_RETURN which notifies the end of a function but in addition to it allows for crashing the server while returning from the function if the appropriate dbug instruction is activate. In this case, the dbug instruction should be "+d,function_crash_return". Note that "function" should be the same string used by either the DBUG_ENTER or DBUG_CRASH_ENTER. DBUG_CRASH_VOID_RETURN (value) is equivalent to DBUG_VOID_RETURN which notifies the end of a function but in addition to it allows for crashing the server while returning from the function if the appropriate dbug instruction is activate. In this case, the dbug instruction should be "+d,function_crash_return". Note that "function" should be the same string used by either the DBUG_ENTER or DBUG_CRASH_ENTER. To inject other faults, for instance, wrong return values, one should rely on the macros already available. The current patch also removes a set of macros that were either not being used or were redundant as other macros could be used to provide the same feature. In the future, we also consider dynamic instrumentation of the code. BUG#45747 DBUG_CRASH_* is not setting the strict option --------- When combining DBUG_CRASH_* with "--debug=d:t:i:A,file" the server crashes due to a call to the abort function in the DBUG_CRASH_* macro althought the appropriate keyword has not been set.
* | | Backport http://lists.mysql.com/commits/57778Vladislav Vaintroub2009-09-301-1/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2677 Vladislav Vaintroub 2008-11-04 CMakeLists.txt files cleanup - remove SAFEMALLOC and SAFE_MUTEX definitions that were present in *each* CMakeLists.txt. Instead, put them into top level CMakeLists.txt, but disable on Windows, because a) SAFEMALLOC does not add any functionality that is not already present in Debug C runtime ( and 2 safe malloc one on top of the other only unnecessarily slows down the server) b)SAFE_MUTEX does not work on Windows and have been explicitely disabled on Windows with #undef previously. Fortunately, ntdll does pretty good job identifying l problems with CRITICAL_SECTIONs. DebugBreak()s on using uninited critical section, unlocking unowned critical section) -Also, remove occationally used -D_DEBUG (added by compiler anyway) sql/udf_example.c: use unixish end of line
* | automergeGeorgi Kodinov2009-06-051-0/+1
|\ \ | |/
| * Bug #45286: compilation warnings on mysql-5.0-bugteam on MacOSXGeorgi Kodinov2009-06-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed the 5.0-bugteam MacOSX warnings. client/mysqldump.c: Bug #45286: typecasts cmd-line-utils/readline/bind.c: Bug #45286: use variable of right type cmd-line-utils/readline/display.c: Bug #45286: use variable of right type dbug/user.r: Bug #45286: no warnings in generating man pages strings/ctype.c: Bug #45286: typecasts
* | Bug#38522: 5 seconds delay when closing application using embedded serverVladislav Vaintroub2008-12-041-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem here is that embedded server starts handle_thread manager thread on mysql_library_init() does not stop it on mysql_library_end(). At shutdown, my_thread_global_end() waits for thread count to become 0, but since we did not stop the thread it will give up after 5 seconds. Solution is to move shutdown for handle_manager thread from kill_server() (mysqld specific) to clean_up() that is used by both embedded and mysqld. This patch also contains some refactorings - to avoid duplicate code, start_handle_manager() and stop_handle_manager() functions are introduced. Unused variables are eliminated. handle_manager does not rely on global variable abort_loop anymore to stop (abort_loop is not set for embedded). Note: Specifically on Windows and when using DBUG version of libmysqld, the complete solution requires removing obsolete code my_thread_init() from my_thread_var(). This has a side effect that a DBUG statement after my_thread_end() can cause thread counter to be incremented, and embedded will hang for some seconds. Or worse, my_thread_init() will crash if critical sections have been deleted by the global cleanup routine that runs in a different thread. This patch also fixes and revert prior changes for Bug#38293 "Libmysqld crash in mysql_library_init if language file missing". Root cause of the crash observed in Bug#38293 was bug in my_thread_init() described above client/mysql.cc: sql_protocol_typelib is not exported from libmysqld (does not make sense either) thus excluded from embedded client dbug/dbug.c: revert changes for Bug#38293 include/my_dbug.h: revert changes for Bug#38293 libmysql/libmysql.c: Removed DBUG_POP call, because when called after my_end(), will access THR_key_mysys that is already deleted. The result of pthread_get_specific is not predictable in this case and hence DBUG_POP can crash. libmysqld/examples/CMakeLists.txt: Revert changes for Bug#38293. libmysqld/lib_sql.cc: code to start handle manager is factored out into start_handle_manager() function libmysqld/libmysqld.def: Revert changes for Bug #38293 Remove excessive exports from libmysqld, export what API documents. mysys/my_thr_init.c: Remove windows-DLL-specific workaround for something (old code, no documentation for what specifically). The problem is that even after my_thread_end() is finished, DBUG statement can initiate my_thread_init(). This does not happen anywhere else and should not happen on Windows either. sql/mysql_priv.h: - new functions start_handle_manager() and stop_handle_manager() - move manager_thread_in_use variable to sql_manager.cc and made it static - remove manager_status, as it is unused sql/mysqld.cc: Code to start/stop handle_manager thread is factored out into start_handle_manager()
* | Bug#38293 Libmysqld crash in mysql_library_init if language file missingAlexey Botchkov2008-11-191-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That's a Win-specific error. When we create libmysqld.dll we have many libraries like mysys, dbug, strings, etc linked into that dll, so the application built upon this library shouldn't link these libraries to itself, rather use those inside the dll. Fixed by redirecting calls into the libmysqld.dll per-file comments: dbug/dbug.c Bug#38293 Libmysqld crash in mysql_library_init if language file missing fake _db_something definitions added include/my_dbug.h Bug#38293 Libmysqld crash in mysql_library_init if language file missing fake _db_something declarations added libmysqld/examples/CMakeLists.txt Bug#38293 Libmysqld crash in mysql_library_init if language file missing superfluous libraries removed from linking libmysqld/libmysqld.def Bug#38293 Libmysqld crash in mysql_library_init if language file missing set of mysys functions added to the export section
* | Merge pilot.mysql.com:/data/msvensson/mysql/my50-bt-36463unknown2008-05-021-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | into pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-bugteam client/mysqltest.c: Auto merged dbug/dbug.c: Auto merged mysql-test/mysql-test-run.pl: Auto merged client/mysql_upgrade.c: SCCS merged
| * Bug#35986 valgrind warning in DbugParse for empty string in SET GLOBAL DEBUG=""unknown2008-05-021-1/+1
| | | | | | | | | | | | | | | | | | - Code in DbugParse was reading from beyond end of the control string dbug/dbug.c: Don't try to parse control strings that hasn't got any tokens or is zero size
| * Bug#26243 mysql command line crash after control-cunknown2008-03-283-1363/+1665
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Backported the 5.1 DBUG to 5.0. - Avoid memory cleanup race on Windows client for CTRL-C client/mysql.cc: Bug#26243 mysql command line crash after control-c - On Windows, the sigint handler shouldn't call mysql_end because the main thread will do so automatically. - Remove unnecessary signal call from the sigint handler. - Call my_end with proper value. dbug/dbug.c: Bug#26243 mysql command line crash after control-c - Backported the 5.1 DBUG library. The old version uses a non-thread safe global variable 'static struct state *stack'. dbug/factorial.c: Bug#26243 mysql command line crash after control-c - Backported the 5.1 DBUG library. The old version uses a non-thread safe global variable 'static struct state *stack'. dbug/user.r: Bug#26243 mysql command line crash after control-c - Backported the 5.1 DBUG library. The old version uses a non-thread safe global variable 'static struct state *stack'. include/my_dbug.h: Bug#26243 mysql command line crash after control-c - Backported the 5.1 DBUG library. The old version uses a non-thread safe global variable 'static struct state *stack'. libmysql/libmysql.c: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. myisam/mi_open.c: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/ha_federated.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/ha_innodb.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/ha_myisammrg.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/item_cmpfunc.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/mysqld.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/net_serv.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/opt_range.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/set_var.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/slave.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/sql_cache.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/sql_select.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. tests/mysql_client_test.c: Bug#26243 mysql command line crash after control-c - Update for new DBUG library.
* | Bug#34424 query_cache_debug.test leads to valgrind warningsunknown2008-02-262-12/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#34678 @@debug variable's incremental mode The problem is that the per-thread debugging settings stack wasn't being deallocated before the thread termination, leaking the stack memory. The chosen solution is to push a new state if the current is set to the initial settings and pop it (free) once the thread finishes. dbug/dbug.c: Move dbug parser out of _db_set_ to a separate function and make _db_set_ push a new stack if the corrent one is set to the initial settings. dbug/user.r: Update DBUG_SET description. mysql-test/t/disabled.def: Re-enable test case which triggered the leak. mysys/my_thr_init.c: Pop a pushed state, nop if stack is empty. sql/set_var.cc: Handle incremental debug settings. mysql-test/r/variables_debug.result: Add new test case result for Bug#34678 mysql-test/t/variables_debug.test: Add new test case for Bug#34678
* | Bug #27099: system_mysql fail in pushbuild windowsunknown2007-10-151-18/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows the debug log was doing freopen () instead of fflush() and that was slowing the logging down that much that some tests timed out. Fixed by replacing the freopen() with an syncing-to-disk flag to fopen() and fflush(). Also increased the timeout of the tests running with --debug on windows : seems to slow down as much as valgrind on linux. dbug/dbug.c: Bug #27099: remove the freopen() for the windows log : too slow. Replace it with the "c" option for fopen(). mysql-test/mysql-test-run.pl: Bug #27099: on windows debug log seems to slow the tests down about as much as valgrind does on linux.
* | Merge dfischer@bk-internal.mysql.com:/home/bk/mysql-5.1-buildunknown2007-08-041-3/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | into pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build libmysql/CMakeLists.txt: merge fix
| * \ Merge mysql.com:/home/kent/bk/cmake-tls/mysql-5.0-build-newunknown2007-08-031-3/+8
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/kent/bk/cmake-tls/mysql-5.1-build-new BitKeeper/deleted/.del-README~1: SCCS merged BitKeeper/deleted/.del-configure.js: ul dbug/CMakeLists.txt: SCCS merged extra/CMakeLists.txt: SCCS merged extra/yassl/CMakeLists.txt: SCCS merged extra/yassl/taocrypt/CMakeLists.txt: SCCS merged scripts/CMakeLists.txt: SCCS merged server-tools/instance-manager/CMakeLists.txt: SCCS merged sql/CMakeLists.txt: SCCS merged storage/myisam/CMakeLists.txt: SCCS merged