summaryrefslogtreecommitdiff
path: root/server-tools
Commit message (Collapse)AuthorAgeFilesLines
* Updated/added copyright headersKent Boortz2011-06-3014-28/+67
|\
| * Updated/added copyright headersKent Boortz2011-06-3013-26/+39
| |
* | MergeKent Boortz2010-12-291-2/+2
|\ \ | |/
| * - Added/updated copyright headersKent Boortz2010-12-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | - 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#45288: pb2 returns a lot of compilation warnings on linuxDavi Arnaut2010-07-201-3/+0
| | | | | | | | | | | | 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#42733: Type-punning warnings when compiling MySQL --Davi Arnaut2010-06-101-37/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Recommit of Bug#49447.Staale Smedseng2010-02-041-15/+15
| |
* | Bug#48983: Bad strmake calls (length one too long)Davi Arnaut2009-12-183-5/+5
| | | | | | MySQL 5.1 specific fixes.
* | Manual merge.Davi Arnaut2009-12-181-1/+1
|\ \ | |/
| * Bug#48983: Bad strmake calls (length one too long)Davi Arnaut2009-12-172-2/+2
| | | | | | | | | | | | | | | | The problem is a somewhat common misusage of the strmake function. The strmake(dst, src, len) function writes at most /len/ bytes to the string pointed to by src, not including the trailing null byte. Hence, if /len/ is the exact length of the destination buffer, a one byte buffer overflow can occur if the length of the source string is equal to or greater than /len/.
* | Merge from mysql-5.0-bugteam.Davi Arnaut2009-08-131-0/+12
|\ \ | |/
| * Bug#46013: rpl_extraColmaster_myisam fails on pb2Davi Arnaut2009-08-131-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#45243: crash on win in sql thread clear_tables_to_lock() -> free() Bug#45242: crash on win in mysql_close() -> free() Bug#45238: rpl_slave_skip, rpl_change_master failed (lost connection) for STOP SLAVE Bug#46030: rpl_truncate_3innodb causes server crash on windows Bug#46014: rpl_stm_reset_slave crashes the server sporadically in pb2 When killing a user session on the server, it's necessary to interrupt (notify) the thread associated with the session that the connection is being killed so that the thread is woken up if waiting for I/O. On a few platforms (Mac, Windows and HP-UX) where the SIGNAL_WITH_VIO_CLOSE flag is defined, this interruption procedure is to asynchronously close the underlying socket of the connection. In order to enable this schema, each connection serving thread registers its VIO (I/O interface) so that other threads can access it and close the connection. But only the owner thread of the VIO might delete it as to guarantee that other threads won't see freed memory (the thread unregisters the VIO before deleting it). A side note: closing the socket introduces a harmless race that might cause a thread attempt to read from a closed socket, but this is deemed acceptable. The problem is that this infrastructure was meant to only be used by server threads, but the slave I/O thread was registering the VIO of a mysql handle (a client API structure that represents a connection to another server instance) as a active connection of the thread. But under some circumstances such as network failures, the client API might destroy the VIO associated with a handle at will, yet the VIO wouldn't be properly unregistered. This could lead to accesses to freed data if a thread attempted to kill a slave I/O thread whose connection was already broken. There was a attempt to work around this by checking whether the socket was being interrupted, but this hack didn't work as intended due to the aforementioned race -- attempting to read from the socket would yield a "bad file descriptor" error. The solution is to add a hook to the client API that is called from the client code before the VIO of a handle is deleted. This hook allows the slave I/O thread to detach the active vio so it does not point to freed memory.
| * Merge from 5.0-btStaale Smedseng2009-06-291-2/+2
| |
| * mergingAlexey Botchkov2009-04-281-2/+1
| |\
| | * Bug#25058 ignored return codes in memory allocation functionsAlexey Botchkov2008-11-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | memory allocation error checks added for functions calling insert_dynamic() per-file messages: myisam/mi_delete.c Bug#25058 ignored return codes in memory allocation functions out-of-memory errors handled myisam/mi_write.c Bug#25058 ignored return codes in memory allocation functions out-of-memory errors handled server-tools/instance-manager/instance_options.cc Bug#25058 ignored return codes in memory allocation functions out-of-memory errors handled sql/slave.cc Bug#25058 ignored return codes in memory allocation functions out-of-memory errors handled sql/sp_head.cc Bug#25058 ignored return codes in memory allocation functions out-of-memory errors handled sql/sp_head.h Bug#25058 ignored return codes in memory allocation functions out-of-memory errors handled sql/sp_pcontext.cc Bug#25058 ignored return codes in memory allocation functions out-of-memory errors handled sql/sp_pcontext.h Bug#25058 ignored return codes in memory allocation functions out-of-memory errors handled sql/sql_select.cc Bug#25058 ignored return codes in memory allocation functions out-of-memory errors handled sql/sql_yacc.yy Bug#25058 ignored return codes in memory allocation functions out-of-memory errors handled
* | | auto-mergeIgnacio Galarza2009-03-193-2/+8
|\ \ \
| * | | Fix for bug #40552: Race condition around default_directories Alexey Kopytov2009-02-273-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in load_defaults() load_defaults(), my_search_option_files() and my_print_default_files() utilized a global variable containing a pointer to thread local memory. This could lead to race conditions when those functions were called with high concurrency. Fixed by changing the interface of the said functions to avoid the necessity for using a global variable. Since we cannot change load_defaults() prototype for API compatibility reasons, it was renamed my_load_defaults(). Now load_defaults() is a thread-unsafe wrapper around a thread-safe version, my_load_defaults().
* | | | Bug#29125 Windows Server X64: so many compiler warningsIgnacio Galarza2009-02-134-4/+4
|\ \ \ \ | |/ / / |/| / / | |/ / | | | | | | - Remove bothersome warning messages. This change focuses on the warnings that are covered by the ignore file: support-files/compiler_warnings.supp. - Strings are guaranteed to be max uint in length
| * | Bug#29125 Windows Server X64: so many compiler warningsIgnacio Galarza2009-02-1013-35/+62
| |/ | | | | | | | | - Remove bothersome warning messages. This change focuses on the warnings that are covered by the ignore file: support-files/compiler_warnings.supp. - Strings are guaranteed to be max uint in length
* | mergeVladislav Vaintroub2008-09-011-382/+0
|\ \ | |/
| * Bug #33907 : Errors compiling mysql with Microsoft Visual C++ Express 2008Vladislav Vaintroub2008-08-211-382/+0
| | | | | | | | | | | | - Cherry pick 6.0 changes for Visual Studio 2008 support - Add scripts win\build-vs9.bat and win\build-vs9_x64.bat Also, remove CMake generated visual studio project files.
| * Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-mainttnurnberg@sin.intern.azundris.com2007-09-151-1/+1
| |\ | | | | | | | | | into mysql.com:/home/tnurnberg/15327/50-15327
* | | Bug#34655 Compile errordavi@mysql.com/endora.local2008-02-281-1/+1
| | | | | | | | | | | | | | | Rename client_last_error to last_error and client_last_errno to last_errno to not break connectors which use the internal net structure for error handling.
* | | Bug#12713 "Error in a stored function called from a SELECT doesn't kostja@bodhi.(none)2007-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cause ROLLBACK of statement", part 1. Review fixes. Do not send OK/EOF packets to the client until we reached the end of the current statement. This is a consolidation, to keep the functionality that is shared by all SQL statements in one place in the server. Currently this functionality includes: - close_thread_tables() - log_slow_statement(). After this patch and the subsequent patch for Bug#12713, it shall also include: - ha_autocommit_or_rollback() - net_end_statement() - query_cache_end_of_result(). In future it may also include: - mysql_reset_thd_for_next_command().
* | | WL#4104: Deprecate the Instance Manager.anozdrin/alik@station.2007-10-221-0/+3
| | | | | | | | | | | | A deprecation warning added.
* | | Merge ramayana.hindu.god:/home/tsmith/m/bk/51tsmith@ramayana.hindu.god2007-10-101-1/+1
|\ \ \ | | | | | | | | | | | | into ramayana.hindu.god:/home/tsmith/m/bk/maint/51
| * \ \ Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-mainttnurnberg@sin.intern.azundris.com2007-09-151-1/+1
| |\ \ \ | | | | | | | | | | | | | | | into mysql.com:/home/tnurnberg/15327/51-15327
| | * \ \ Merge mysql.com:/home/tnurnberg/15327/50-15327tnurnberg@sin.intern.azundris.com2007-09-151-1/+1
| | |\ \ \ | | | | |/ | | | |/| | | | | | into mysql.com:/home/tnurnberg/15327/51-15327
| | | * | Bug #15327: configure: --with-tcp-port option being partially ignoredtnurnberg@mysql.com/sin.intern.azundris.com2007-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make sure that if builder configured with a non-standard (!= 3306) default TCP port that value actually gets used throughout. if they didn't configure a value, assume "use a sensible default", which will be read from /etc/services or, failing that, from the factory default. That makes the order of preference - command-line option - my.cnf, where applicable - $MYSQL_TCP_PORT environment variable - /etc/services (unless configured --with-tcp-port) - default port (--with-tcp-port=... or factory default)
* | | | | ha_partition.cc, listener.h, listener.cc, ha_partition.h:kent/mysqldev@mysql.com/production.mysql.com2007-09-072-1/+2
|/ / / / | | | | | | | | | | | | Initiate static const outside class definition
* | | | Merge bk-internal.mysql.com:/home/bk/mysql-5.1-marveljbruehe/mysqldev@mysql.com/production.mysql.com2007-08-161-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | into mysql.com:/data0/mysqldev/my/mysql-5.1-30367
| * | | | CMakeLists.txt (many), win/README, mysql_manifest.cmake, configure.js:kent@mysql.com/kent-amd64.(none)2007-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Additional changes for bug#29903 - Changed to do embedded build part as normal build, when WITH_EMBEDDED_SERVER is set. - Allow both normal and debug build with embedded. - Build static embedded library by pointing out all source and compile it all, i.e. not building libraries from libraries, not portable. - Let embedded use generated files from the "sql" directory, added dependencies to make sure built before embedded. - Mark library "dbug" in TARGET_LINK_LIBRARIES() with "debug", so only linked in when debug target is used. - Removed change of target name with "mysqld${MYSQLD_EXE_SUFFIX}", as others can't depend on it, not defined at configure time. Instead set the output file name. - Created work around for bug in CMake 2.4.6 and output names, to set the "mysqld<suffix>.pdb" name to the same base name. - Set the correct manifest "name" (patch by iggy)
* | | | | Merge bk-internal.mysql.com:/home/bk/mysql-5.1monty@narttu.mysql.fi2007-08-142-1/+6
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | into mysql.com:/home/my/mysql-5.1
| * | | | Fixed a lot of compiler warnings and errors detected by Forte C++ on Solarismonty@mysql.com/nosik.monty.fi2007-08-132-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Faster thr_alarm() Added 'Opened_files' status variable to track calls to my_open() Don't give warnings when running mysql_install_db Added option --source-install to mysql_install_db I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems index_read() -> index_read_map() index_read_idx() -> index_read_idx_map() index_read_last() -> index_read_last_map()
* | | | | Merge mysql.com:/home/kent/bk/cmake-tls/mysql-5.0-build-newkent@kent-amd64.(none)2007-08-031-1/+1
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | into mysql.com:/home/kent/bk/cmake-tls/mysql-5.1-build-new
| * | | | CMakeLists.txt, README, configure.jskent@mysql.com/kent-amd64.(none)2007-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Several adjustments to make client libraries pass the link test on both win32 and winx64, Visual Studio 2003 and 2005 (bug#30118)
| * | | | configure.in:kent/mysqldev@mysql.com/production.mysql.com2007-06-201-1/+3
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | Added --with-system-type=<systype> and --with-machine-type=<machtype> options, to be able to override the one detected, for --version strings field.cc, field.h, listener.cc: C++ compatibility change for IBM VisualAge 6 and i5/OS
| * | | Merge pilot.blaudden:/home/msvensson/mysql/bug26664/my50-bug26664msvensson@pilot.blaudden2007-05-241-2/+2
| |\ \ \ | | | | | | | | | | | | | | | into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
| * | | | Bug#24732 Executables do not include Vista manifestsiggy@recycle.(none)2007-04-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added script to generate application specific manifest. - Added new CMake MACRO to add customer build events which will first generate a manifest and then embeds that manifest into an executable.
* | | | | Merge trift2.:/MySQL/M51/bug29982-5.1joerg@trift2.2007-08-021-0/+0
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | into trift2.:/MySQL/M51/push-5.1
| * | | | Fix a bad BitKeeper dependency structure for the "CMakeLists.txt" files.joerg@trift2.2007-07-311-0/+0
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They had been introduced in 5.1 and were only later backported to 5.0; as a consequence, the files in the 5.1 tree do not depend on the 5.0 ones, and changes in 5.0 do not propagate into the 5.1 files. To fix this, the (previous) files in 5.1 now are deleted ("bk rm"), and the previously deleted files depending on 5.0 are now moved to the respective source directories ("bk mv"). The current 5.1 contents is restored in these files. If you need the previous history of the 5.1 files ("bk revtool"), access those in "BitKeeper/deleted". Contrary to the original plan, I did not introduce the name "CMakeLists.historic" - mostly in order not to clutter the source tree. This fixes bug#29982.
* | | | Fix for BUG#28030: test im_instance_conf fails with an assert.anozdrin/alik@ibm.2007-07-274-7/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was a race condition on shutdown -- when IM got shutdown request while a guarded mysqld is starting. In this case the Guardian thread tried to stop the mysqld, but might fail if the mysqld hadn't created pid-file so far. When this happened, the mysqld-monitor thread didn't stop, so the assert in Thread_registry happened. The fix is to make several attempts to stop mysqld if it is active.
* | | | Merge kpettersson@bk-internal.mysql.com:/home/bk/mysql-5.1-runtimeKristofer.Pettersson@naruto.2007-07-251-2/+2
|\ \ \ \ | | | | | | | | | | | | | | | into naruto.:C:/cpp/mysql-5.1-runtime
| * | | | Fix of build errors for windows.Kristofer.Pettersson@naruto.2007-07-251-2/+2
| | | | |
* | | | | Temporary enable IM tests in 5.1-runtime tree.anozdrin/alik@ibm.2007-07-251-2/+1
|/ / / / | | | | | | | | | | | | Enable assert in Thread_registry.
* | | | Bug#28012 Patch : IM crashes instead of reporting an error when mysqldpath ↵thek@adventure.(none)2007-07-235-94/+377
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is bad On the windows platform, if an instance object failed to initialize during program start, the instance manager would crash. This could happen if an incorrect mysqld path was supplied in the defaults configuration file. The patch prevents the program from crashing and makes it show an error message instead.
* | | Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/51tsmith@quadxeon.mysql.com2007-06-0512-128/+131
|\ \ \ | | | | | | | | | | | | into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun05/51
| * | | WL#3817: Simplify string / memory area types and make things more consistent ↵monty@mysql.com/narttu.mysql.fi2007-05-1012-128/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (first part) The following type conversions was done: - Changed byte to uchar - Changed gptr to uchar* - Change my_string to char * - Change my_size_t to size_t - Change size_s to size_t Removed declaration of byte, gptr, my_string, my_size_t and size_s. Following function parameter changes was done: - All string functions in mysys/strings was changed to use size_t instead of uint for string lengths. - All read()/write() functions changed to use size_t (including vio). - All protocoll functions changed to use size_t instead of uint - Functions that used a pointer to a string length was changed to use size_t* - Changed malloc(), free() and related functions from using gptr to use void * as this requires fewer casts in the code and is more in line with how the standard functions work. - Added extra length argument to dirname_part() to return the length of the created string. - Changed (at least) following functions to take uchar* as argument: - db_dump() - my_net_write() - net_write_command() - net_store_data() - DBUG_DUMP() - decimal2bin() & bin2decimal() - Changed my_compress() and my_uncompress() to use size_t. Changed one argument to my_uncompress() from a pointer to a value as we only return one value (makes function easier to use). - Changed type of 'pack_data' argument to packfrm() to avoid casts. - Changed in readfrm() and writefrom(), ha_discover and handler::discover() the type for argument 'frmdata' to uchar** to avoid casts. - Changed most Field functions to use uchar* instead of char* (reduced a lot of casts). - Changed field->val_xxx(xxx, new_ptr) to take const pointers. Other changes: - Removed a lot of not needed casts - Added a few new cast required by other changes - Added some cast to my_multi_malloc() arguments for safety (as string lengths needs to be uint, not size_t). - Fixed all calls to hash-get-key functions to use size_t*. (Needed to be done explicitely as this conflict was often hided by casting the function to hash_get_key). - Changed some buffers to memory regions to uchar* to avoid casts. - Changed some string lengths from uint to size_t. - Changed field->ptr to be uchar* instead of char*. This allowed us to get rid of a lot of casts. - Some changes from true -> TRUE, false -> FALSE, unsigned char -> uchar - Include zlib.h in some files as we needed declaration of crc32() - Changed MY_FILE_ERROR to be (size_t) -1. - Changed many variables to hold the result of my_read() / my_write() to be size_t. This was needed to properly detect errors (which are returned as (size_t) -1). - Removed some very old VMS code - Changed packfrm()/unpackfrm() to not be depending on uint size (portability fix) - Removed windows specific code to restore cursor position as this causes slowdown on windows and we should not mix read() and pread() calls anyway as this is not thread safe. Updated function comment to reflect this. Changed function that depended on original behavior of my_pwrite() to itself restore the cursor position (one such case). - Added some missing checking of return value of malloc(). - Changed definition of MOD_PAD_CHAR_TO_FULL_LENGTH to avoid 'long' overflow. - Changed type of table_def::m_size from my_size_t to ulong to reflect that m_size is the number of elements in the array, not a string/memory length. - Moved THD::max_row_length() to table.cc (as it's not depending on THD). Inlined max_row_length_blob() into this function. - More function comments - Fixed some compiler warnings when compiled without partitions. - Removed setting of LEX_STRING() arguments in declaration (portability fix). - Some trivial indentation/variable name changes. - Some trivial code simplifications: - Replaced some calls to alloc_root + memcpy to use strmake_root()/strdup_root(). - Changed some calls from memdup() to strmake() (Safety fix) - Simpler loops in client-simple.c
* | | | Merge pilot.blaudden:/home/msvensson/mysql/bug26664/my50-bug26664msvensson@pilot.blaudden2007-05-241-2/+2
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| into pilot.blaudden:/home/msvensson/mysql/bug26664/my51-bug26664
| * | Bug#26664 test suite times out on OS X 64bitmsvensson@pilot.blaudden2007-05-241-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | - The "mysql client in mysqld"(which is used by replication and federated) should use alarms instead of setting socket timeout value if the rest of the server uses alarm. By always calling 'my_net_set_write_timeout' or 'my_net_set_read_timeout' when changing the timeout value(s), the selection whether to use alarms or timeouts will be handled by ifdef's in those two functions. - Move declaration of 'vio_timeout' into "vio_priv.h"