summaryrefslogtreecommitdiff
path: root/sql-common
Commit message (Collapse)AuthorAgeFilesLines
* Auto-merge from mysql-next-mr.Alexander Nozdrin2009-11-051-122/+140
|\
| * Merge from mysql-next-mr.Alexander Nozdrin2009-10-281-37/+285
| |\
| * \ Merge from mysql-next-mr.Alexander Nozdrin2009-10-231-2/+1
| |\ \
| * | | Backport of revno 2630.28.10, 2630.28.31, 2630.28.26, 2630.33.1,Konstantin Osipov2009-10-221-16/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2630.39.1, 2630.28.29, 2630.34.3, 2630.34.2, 2630.34.1, 2630.29.29, 2630.29.28, 2630.31.1, 2630.28.13, 2630.28.10, 2617.23.14 and some other minor revisions. This patch implements: WL#4264 "Backup: Stabilize Service Interface" -- all the server prerequisites except si_objects.{h,cc} themselves (they can be just copied over, when needed). WL#4435: Support OUT-parameters in prepared statements. (and all issues in the initial patches for these two tasks, that were discovered in pushbuild and during testing). Bug#39519: mysql_stmt_close() should flush all data associated with the statement. After execution of a prepared statement, send OUT parameters of the invoked stored procedure, if any, to the client. When using the binary protocol, send the parameters in an additional result set over the wire. When using the text protocol, assign out parameters to the user variables from the CALL(@var1, @var2, ...) specification. The following refactoring has been made: - Protocol::send_fields() was renamed to Protocol::send_result_set_metadata(); - A new Protocol::send_result_set_row() was introduced to incapsulate common functionality for sending row data. - Signature of Protocol::prepare_for_send() was changed: this operation does not need a list of items, the number of items is fully sufficient. The following backward incompatible changes have been made: - CLIENT_MULTI_RESULTS is now enabled by default in the client; - CLIENT_PS_MULTI_RESUTLS is now enabled by default in the client.
| * | | Backport of:Konstantin Osipov2009-10-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------ revno: 2476.657.208 committer: anozdrin/alik@station. timestamp: Tue 2007-12-04 17:22:53 +0300 message: Remove rpl_probe, enable_rpl_parse and disable_rpl_parse commands from mysqltest, the corresponding funtctions have been removed from MySQL C API
| * | | Backport of:Konstantin Osipov2009-10-161-104/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------ revno: 2476.981.1 committer: msvensson@pilot.mysql.com timestamp: Mon 2007-11-26 19:03:23 +0100 message: Bug#31952 Remove undocumented mysql_rpl_* functions. - Functions removed + variables in st_mysql and st_mysql_options renamed to "unused". - Code updated to work without those functions and variables
| * | | Bug #33831 mysql_real_connect() connects again if Magne Mahre2009-10-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | given an already connected MYSQL handle mysql_real_connect() did not check whether the MYSQL connection handler was already connected and connected again even if so. Now a CR_ALREADY_CONNECTED error is returned.
* | | | backport of dbug extensions from 6.0:Sergei Golubchik2009-10-301-1/+1
| |_|/ |/| | | | | | | | | | | | | | function/ syntax glob(7) wildcards unit tests
* | | Automerge from mysql-next-mr.Alexander Nozdrin2009-10-271-0/+2
|\ \ \
| * \ \ manual merge: mysql-5.1-rep+2-delivery1 --> mysql-5.1-rpl-mergeLuis Soares2009-10-221-0/+2
| |\ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | Backport BUG#25192 Using relay-log and relay-log-index without values ↵He Zhenxing2009-10-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | produces unexpected results. Options loaded from config files were added before command line arguments, and they were parsed together, which could interprete the following: option-a option-b as --option-a=--option-b if 'option-a' requires a value, and caused confusing. Because all options that requires a value are always given in the form '--option=value', so it's an error if there is no '=value' part for such an option read from config file. This patch added a separator to separate the arguments from config files and that from command line, so that they can be handled differently. And report an error for options loaded from config files that requires a value and is not given in the form '--option=value'.
* | | | Automerge from mysql-next-mr.Alexander Nozdrin2009-10-231-2/+1
|\ \ \ \ | |/ / /
| * | | Manual merge from mysql-trunk-merge.Alexander Nozdrin2009-10-141-2/+1
| |\ \ \ | | |_|/ | |/| |
| | * | Merge from 5.0Staale Smedseng2009-09-171-2/+1
| | |\ \ | | | |/ | | |/|
| | | * Bug #43414 Parenthesis (and other) warnings compiling MySQLStaale Smedseng2009-09-171-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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().
* | | | WL#1349 Use operating system localization to send it as a default client ↵Alexander Barkov2009-10-211-37/+283
|/ / / | | | | | | | | | character set
* | | auto-mergeIngo Struewing2009-09-301-2/+2
|\ \ \
| * | | Fix for BUG#42980 "Client doesn't set NUM_FLAG for DECIMAL and TIMESTAMP":Guilhem Bichot2009-09-301-2/+2
| |/ / | | | | | | | | | | | | DECIMAL and TIMESTAMP used to have NUM_FLAG, but NEWDECIMAL was forgotten. It's correct that TIMESTAMP does not have the flag nowadays (manual will be updated, connectors developers will be notified).
* | | Bug#37267 - connect() EINPROGRESS failures mishandled in client libraryIngo Struewing2009-09-301-15/+62
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We cann connect() in a non-blocking mode to be able to specify a non-standard timeout. The problem was that we did not fetch the status from the non-blocking connect(). We assumed that poll() would not return a POLLIN flag if the connect failed. But on some platforms this is not true. After a successful poll() we do now retrieve the status value from connect() with getsockopt(...SO_ERROR...). Now we do know if (and how) the connect failed. The test case for my investigation was rpl.rlp_ssl1 on an Ubuntu 9.04 x86_64 machine. Both, IPV4 and IPV6 were active. 'localhost' resolved first for IPV6 and then for IPV4. The connection over IPV6 was blocked. rpl.rlp_ssl1 timed out as it did not notice the failed connect(). The first read() failed, which was interpreted as a master crash and the connection was tried to reestablish with the same result until the retry limit was reached. With the fix, the connect() problem is immediately recognized, and the connect() is retried on the second resolution for 'localhost', which is successful.
* | Post fix patch for bug#20577 and bug#46362.Mattias Jonsson2009-09-011-2/+3
| | | | | | | | On 64-bits machines the calculation gets the wrong types and results in very large numbers. Fixed by explicitly cast month to (int)
* | manual mergeTatiana A. Nurnberg2009-08-311-0/+9
|\ \ | |/
| * Bug#35132: MySQLadmin --wait ping always crashes on Windows systemsTatiana A. Nurnberg2009-08-311-0/+9
| | | | | | | | | | | | | | | | Failing to connect would release parts of the MYSQL struct. We would then proceed to try again to connect without re- initializing the struct. We prevent the unwanted freeing of data we'll still need now.
* | Merge from 5.0 for 43414Staale Smedseng2009-08-282-4/+2
|\ \ | |/
| * Bug #43414 Parenthesis (and other) warnings compiling MySQLStaale Smedseng2009-08-282-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Manual merge between bug#46362 and bug#20577.Mattias Jonsson2009-08-281-3/+1
|\ \
| * | Bug#46362: Endpoint should be set to false for TO_DAYS(DATE)Mattias Jonsson2009-08-261-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a problem since pruning uses the field for comparison (while evaluate_join_record uses longlong), resulting in pruning failures when comparing DATE to DATETIME. Fix was to always comparing DATE vs DATETIME as DATETIME, by adding ' 00:00:00' to the DATE string. And adding optimization for comparing with 23:59:59, so that DATETIME_col > '2001-02-03 23:59:59' -> TO_DAYS(DATETIME_col) > TO_DAYS('2001-02-03 23:59:59') instead of '>='.
* | | Merge from mysql-5.0-bugteam.Davi Arnaut2009-08-131-0/+3
|\ \ \ | |/ / |/| / | |/
| * Bug#46013: rpl_extraColmaster_myisam fails on pb2Davi Arnaut2009-08-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Bug#45017: Failure to connect if hostname maps to multiple addressesDavi Arnaut2009-07-301-7/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that the C API function mysql_real_connect only attempts to connect to the first IP address returned for a hostname. This can be a problem if a hostname maps to multiple IP address and the server is not bound to the first one that is returned. The solution is to augment mysql_real_connect so that it attempts to connect to all IPv4 addresses that a domain name maps to. The function goes over the list of address until a successful connection is established. No test case is provided as its not possible to test this automatically with the current testing infrastructure.
* | Merge from mysql-5.0-bugteam.Davi Arnaut2009-06-101-4/+16
|\ \ | |/
| * Bug#41190: shared memory connections do not work in Vista, if server started ↵Davi Arnaut2009-06-101-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from cmdline Backport to MySQL 5.0/1 fix by Vladislav Vaintroub: In Vista and later and also in when using terminal services, when server is started from command line, client cannot connect to it via shared memory protocol. This is a regression introduced when Bug#24731 was fixed. The reason is that client is trying to attach to shared memory using global kernel object namespace (all kernel objects are prefixed with Global\). However, server started from the command line in Vista and later will create shared memory and events using current session namespace. Thus, client is unable to find the server and connection fails. The fix for the client is to first try to find server using "local" names (omitting Global\ prefix) and only if server is not found, trying global namespace.
* | Adding missing forward declaration for bug 43560Staale Smedseng2009-05-201-1/+2
| |
* | Recommit of bug 43560 after merge with mysql-5.1-bugteamStaale Smedseng2009-05-201-24/+44
| |
* | auto-mergeIgnacio Galarza2009-03-191-1/+1
|\ \
| * | Fix for bug #40552: Race condition around default_directories Alexey Kopytov2009-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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().
* | | auto-mergeIgnacio Galarza2009-03-171-1/+12
|\ \ \ | |/ /
| * | Bug#42146 - DATETIME fractional seconds parse errorTatiana A. Nurnberg2009-02-131-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#38435 - LONG Microseconds cause MySQL to fail a CAST to DATETIME or DATE Parsing of optional microsecond part in datetime did not fail gracefully when field width was larger than the allowed six places. Now handles up to the correct six places, and disregards any extra digits without messing up what we've already got.
* | | Bug#29125 Windows Server X64: so many compiler warningsIgnacio Galarza2009-02-132-3/+3
|\ \ \ | |/ / |/| / | |/ | | | | - 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-102-3/+3
| | | | | | | | | | - 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
* | auto-mergeTatiana A. Nurnberg2009-01-091-6/+7
|\ \ | |/
| * Bug#41470: DATE_FORMAT() crashes the complete server with a valid dateTatiana A. Nurnberg2009-01-081-6/+7
| | | | | | | | | | | | | | Passing dubious "year zero" in non-zero date (not "0000-00-00") could lead to negative value for year internally, while variable was unsigned. This led to Really Bad Things further down the line. Now doing calculations with signed type for year internally.
| * Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug26294/my50-bug26294cmiller@zippy.cornsilk.net2008-04-031-3/+3
| |\ | | | | | | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-build
| * | fixed warnings and compile errors from the fix for bug 26243gkodinov/kgeorge@macbook.gmz2008-03-291-1/+1
| | |
| * | Merge quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0anozdrin/alik@quad.opbmk2008-03-181-3/+7
| |\ \ | | | | | | | | | | | | into quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0-rt-merged
* | \ \ Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug26294/my51-bug26294cmiller@zippy.cornsilk.net2008-04-031-3/+3
|\ \ \ \ | | | | | | | | | | | | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-build
| * \ \ \ Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug26294/my50-bug26294cmiller@zippy.cornsilk.net2008-04-031-3/+3
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/bug26294/my51-bug26294
| | * | | Bug#26294: library name conflict between MySQL 4.x, 5.0 and Qt 3.3cmiller@zippy.cornsilk.net2008-04-031-3/+3
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | When linking with some external programs, "multiple definition of `init_time'" Rename init_time() to my_init_time() to avoid collision with other libraries (particularly libmng).
* | | | Merge quad.opbmk:/mnt/raid/alik/MySQL/devel/5.1anozdrin/alik@quad.opbmk2008-03-181-4/+24
|\ \ \ \ | |/ / / |/| | | | | | | into quad.opbmk:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
| * | | Merge buzz.(none):/home/davi/mysql-5.0-runtimedavi@buzz.(none)2008-03-171-3/+7
| |\ \ \ | | | |/ | | |/| | | | | into buzz.(none):/home/davi/mysql-5.1-runtime
| | * | Bug#35103 mysql_client_test::test_bug29948 causes sporadic failuresdavi@mysql.com/endora.local2008-03-141-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that the COM_STMT_SEND_LONG_DATA was sending a response packet if the prepared statement wasn't found in the server (due to reconnection). The commands COM_STMT_SEND_LONG_DATA and COM_STMT_CLOSE should not send any packets, even error packets should not be sent since they are not expected by the client API. The solution is to clear generated during the execution of the aforementioned commands and to skip resend of prepared statement commands. Another fix is that if the connection breaks during the send of prepared statement command, the command is not sent again since the prepared statement is no longer in the server.