summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Updated/added copyright headersKent Boortz2011-06-3026-51/+121
|\
| * Updated/added copyright headersKent Boortz2011-06-3014-26/+38
| |
* | Merge from mysql-5.1.55-releasekaren.langford@oracle.com2011-02-082-2/+2
|\ \
| * | Updating header copyright/README in source for 2011Karen Langford2011-01-252-2/+2
| | |
* | | merge to 5.1.Georgi Kodinov2011-02-022-0/+18
|\ \ \ | |/ / |/| / | |/
| * Fixes for Bug #55755 and Bug #52315 part 2Georgi Kodinov2011-02-022-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug #55755 : Date STD variable signness breaks server on FreeBSD and OpenBSD * Added a check to configure on the size of time_t * Created a macro to check for a valid time_t that is safe to use with datetime functions and store in TIMESTAMP columns. * Used the macro consistently instead of the ad-hoc checks introduced by 52315 * Fixed compliation warnings on platforms where the size of time_t is smaller than the size of a long (e.g. OpenBSD 4.8 64 amd64). Bug #52315: utc_date() crashes when system time > year 2037 * Added a correct check for the timestamp range instead of just variable size check to SET TIMESTAMP. * Added overflow checking before converting to time_t. * Using a correct localized error message in this case instead of the generic error. * Added a test suite. * fixed the checks so that they check for unsigned time_t as well. Used the checks consistently across the source code. * fixed the original test case to expect the new error code.
* | Bug#51023: Mysql server crashes on SIGHUP and destroys InnoDB filesDavi Arnaut2011-01-071-1/+3
| | | | | | | | WIN32 compilation fixes: define ETIMEDOUT only if not available and fix typos and add a missing parameter.
* | Bug#51023: Mysql server crashes on SIGHUP and destroys InnoDB filesDavi Arnaut2011-01-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From a user perspective, the problem is that a FLUSH LOGS or SIGHUP signal could end up associating the stdout and stderr to random files. In the case of this bug report, the streams would end up associated to InnoDB ibd files. The freopen(3) function is not thread-safe on FreeBSD. What this means is that if another thread calls open(2) during freopen() is executing that another thread's fd returned by open(2) may get re-associated with the file being passed to freopen(3). See FreeBSD PR number 79887 for reference: http://www.freebsd.org/cgi/query-pr.cgi?pr=79887 This problem is worked around by substituting a internal hook within the FILE structure. This avoids the loss of atomicity by not having the original fd closed before its duplicated. Patch based on the original work by Vasil Dimov.
* | MergeKent Boortz2010-12-294-6/+6
|\ \ | |/
| * - Added/updated copyright headersKent Boortz2010-12-285-842/+7
| | | | | | | | | | | | | | | | | | | | | | - 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 #58426 Crashing tests not failing as they are supposed to on Solaris 10 ↵Tor Didriksen2010-12-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | 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>)
* | Fix for bug#48451: my_seek and my_tell ignore MY_WME flagRamil Kalimullin2010-12-091-1/+2
| | | | | | | | my_seek() and my_tell() functions now honour MY_WME flag.
* | Merging patch for BUG#58246 with mysql-5.1-bugteam.Mats Kindahl2010-12-012-3/+3
|\ \
| * | Bug#51817: incorrect assumption: thd->query at 0x2ab2a8360360 is an invalid ↵Davi Arnaut2010-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pointer The problem is that the logic which checks if a pointer is valid relies on a poor heuristic based on the start and end addresses of the data segment and heap. Apart from miscalculating the heap bounds, this approach also suffers from the fact that memory can come from places other than the heap. See Bug#58528 for a more detailed explanation. On Linux, the solution is to access the process's memory through /proc/self/task/<tid>/mem, which allows for retrieving the contents of pages within the virtual address space of the calling process. If a address range is not mapped, a input/output error is returned.
| * | Bug#57994: Compiler flag change build error : my_redel.cDavi Arnaut2010-11-201-1/+1
| | | | | | | | | | | | Although ICC identifies itself as GCC, even in version numbers, it does not support the stpcpy built-in.
| * | Bug#57994: Compiler flag change build error : my_redel.cDavi Arnaut2010-11-171-2/+2
| | | | | | | | | | | | | | | Use __builtin_stpcpy only if the system supports stpcpy. This is necessary as in some cases a call to stpcpy will be emitted if the built-in can not optimized.
* | | BUG#58246: INSTALL PLUGIN not secure & crashableMats Kindahl2010-12-014-0/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When installing plugins, there is a missing check for slash (/) in the path on Windows. Note that on Windows, both / and \ can be used to separate directories. This patch fixes the issue by: - Adding a FN_DIRSEP symbol for all platforms consisting of a string of legal directory separators. - Adding a charset-aware version of strcspn(). - Adding a check_valid_path() function that uses my_strcspn() to check if any FN_DIRSEP character is in the supplied string. - Using the check_valid_path() function in sql_plugin.cc and sql_udf.cc (which means replacing the existing test there).
* | Bug#58057: 5.1 libmysql/libmysql.c unused variable/compile failureDavi Arnaut2010-11-102-1/+8
| | | | | | | | | | | | | | | | | | | | Bug#57995: Compiler flag change build error on OSX 10.4: my_getncpus.c Bug#57996: Compiler flag change build error on OSX 10.5 : bind.c Bug#57994: Compiler flag change build error : my_redel.c Bug#57993: Compiler flag change build error on FreeBsd 7.0 : regexec.c Bug#57992: Compiler flag change build error on FreeBsd : mf_keycache.c Bug#57997: Compiler flag change build error on OSX 10.6: debug_sync.cc Fix assorted compiler generated warnings.
* | Bug#57210: remove pstackDavi Arnaut2010-11-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Quoting from the bug report: The pstack library has been included in MySQL since version 4.0.0. It's useless and should be removed. Details: According to its own documentation, pstack only works on Linux on x86 in 32 bit mode and requires LinuxThreads and a statically linked binary. It doesn't really support any Linux from 2003 or later and doesn't work on any other OS. The --enable-pstack option is thus deprecated and has no effect.
* | Bug#45288: pb2 returns a lot of compilation warningsDavi Arnaut2010-10-201-1/+12
| | | | | | | | | | | | | | | | Fix assorted warnings that are generated in optimized builds. Most of it is silencing variables that are set but unused. This patch also introduces the MY_ASSERT_UNREACHABLE macro which helps the compiler to deduce that a certain piece of code is unreachable.
* | Bug#45288: pb2 returns a lot of compilation warningsDavi Arnaut2010-10-201-1/+2
| | | | | | Fix assorted compiler warnings.
* | Bug#52172 test binlog.binlog_index needs --skip-core-file to avoid leaving ↵Tor Didriksen2010-10-181-4/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | mergeGeorgi Kodinov2010-10-051-2/+35
|\ \ | |/
| * Bug #56428: Replace copyright notice removed from SHA1 code (.h)Georgi Kodinov2010-10-051-2/+35
| |
* | Fixed bug #47485 - mysql_store_result returns a not NULL result setDmitry Shulga2010-09-072-2/+4
| | | | | | for a prepared statement.
* | Bug#55846: Link tests fail on Windows - my_compiler.h missingDavi Arnaut2010-08-241-2/+3
| | | | | | | | | | Make the my_compiler.h header, like my_attribute.h, part of the distribution. This is required due to the dependency of the former on the latter (which can undefine __attribute__).
* | Bug #42144: plugin_load failsGeorgi Kodinov2010-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Reverted the ulong->uint diff Re-applied the first diff. The original commit message follows: enum plugin system variables are ulong internally, not int. On systems where long is not the same as an int it causes problems. Fixed by correct typecasting. Removed the test from the experimental list.
* | Bug #42144: plugin_load failsGeorgi Kodinov2010-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | The enum system variables were handled inconsistently as ints, unsigned int and unsigned long on various places. This caused problems on platforms on which sizeof(int) != sizeof(long). Fixed by homogenizing the type of the enum variables to unsigned int, since it's size compatible with the C enum type. Removed the test from the experimental list.
* | Bug#45288: pb2 returns a lot of compilation warnings on linuxDavi Arnaut2010-07-202-3/+6
| | | | | | | | | | | | Fix warnings flagged by the new warning option -Wunused-but-set-variable that was added to GCC 4.6 and that is enabled by -Wunused and -Wall. The option causes a warning whenever a local variable is assigned to but is later unused. It also warns about meaningless pointer dereferences.
* | Bug#52514: mysql 5.1 do_abi_check does not compile w/ gcc4.5Davi Arnaut2010-07-202-1/+2
| | | | | | | | | | | | | | | | | | | | | | due to GCC preprocessor change The problem is that newer GCC versions treats missing headers as fatal errors. The solution is to use a guard macro to prevent the inclusion of system headers when checking the ABI with the C Preprocessor. Reference: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15638 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44836
* | Bug#42733: Type-punning warnings when compiling MySQL --Davi Arnaut2010-07-142-2/+4
| | | | | | | | | | | | | | | | | | | | strict aliasing violations. Post-merge fix: include my_compiler.h before my_attribute.h as the latter will undef __attribute__ if the compiler is not GCC. Based on the compiler version, in my_compiler.h we know for sure whether the aligned attribute is supported. Furthermore, undefining attribute might cause bugs if some system header uses it.
* | Bug#42733: Type-punning warnings when compiling MySQL --Davi Arnaut2010-07-143-4/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strict aliasing violations. Another rather noisy violation of strict aliasing rules is the spatial code which makes use of stack-based memory (of type Geometry_buffer) to provide placement for Geometry objects. Although a placement new is allowed to dynamically change the type of a object, the object returned by the new placement was being ignored and the original stack-based object was being casted to the new type, thus violating strict aliasing rules. The solution is to reorganize the code so that the object returned by the new placement is used instead of casting the original object. Also, to ensure that the stack-based object is properly aligned with respect to the objects it provides placement for, a set of compiler-dependent macros and types are introduced so that the alignment of objects can be inquired and specified.
* | Bug#45288: pb2 returns a lot of compilation warnings on linuxDavi Arnaut2010-07-091-11/+0
| | | | | | | | | | | | | | | | Although the C standard mandates that sprintf return the number of bytes written, some very ancient systems (i.e. SunOS 4) returned a pointer to the buffer instead. Since these systems are not supported anymore and are hopefully long dead by now, simply remove the portability wrapper that dealt with this discrepancy. The autoconf check was causing trouble with GCC.
* | Bug#22320: my_atomic-t unit test failsDavi Arnaut2010-07-058-426/+3
| | | | | | | | | | The atomic operations implementation on 5.1 has a few problems, which might cause tests to abort randomly. Since no code in 5.1 uses atomic operations, simply remove the code.
* | Bug#53445: Build with -Wall and fix warnings that it generatesDavi Arnaut2010-07-021-4/+4
| | | | | | | | If bzero is not available, resort to memset. Also, remove dead bzero.c
* | Bug#53445: Build with -Wall and fix warnings that it generatesDavi Arnaut2010-07-023-44/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apart strict-aliasing warnings, fix the remaining warnings generated by GCC 4.4.4 -Wall and -Wextra flags. One major source of warnings was the in-house function my_bcmp which (unconventionally) took pointers to unsigned characters as the byte sequences to be compared. Since my_bcmp and bcmp are deprecated functions whose only difference with memcmp is the return value, every use of the function is replaced with memcmp as the special return value wasn't actually being used by any caller. There were also various other warnings, mostly due to type mismatches, missing return values, missing prototypes, dead code (unreachable) and ignored return values.
* | Automerge.Alexey Kopytov2010-07-012-4/+4
|\ \
| * | Bug#54667: Unnecessary signal handler redefinitionAlexey Kopytov2010-07-012-4/+4
| | | | | | | | | | | | | | | | | | | | | POSIX requires that a signal handler defined with sigaction() is not reset on delivering a signal unless SA_NODEFER or SA_RESETHAND is set. It is therefore unnecessary to redefine the handler on signal delivery on platforms where sigaction() is used without those flags.
* | | Bug#54457: Test suite broken for 32-bit buildDavi Arnaut2010-06-281-2/+0
|/ / | | | | | | | | | | | | | | | | The default value of the myisam_max_extra_sort_file_size could be higher than the maximum accepted value, leading to warnings upon the server start. The solution is to simply set the value to the maximum value in a 32-bit built (2147483647, one less than the current). This should be harmless as the option is currently unused in 5.1.
* | Bug#42733: Type-punning warnings when compiling MySQL --Davi Arnaut2010-06-102-17/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strict aliasing violations. Essentially, the problem is that large parts of the server were developed in simpler times (last decades, pre C99 standard) when strict aliasing and compilers supporting such optimizations were rare to non-existent. Thus, when compiling the server with a modern compiler that uses strict aliasing rules to perform optimizations, there are several places in the code that might trigger undefined behavior. As evinced by some recent bugs, GCC does a somewhat good of job misoptimizing such code, but on the other hand also gives warnings about suspicious code. One problem is that the warnings aren't always accurate, yet we can't afford to just shut them off as we might miss real cases. False-positive cases are aggravated mostly by casts that are likely to trigger undefined behavior. The solution is to start a cleanup process focused on fixing and reducing the amount of strict-aliasing related warnings produced by GCC and others compilers. A good deal of noise reduction can be achieved by just removing useless casts that are product of historical cruft and are likely to trigger undefined behavior if dereferenced.
* | Merge of mysql-5.0-bugteam into mysql-5.1-bugteam.Davi Arnaut2010-06-081-1/+1
|\ \ | |/
| * Bug#53906: Stray semicolon in my_sys.h corrupts macro function definition of ↵Davi Arnaut2010-06-081-1/+1
| | | | | | | | MY_INIT
* | merge mysql-5.1 -> mysql-5.1-bugteamGeorgi Kodinov2010-06-012-5/+15
|\ \
| * | Bug#53593: Add some instrumentation to improve Valgrind sensitivityMarko Mäkelä2010-05-202-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BUILD/*: Add valgrind_configs=--with-valgrind. BUILD/*: Remove -USAFEMALLOC from valgrind_flags. configure.in: Add AC_ARG_WITH(valgrind) and HAVE_VALGRIND. include/my_sys.h: Define a number of MEM_ wrappers for VALGRIND_ functions. include/my_sys.h: Make TRASH do MEM_UNDEFINED(). include/m_string.h: Remove unused macro bzero_if_purify(A,B). _mymalloc(): Declare MEM_UNDEFINED() on the allocated memory. _myfree(): Declare MEM_NOACCESS() on the freed memory. storage/innobase/include/univ.i: Enable UNIV_DEBUG_VALGRIND based on HAVE_VALGRIND rather than HAVE_purify. Possible things to do: * In my_global.h, remove the defined(HAVE_purify) condition from the _WIN32 uint3korr(). * In my_global.h *int*korr(), use | instead of + in order to keep the Valgrind V bits accurate * Consider replacing HAVE_purify with HAVE_VALGRIND * Use VALGRIND_CREATE_BLOCK, VALGRIND_DISCARD in mem_root and similar places
* | | bug#49968: Properly define HAVE_ERRNO_AS_DEFINE for the appropriateJonathan Perkin2010-05-251-0/+4
|/ / | | | | | | | | | | OpenBSD releases. Apply patch from Brad Smith, thanks!
* | Manual merge.Davi Arnaut2010-04-291-0/+10
|\ \ | |/
| * Bug#50974: Server keeps receiving big (> max_allowed_packet) packets ↵Davi Arnaut2010-04-291-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | indefinitely. The server could be tricked to read packets indefinitely if it received a packet larger than the maximum size of one packet. This problem is aggravated by the fact that it can be triggered before authentication. The solution is to no skip big packets for non-authenticated sessions. If a big packet is sent before a session is authen- ticated, a error is returned and the connection is closed.
* | Merge fix for BUG39053 to 5.1-bugteam.Sergey Vojtovich2010-04-142-16/+26
|\ \
| * | BUG#39053 - UNISTALL PLUGIN does not allow the storage engineSergey Vojtovich2010-04-142-16/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to cleanup open connections It was possible to UNINSTALL storage engine plugin when binding between THD object and storage engine is still active (e.g. in the middle of transaction). To avoid unclean deactivation (uninstall) of storage engine plugin in the middle of transaction, additional storage engine plugin lock is acquired by thd_set_ha_data(). If ha_data is not null and storage engine plugin was not locked by thd_set_ha_data() in this connection before, storage engine plugin gets locked. If ha_data is null and storage engine plugin was locked by thd_set_ha_data() in this connection before, storage engine plugin lock gets released. If handlerton::close_connection() didn't reset ha_data, server does it immediately after calling handlerton::close_connection(). Note that this is just a framework fix, storage engines must switch to thd_set_ha_data() from thd_ha_data() if they want to see fit.
* | | Bug #47095: Can't open_files_limit really be larger than 65535?Georgi Kodinov2010-04-091-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several problems addressed: 1. The maximum value for --open_files_limit on non-windows boxes is now raised to UINT_MAX (the maximum possible without significant changes in the code). The maximum value on windows is kept to be 2048 due to a known limitation (bug 24509). 2. mysqld_safe now supports --open_files_limit=xx in addition to --open-files-limit=xx 3. mysqld_safe always passes through --open[_-]files[_-]limit to the underlying mysqld. It used to pass it through only if it the user running the script has access to the root directory or there was an --user argument specified. 4. Fixed a prototype in my_file.c to match its counterpart in the other #ifdef branch.