summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
Commit message (Collapse)AuthorAgeFilesLines
* auto-mergeIngo Struewing2009-10-011-0/+5
|\
| * WL#4259 - Debug Sync FacilityIngo Struewing2009-09-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport from 6.0 to 5.1. Only those sync points are included, which are used in debug_sync.test. The Debug Sync Facility allows to place synchronization points in the code: open_tables(...) DEBUG_SYNC(thd, "after_open_tables"); lock_tables(...) When activated, a sync point can - Send a signal and/or - Wait for a signal Nomenclature: - signal: A value of a global variable that persists until overwritten by a new signal. The global variable can also be seen as a "signal post" or "flag mast". Then the signal is what is attached to the "signal post" or "flag mast". - send a signal: Assign the value (the signal) to the global variable ("set a flag") and broadcast a global condition to wake those waiting for a signal. - wait for a signal: Loop over waiting for the global condition until the global value matches the wait-for signal. Please find more information in the top comment in debug_sync.cc or in the worklog entry.
* | Bug#46958: Assertion in Diagnostics_area::set_ok_status, Martin Hansson2009-09-281-1/+2
|/ | | | | | | | | | | | | | | | | | trigger, merge table The problem with break statements is that they have very local effects. Hence a break statement within the inner loop of a nested-loops join caused execution to proceed to the next table even though a serious error occurred. The problem was fixed by breaking out the inner loop into its own method. The change empowers all errors to terminate the execution. The errors that will now halt multi-DELETE execution altogether are - triggers returning errors - handler errors - server being killed
* Bug#42364 SHOW ERRORS returns empty resultset after dropping non existent tableSergey Glukhov2009-09-101-0/+25
| | | | partial backport of bug43138 fix
* Merge mysql-5.1-innodb_plugin to mysql-5.1.Sergey Vojtovich2009-08-111-1/+1
|\
| * Merge 5.1-bugteam -> 5.1-innodb_plugin.Sergey Vojtovich2009-07-141-3/+40
| |\
| * | Backport WL#3653 to 5.1 to enable bundled innodb plugin.Vladislav Vaintroub2009-06-101-1/+1
| | | | | | | | | | | | | | | Remove custom DLL loader code from innodb plugin code, use symbols exported from mysqld.
* | | Bug# 30946: mysqldump silently ignores --default-character-setGleb Shchepa2009-07-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when used with --tab 1) New syntax: added CHARACTER SET clause to the SELECT ... INTO OUTFILE (to complement the same clause in LOAD DATA INFILE). mysqldump is updated to use this in --tab mode. 2) ESCAPED BY/ENCLOSED BY field parameters are documented as accepting CHAR argument, however SELECT .. INTO OUTFILE silently ignored rests of multisymbol arguments. For the symmetrical behavior with LOAD DATA INFILE the server has been modified to fail with the same error: ERROR 42000: Field separator argument is not what is expected; check the manual 3) Current LOAD DATA INFILE recognizes field/line separators "as is" without converting from client charset to data file charset. So, it is supposed, that input file of LOAD DATA INFILE consists of data in one charset and separators in other charset. For the compatibility with that [buggy] behaviour SELECT INTO OUTFILE implementation has been saved "as is" too, but the new warning message has been added: Non-ASCII separator arguments are not fully supported This message warns on field/line separators that contain non-ASCII symbols.
* | | Merge from 5.0Gleb Shchepa2009-07-241-21/+31
|\ \ \ | | | | | | | | | | | | ****** manual merge 5.0-bugteam --> 5.1-bugteam (bug 38816)
| * | | Bug #38816: kill + flush tables with read lock + storedGleb Shchepa2009-07-241-21/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | procedures causes crashes! The problem of that bugreport was mostly fixed by the patch for bug 38691. However, attached test case focused on another crash or valgrind warning problem: SHOW PROCESSLIST query accesses freed memory of SP instruction that run in a parallel connection. Changes of thd->query/thd->query_length in dangerous places have been guarded with the per-thread LOCK_thd_data mutex (the THD::LOCK_delete mutex has been renamed to THD::LOCK_thd_data).
| * | | Pull 5.1 treatment of community features into 5.0.Chad MILLER2009-05-051-1/+1
| | | |
| * | | Merge 5.0.80 release and 5.0 community. Version left at 5.0.80.Chad MILLER2009-04-141-0/+11
| |\ \ \
| * \ \ \ Merge from Tim's 5.0.76-release tree to make 5.0.77 .Chad MILLER2009-01-211-0/+7
| |\ \ \ \
| * \ \ \ \ Merged from 5.0 (enterprise).Chad MILLER2008-12-171-11/+19
| |\ \ \ \ \
| * \ \ \ \ \ Merge chunk from trunk.Chad MILLER2008-07-101-1/+1
| |\ \ \ \ \ \
| * \ \ \ \ \ \ Merge chunk from trunk.Chad MILLER2008-07-101-6/+38
| |\ \ \ \ \ \ \
| * \ \ \ \ \ \ \ Merge bk-internal.mysql.com:/home/bk/mysql-5.0cmiller@zippy.cornsilk.net2007-12-101-0/+8
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community
| | * \ \ \ \ \ \ \ Merge bk-internal.mysql.com:/home/bk/mysql-5.0cmiller@zippy.cornsilk.net2007-09-101-0/+8
| | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community
| | | * \ \ \ \ \ \ \ Merge mysqldev@production.mysql.com:my/mysql-5.0-releasecmiller@zippy.cornsilk.net2007-07-021-0/+8
| | | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community
| | | | * \ \ \ \ \ \ \ Merge mysqldev@production.mysql.com:my/mysql-5.0-releasecmiller@zippy.cornsilk.net2007-04-261-0/+8
| | | | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community
* | | | | | | | | | | | | Add a comment for thd->proc_info.Konstantin Osipov2009-07-221-0/+4
| |_|_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | |
* | | | | | | | | | | | Fix for a valgrind warning due to use of a uninitializedDavi Arnaut2009-06-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variable. The problem was that THD::connect_utime could be used without being initialized when the main thread is used to handle connections (--thread-handling=no-threads).
* | | | | | | | | | | | Bug#44672: Assertion failed: thd->transaction.xid_state.xid.is_null()Davi Arnaut2009-06-051-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that when a optimization of read-only transactions (bypass 2-phase commit) was implemented, it removed the code that reseted the XID once a transaction wasn't active anymore: sql/sql_parse.cc: - bzero(&thd->transaction.stmt, sizeof(thd->transaction.stmt)); - if (!thd->active_transaction()) - thd->transaction.xid_state.xid.null(); + thd->transaction.stmt.reset(); This mostly worked fine as the transaction commit and rollback functions (in handler.cc) reset the XID once the transaction is ended. But those functions wouldn't reset the XID in case of a empty transaction, leading to a assertion when a new starting a new XA transaction. The solution is to ensure that the XID state is reset when empty transactions are ended (by either commit or rollback). This is achieved by reorganizing the code so that the transaction cleanup routine is invoked whenever a transaction is ended.
* | | | | | | | | | | | BUG#41948 Query_log_event constructor needlessly contortedHe Zhenxing2009-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the caller of Query_log_event, Execute_load_log_event constructors and THD::binlog_query to provide the error code instead of having the constructors to figure out the error code.
* | | | | | | | | | | | Bug#44658 Create procedure makes server crash when user does not have ALL ↵Kristofer Pettersson2009-05-291-1/+29
| |_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | privilege MySQL crashes if a user without proper privileges attempts to create a procedure. The crash happens because more than one error state is pushed onto the Diagnostic area. In this particular case the user is denied to implicitly create a new user account with the implicitly granted privileges ALTER- and EXECUTE ROUTINE. The new account is needed if the original user account contained a host mask. A user account with a host mask is a distinct user account in this context. An alternative would be to first get the most permissive user account which include the current user connection and then assign privileges to that account. This behavior change is considered out of scope for this bug patch. The implicit assignment of privileges when a user creates a stored routine is a considered to be a feature for user convenience and as such it is not a critical operation. Any failure to complete this operation is thus considered non-fatal (an error becomes a warning). The patch back ports a stack implementation of the internal error handler interface. This enables the use of multiple error handlers so that it is possible to intercept and cancel errors thrown by lower layers. This is needed as a error handler already is used in the call stack emitting the errors which needs to be converted.
* | | | | | | | | | | Manual merge.Ramil Kalimullin2009-03-251-0/+3
|\ \ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|_|_|/ | |/| | | | | | | | |
| * | | | | | | | | | Auto-mergeRamil Kalimullin2009-03-251-0/+1
| |\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | Fix for bug#35383: binlog playback and replication breaksRamil Kalimullin2009-03-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | due to name_const substitution Problem: "In general, statements executed within a stored procedure are written to the binary log using the same rules that would apply were the statements to be executed in standalone fashion. Some special care is taken when logging procedure statements because statement execution within procedures is not quite the same as in non-procedure context". For example, each reference to a local variable in SP's statements is replaced by NAME_CONST(var_name, var_value). Queries like "CREATE TABLE ... SELECT FUNC(local_var ..." are logged as "CREATE TABLE ... SELECT FUNC(NAME_CONST("local_var", var_value) ..." that leads to differrent field names and might result in "Incorrect column name" if var_value is long enough. Fix: in 5.x we'll issue a warning in such a case. In 6.0 we should get rid of NAME_CONST(). Note: this issue and change should be described in the documentation ("Binary Logging of Stored Programs").
* | | | | | | | | | | | Bug#43748: crash when non-super user tries to kill the replication threadsTatiana A. Nurnberg2009-03-251-0/+1
|\ \ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / | |/| | | | | | | | | | manual merge. also adds test specific to 5.1+
| * | | | | | | | | | | Bug#43748: crash when non-super user tries to kill the replication threadsTatiana A. Nurnberg2009-03-251-0/+1
| |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fine-tuning. Broke out comparison into method by suggestion of Davi. Clarified comments. Reverting test-case which I find too brittle; proper test case in 5.1+.
| * | | | | | | | | | BUG#37051 Replication rules not evaluated correctlyHe Zhenxing2009-03-051-0/+7
| | |_|_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backporting patch to 5.0.
* | | | | | | | | | MergeSergey Petrunia2009-03-191-1/+1
|\ \ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ auto-mergeIgnacio Galarza2009-03-171-0/+2
| |\ \ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ \ Bug#29125 Windows Server X64: so many compiler warningsIgnacio Galarza2009-02-131-1/+1
| |\ \ \ \ \ \ \ \ \ \ \ | | | |/ / / / / / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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#38826 Race in MYSQL_LOG::purge_logs is impossible to debug in productionLuis Soares2008-12-041-0/+7
| | | |_|_|_|_|_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BUG#39325 Server crash inside MYSQL_LOG::purge_first_log halts replicaiton The patch reverses the order of the purging and updating events for log and relay-log.info/index files respectively. This solves the problem of having holes caused by crashes happening between updating info/index files and purging logs. NOTE: This is a combined patch for BUG#38826 and BUG#39325. This patch is based on bugteam tree and takes into account reviewers suggestions.
| | * | | | | | | | | Bug#28323: Server crashed in xid cache operationsDavi Arnaut2008-10-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that the server did not robustly handle a unilateral roll back issued by the Resource Manager (RM) due to a resource deadlock within the transaction branch. By not acknowledging the roll back, the server (TM) would eventually corrupt the XA transaction state and crash. The solution is to mark the transaction as rollback-only if the RM indicates that it rolled back its branch of the transaction.
| | * | | | | | | | | Bug#24289 Status Variable "Questions" gets wrong values with Stored RoutinesKristofer Pettersson2008-10-091-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running Stored Routines the Status Variable "Questions" was wrongly incremented. According to the manual it should contain the "number of statements that clients have sent to the server" Introduced a new status variable 'questions' to replace the query_id variable which currently corresponds badly with the number of statements sent by the client. The new behavior is ment to be backward compatible with 4.0 and at the same time work with new features in a similar way. This is a backport from 6.0
* | | | | | | | | | | MergeSergey Petrunia2009-03-101-0/+2
|\ \ \ \ \ \ \ \ \ \ \ | | |_|/ / / / / / / / | |/| | | | | | | | |
| * | | | | | | | | | BUG#41980 SBL, INSERT .. SELECT .. LIMIT = ERROR, even when @@SQL_LOG_BIN is 0 !Guangbao Ni2009-03-051-0/+2
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When binlog_format is STATEMENT and the statement is unsafe before, the unsafe warning/error message was issued without checking whether the SQL_LOG_BIN was turned on or not. Fixed with adding a sql_log_bin_toplevel flag in THD to check whether SQL_LOG_BIN is ON in current session whatever the current is in sp or not.
* | | | | | | | | | - Backport @@optimizer_switch support from 6.0Sergey Petrunia2009-02-231-0/+2
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add support for setting it as a server commandline argument - Add support for those switches: = no_index_merge = no_index_merge_union = no_index_merge_sort_union = no_index_merge_intersection
* | | | | | | | | merge: 5.1 -> 5.1-rplLuis Soares2009-01-231-2/+9
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | conflicts: Text conflict in client/mysqltest.cc Text conflict in mysql-test/include/wait_until_connected_again.inc Text conflict in mysql-test/lib/mtr_report.pm Text conflict in mysql-test/mysql-test-run.pl Text conflict in mysql-test/r/events_bugs.result Text conflict in mysql-test/r/log_state.result Text conflict in mysql-test/r/myisam_data_pointer_size_func.result Text conflict in mysql-test/r/mysqlcheck.result Text conflict in mysql-test/r/query_cache.result Text conflict in mysql-test/r/status.result Text conflict in mysql-test/suite/binlog/r/binlog_index.result Text conflict in mysql-test/suite/binlog/r/binlog_innodb.result Text conflict in mysql-test/suite/rpl/r/rpl_packet.result Text conflict in mysql-test/suite/rpl/t/rpl_packet.test Text conflict in mysql-test/t/disabled.def Text conflict in mysql-test/t/events_bugs.test Text conflict in mysql-test/t/log_state.test Text conflict in mysql-test/t/myisam_data_pointer_size_func.test Text conflict in mysql-test/t/mysqlcheck.test Text conflict in mysql-test/t/query_cache.test Text conflict in mysql-test/t/rpl_init_slave_func.test Text conflict in mysql-test/t/status.test
| * \ \ \ \ \ \ \ \ merged 5.1-main -> 5.1-bugteamGeorgi Kodinov2009-01-051-1/+1
| |\ \ \ \ \ \ \ \ \
| * | | | | | | | | | Bug#24289 Status Variable "Questions" gets wrong values with Stored ↵Sergey Glukhov2008-12-171-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Routines(for 5.1)
* | | | | | | | | | | merge: 5.1 -> 5.1-rplLuis Soares2009-01-081-1/+1
|\ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | conflicts: Text conflict in mysql-test/lib/mtr_report.pm Text conflict in mysql-test/mysql-test-run.pl
| * | | | | | | | | | Added "Sun Microsystems, Inc." to copyright headers on files modifiedBuild Team2008-11-101-1/+1
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | since Oct 1st
* | | | | | | | | | merging 5.1 -> 5.1 rpl. 3 of 4 conflicts are resolved similarly to ↵Andrei Elkin2008-11-121-1/+3
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6.0->6.0-rpl merging. mysql_upgrade results changed due to the error messesge of mysqlcheck has changed.
| * | | | | | | | | Merge Bug#28323 to mysql-5.1.29-rcDavi Arnaut2008-10-211-1/+3
| |\ \ \ \ \ \ \ \ \
| | * | | | | | | | | Bug#28323: Server crashed in xid cache operationsDavi Arnaut2008-10-211-1/+3
| | |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that the server did not robustly handle a unilateral roll back issued by the Resource Manager (RM) due to a resource deadlock within the transaction branch. By not acknowledging the roll back, the server (TM) would eventually corrupt the XA transaction state and crash. The solution is to mark the transaction as rollback-only if the RM indicates that it rolled back its branch of the transaction.
* | | | | | | | | | Merging 5.1 main into 5.1-rplMats Kindahl2008-10-231-0/+4
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / /
| * | | | | | | | | WL4403: --general_log and --slow_query_log don't turn on the logging.Georgi Kodinov2008-10-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed a compilation warning