summaryrefslogtreecommitdiff
path: root/sql/log.cc
Commit message (Collapse)AuthorAgeFilesLines
* Bug#37027 expire_logs_days and missing binlogs cause a crash !Kristofer Pettersson2008-07-241-45/+97
| | | If the server failed to expired log files during start up it could crash.
* Merge mysql1000.(none):/home/andrei/MySQL/FIXES/5.0/bug18199-purge_no_warnaelkin/andrei@mysql1000.(none)2008-03-211-26/+127
|\ | | | | | | into mysql1000.(none):/home/andrei/MySQL/MERGE/5.0-bug18199_35178
| * Bug #18199 PURGE BINARY LOGS fails silently with missing logs;aelkin/andrei@mysql1000.(none)2008-03-171-26/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug #18453 Warning/error message if there is a mismatch between ... There were three problems: 1. the reported lack of warnings for the BEFORE syntax of PURGE; 2. the similar lack of warnings for the TO syntax; 3. incompatible behaviour between the two in that the latter blanked out regardlessly of presence or lack the actual file corresponding to an index record; the former version gave up at the first mismatch. fixed with deploying the warning's generation and synronizing logics of purge_logs() and purge_logs_before_date(). my_stat() is called in either of two branches of purge_logs() (responsible for the TO syntax of PURGE) similarly to how it has behaved in the BEFORE syntax. If there is no actual binlog file, my_stat returns NULL and my_delete is not invoked. A critical error is reported to the user if a file from the index could not be retrieved info about or deleted with a system error code different than ENOENT.
* | Merge bk@192.168.21.1:mysql-5.0-optholyfoot/hf@hfmain.(none)2008-02-271-6/+1
|\ \ | |/ |/| | | into mysql.com:/home/hf/work/25097/my50-25097
| * Bug #25097 mysql_server_init fails silently if no errmsg.sys is present.holyfoot/hf@mysql.com/hfmain.(none)2008-02-271-6/+1
| | | | | | | | | | | | | | There was no way to return an error from the client library if no MYSQL connections was established. So here i added variables to store that king of errors and made functions like mysql_error(NULL) to return these.
* | Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0mkindahl@dl145h.mysql.com2008-01-311-29/+71
|\ \ | |/ |/| | | into dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge
| * BUG#26395: if crash during autocommit update to transactional table on ↵sven@riska.(none)2007-12-211-29/+71
| | | | | | | | | | | | | | | | master, slave fails Now, every transaction (including autocommit transactions) start with a BEGIN and end with a COMMIT/ROLLBACK in the binlog. Added a test case, and updated lots of test case result files.
* | Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opttnurnberg@white.intern.koehntopp.de2007-12-171-2/+2
|\ \ | |/ |/| | | into mysql.com:/misc/mysql/31752_/50-31752_
| * Merge mysql.com:/misc/mysql/31752_/41-31752_tnurnberg@mysql.com/white.intern.koehntopp.de2007-12-171-1/+1
| |\ | | | | | | | | | into mysql.com:/misc/mysql/31752_/50-31752_
| | * Bug#31752: check strmake() boundstnurnberg@mysql.com/white.intern.koehntopp.de2007-12-061-1/+1
| | | | | | | | | | | | post-fixes: prevent semi-related overflow, additional comments
| * | Merge mysql.com:/misc/mysql/31752_/41-31752_tnurnberg@white.intern.koehntopp.de2007-11-261-1/+1
| |\ \ | | |/ | | | | | | into mysql.com:/misc/mysql/31752_/50-31752_
| | * Bug#31752: check strmake() boundstnurnberg@mysql.com/white.intern.koehntopp.de2007-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | strmake() calls are easy to get wrong. Add checks in extra debug mode to identify possible exploits. Remove some dead code. Remove some off-by-one errors identified with new checks.
| | * Bug#22645 LC_TIME_NAMES: Statement not replicatedbar@mysql.com/bar.intranet.mysql.r18.ru2006-12-051-0/+15
| | | | | | | | | | | | | | | | | | | | | Problem: replication of LC_TIME_NAMES didn't work. Thus, INSERTS or UPDATES using date_format() always worked with en_US on the slave side. Fix: adding ONE_SHOT implementation for LC_TIME_NAMES.
| | * Merge perch.ndb.mysql.com:/home/jonas/src/41-workjonas@perch.ndb.mysql.com2006-09-041-2/+7
| | |\ | | | | | | | | | | | | into perch.ndb.mysql.com:/home/jonas/src/mysql-4.1-ndb
* | | | Bug #28597 Replication doesn't start after upgrading to 5.1.18aelkin/elkin@koti.dsl.inet.fi2007-11-051-7/+4
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since bug@20166, which replaced the binlog file name generating to base on pidfile_name instead of the previous glob_hostname, the binlog file name suddenly started to be stored solely in the absolute path format, including a case when --log-bin option meant a relative path. What's more serious, the path for binlog file can lead unrequestedly to pid-file directory so that after any proper fix for this bug there might be similar to the bug report consequences for one who upgrades from post-fix-bug@20166-pre-fix-bug@28597 to post-fix-bug@28597. Fixed with preserving`pidfile_name' (intr.by bug@20166) but stripping off its directory part. This restores the original logics of storing the names in compatible with --log-bin option format and with the requirement for --log-bin ralative path to corresond to the data directory. Side effects for this fix: effective fixing bug@27070, refining its test; ensuring no overrun for buff can happen anymore (Bug#31836 insufficient space reserved for the suffix of relay log file name); bug#31837 --remove_file $MYSQLTEST_VARDIR/tmp/bug14157.sql missed in rpl_temporary.test; fixes Bug@28603 Invalid log-bin default location;
* | | (pushing for Andrei)gkodinov/kgeorge@magare.gmz2007-07-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug #27417 thd->no_trans_update.stmt lost value inside of SF-exec-stack Once had been set the flag might later got reset inside of a stored routine execution stack. The reason was in that there was no check if a new statement started at time of resetting. The artifact affects most of binlogable DML queries. Notice, that multi-update is wrapped up within bug@27716 fix, multi-delete bug@29136. Fixed with saving parent's statement flag of whether the statement modified non-transactional table, and unioning (merging) the value with that was gained in mysql_execute_command. Resettling thd->no_trans_update members into thd->transaction.`member`; Asserting code; Effectively the following properties are held. 1. At the end of a substatement thd->transaction.stmt.modified_non_trans_table reflects the fact if such a table got modified by the substatement. That also respects THD::really_abort_on_warnin() requirements. 2. Eventually thd->transaction.stmt.modified_non_trans_table will be computed as the union of the values of all invoked sub-statements. That fixes this bug#27417; Computing of thd->transaction.all.modified_non_trans_table is refined to base to the stmt's value for all the case including insert .. select statement which before the patch had an extra issue bug@28960. Minor issues are covered with mysql_load, mysql_delete, and binloggin of insert in to temp_table select. The supplied test verifies limitely, mostly asserts. The ultimate testing is defered for bug@13270, bug@23333.
* | | Moved the DBUG_ASSERT from bug 28983 togkodinov/kgeorge@magare.gmz2007-07-301-0/+1
| | | | | | | | | | | | | | | a place where it would not obstruct correct multithreading.
* | | Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-mainttnurnberg@sin.intern.azundris.com2007-07-101-7/+9
|\ \ \ | | | | | | | | | | | | into mysql.com:/home/tnurnberg/22540/50-22540
| * | | Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using ↵tnurnberg@mysql.com/sin.intern.azundris.com2007-07-091-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | InnoDB dollin' it up for Guilhem ;) -- test streamlined, better comments, faster code, add'l assert.
* | | | Merge sita.local:/Users/tsmith/m/bk/50tsmith@sita.local2007-07-091-5/+5
|\ \ \ \ | |/ / / |/| | | | | | | into sita.local:/Users/tsmith/m/bk/maint/50
| * | | Bug #28983: 'reset master' in multiple threads and innodb tables gkodinov/kgeorge@magare.gmz2007-07-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | asserts debug binary We can't reliably check if the binary log is opened without acquiring its mutex. Fixed by removing this check.
* | | | Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using ↵tnurnberg@sin.intern.azundris.com2007-07-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | InnoDB minor fixes to appease pushbuild.
* | | | Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using ↵tnurnberg@sin.intern.azundris.com2007-06-301-35/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | InnoDB previous correction didn't. make sure "tail" is fixed up when filling cache several times; rework formulae.
* | | | Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using ↵tnurnberg@sin.intern.azundris.com2007-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | InnoDB Windows fixies
* | | | Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using ↵tnurnberg@sin.intern.azundris.com2007-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | InnoDB windows fixies
* | | | Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using ↵tnurnberg@sin.intern.azundris.com2007-06-251-22/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InnoDB end_log_pos data within a transaction are relative to the start of the transaction rather than absolute. we fix those groups in situ before writing the log out. additional comments and handling for groups with very large single events, as suggested by Guilhem.
* | | | Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS ↵tnurnberg@sin.intern.azundris.com2007-06-251-4/+59
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | using InnoDB fix binlog-writing so that end_log_pos is given correctly even within transactions for both SHOW BINLOG and SHOW MASTER STATUS, that is as absolute values (from log start) rather than relative values (from transaction's start). --- Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint into sin.intern.azundris.com:/home/tnurnberg/22540/50-22540
* | | Remove dangerous "remove warning" hack, cast to longmsvensson@pilot.blaudden2007-04-271-1/+1
| | | | | | | | | | | | | | | | | | will truncate the time value on systems where "long" are 32bit, instead use time_t as datatype
* | | Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0jani@ua141d10.elisa.omakaista.fi2007-04-121-54/+42
|\ \ \ | | | | | | | | | | | | into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-marvel
| * | | Fix warning on Windowstsmith@siva.hindu.god2007-03-281-2/+2
| | | |
| * | | Remove warning when compiling libmysqld/log.cctsmith@siva.hindu.god2007-03-281-31/+31
| | | |
| * | | Merge pilot.blaudden:/home/msvensson/mysql/bug27490/my50-bug27490msvensson@pilot.blaudden2007-03-281-23/+11
| |\ \ \ | | | | | | | | | | | | | | | into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
| | * | | Bug#27490 Function to log to NT event log could allocate memorymsvensson@pilot.blaudden2007-03-281-23/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Change 'print_buffer_to_nt_event_log' to overwrite the string if the buffer is not long enough to hold the ending CR/LF's - Make functions static - Remove the "hack" intended to force 'print_buffer_to_nt_event_log' never to use "new"
* | | | | Bug #27395 OPTION_STATUS_NO_TRANS_UPDATE is not preserved at the end of SF()aelkin/elkin@andrepl.(none)2007-03-231-2/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit was not restored at the end of SF() invocation, where SF() modified non-ta table. As the result of this artifact it was not possible to detect whether there were any side-effects when top-level query ends. If the top level query table was not modified and the bit is lost there would be no binlogging. Fixed with preserving the bit inside of thd->no_trans_update struct. The struct agregates two bool flags telling whether the current query and the current transaction modified any non-ta table. The flags stmt, all are dropped at the end of the query and the transaction.
* | | | Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0msvensson@pilot.blaudden2007-03-011-25/+40
|\ \ \ \ | | | | | | | | | | | | | | | into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
| * \ \ \ Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0lars/lthalmann@mysql.com/dl145j.mysql.com2007-03-011-2/+2
| |\ \ \ \ | | | | | | | | | | | | | | | | | | into mysql.com:/nfsdisk1/lars/MERGE/mysql-5.0-merge
| | * | | | Fixed compiler warnings.jani@ua141d10.elisa.omakaista.fi2007-02-281-2/+2
| | | | | |
| * | | | | Merge cbell@bk-internal.mysql.com:/home/bk/mysql-5.0-rplcbell/Chuck@mysql_cab_desk.2007-02-261-2/+2
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | into mysql_cab_desk.:C:/source/c++/mysql-5.0-rpl
| | * \ \ \ \ Merge mysql_cab_desk.:C:/source/c++/mysql-5.0-rplcbell/Chuck@mysql_cab_desk.2007-02-231-2/+2
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | into mysql_cab_desk.:C:/source/c++/mysql-5.0_BUG_20141
| | | * | | | | BUG#20141 "User-defined variables are not replicated properly for SF/cbell/Chuck@mysql_cab_desk.2007-02-231-2/+2
| | | | |/ / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Triggers in SBR mode." BUG#14914 "SP: Uses of session variables in routines are not always replicated" BUG#25167 "Dupl. usage of user-variables in trigger/function is not replicated correctly" User-defined variables used inside of stored functions/triggers in statements which did not update tables directly were not replicated. We also had problems with replication of user-defined variables which were used in triggers (or stored functions called from table-updating statements) more than once. This patch addresses the first issue by enabling logging of all references to user-defined variables in triggers/stored functions and not only references from table-updating statements. The second issue stemmed from the fact that for user-defined variables used from triggers or stored functions called from table-updating statements we were writing binlog events for each reference instead of only one event for the first reference. This problem is already solved for stored functions called from non-updating statements with help of "event unioning" mechanism. So the patch simply extends this mechanism to the case affected. It also fixes small problem in this mechanism which caused wrong logging of references to user-variables in cases when non-updating statement called several stored functions which used the same variable and some of these function calls were omitted from binlog as they were not updating any tables.
| * | | | | | Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpllars/lthalmann@mysql.com/dl145j.mysql.com2007-02-251-1/+1
| |\ \ \ \ \ \ | | |/ / / / / | | | | / / / | | |_|/ / / | |/| | | | into mysql.com:/nfsdisk1/lars/MERGE/mysql-5.0-merge
| | * | | | Backport from the Falcon tree.guilhem@gbichot3.local2007-02-151-1/+1
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When opening/creating the transaction coordinator's log, if binlog is used, the tc log is the binlog so we use the binlog's name; otherwise we use the mmap-based log, named after the mandatory argument of the --log-tc option (meant for that).
| * | | | Merge bk-internal.mysql.com:/home/bk/mysql-5.0monty@mysql.com/narttu.mysql.fi2007-01-221-20/+35
| |\ \ \ \ | | |/ / / | |/| | | | | | | | into mysql.com:/home/my/mysql-5.0
| | * | | Fixed compiler warnings detected by option -Wshadow and -Wunused:monty@mysql.com/narttu.mysql.fi2006-12-151-20/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removed not used variables and functions - Added #ifdef around code that is not used - Renamed variables and functions to avoid conflicts - Removed some not used arguments Fixed some class/struct warnings in ndb Added define IS_LONGDATA() to simplify code in libmysql.c I did run gcov on the changes and added 'purecov' comments on almost all lines that was not just variable name changes
* | | | | Bug#20166 mysql-test-run.pl does not test system privilege tables creationmsvensson@pilot.blaudden2007-02-201-1/+1
|/ / / / | | | | | | | | | | | | - Part 2, add @@hostname system variable
* | | | Many files:kent@mysql.com/kent-amd64.(none)2006-12-231-2/+1
|/ / / | | | | | | | | | Changed header to GPL version 2 only
* | | Fixed portability issue in my_thr_init.c (was added in my last push)monty@mysql.com/narttu.mysql.fi2006-11-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed compiler warnings (detected by VC++): - Removed not used variables - Added casts - Fixed wrong assignments to bool - Fixed wrong calls with bool arguments - Added missing argument to store(longlong), which caused wrong store method to be called.
* | | Merge bk-internal:/home/bk/mysql-5.0msvensson@neptunus.(none)2006-10-031-2/+2
|\ \ \ | | | | | | | | | | | | into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
| * | | Fix for the patch for bug#21726: Incorrect result with multiplekroki/tomash@moonlight.intranet2006-10-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | invocations of LAST_INSERT_ID. Reding of LAST_INSERT_ID inside stored function wasn't noted by caller, and no LAST_INSERT_ID_EVENT was issued for binary log. The solution is to add THD::last_insert_id_used_bin_log, which is much like THD::last_insert_id_used, but is reset only for upper-level statements. This new variable is used to issue LAST_INSERT_ID_EVENT.
* | | | WL #3516: MySQL Enterprise: implement Version Display Specificationtsmith/tim@siva.hindu.god2006-09-291-4/+7
|/ / / | | | | | | | | | | | | | | | Print version_comment after server version in: mysql.cc: Welcome message and 'status' command output log.cc: Top of log files