summaryrefslogtreecommitdiff
path: root/sql/slave.h
Commit message (Collapse)AuthorAgeFilesLines
...
| | | | * | | BUG#19033 (RBR: slave does not handle schema changes correctly):mats@romeo.(none)2007-01-261-0/+9
| | | | | |/ | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since checking table compatibility before locking the table, there were potential that a table could be locked that did not have a definition that was compatible with the table on the slave. This patch adds a check just after the table was locked to ensure that the table is (still) compatible with the table on the slave.
| | * | | | After merge fixesmonty@mysql.com/narttu.mysql.fi2007-01-291-2/+0
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed a lot of compiler warnings Removed not used variables, functions and labels Initialize some variables that could be used unitialized (fatal bugs) %ll -> %l
| | * | | Merge mysql.com:/home/kent/bk/main/mysql-5.0kent@kent-amd64.(none)2006-12-231-2/+1
| | |\ \ \ | | | |/ / | | |/| / | | | |/ into mysql.com:/home/kent/bk/main/mysql-5.1
| | | * Many files:kent@mysql.com/kent-amd64.(none)2006-12-231-2/+1
| | | | | | | | | | | | | | | | Changed header to GPL version 2 only
| | | * Merge bk-internal:/home/bk/mysql-5.0-maintjimw@rama.(none)2006-09-281-1/+2
| | | |\ | | | | | | | | | | | | | | | into rama.(none):/home/jimw/my/mysql-5.0-clean
| | * | | Refactoring: Moved master info functionality into rpl_mi.cc to lars@mysql.com/black.(none)2006-10-311-114/+3
| | | | | | | | | | | | | | | | | | | | make code easier to maintain.
| | * | | Merge siva.hindu.god:/usr/home/tim/m/bk/g51tsmith/tim@siva.hindu.god2006-09-291-1/+2
| | |\ \ \ | | | | | | | | | | | | | | | | | | into siva.hindu.god:/usr/home/tim/m/bk/mrg/51
| | | * \ \ Merge rama.(none):/home/jimw/my/mysql-5.0-cleanjimw@rama.(none)2006-09-281-1/+2
| | | |\ \ \ | | | | | |/ | | | | |/| | | | | | | into rama.(none):/home/jimw/my/mysql-5.1-clean
| | | | * | Merge rama.(none):/home/jimw/my/mysql-4.1-cleanjimw@rama.(none)2006-09-281-1/+2
| | | | |\ \ | | | | | | | | | | | | | | | | | | | | | into rama.(none):/home/jimw/my/mysql-5.0-clean
| | | | | * | Bug #2717: include/my_global.h mis-defines __attribute__jimw@rama.(none)2006-08-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix when __attribute__() is stubbed out, add ATTRIBUTE_FORMAT() for specifying __attribute__((format(...))) safely, make more use of the format attribute, and fix some of the warnings that this turns up (plus a bonus unrelated one).
| | * | | | | Merge mysql.com:/home/gluh/MySQL/Merge/5.0gluh@gluh.(none)2006-09-281-1/+1
| | |\ \ \ \ \ | | | |/ / / / | | |/| | | / | | | | |_|/ | | | |/| | into mysql.com:/home/gluh/MySQL/Merge/5.1
| | | * | | after merge fixgluh@mysql.com/gluh.(none)2006-09-271-1/+1
| | | |/ /
| | * | | Merge maint2.mysql.com:/data/localhome/tsmith/bk/mrg50/50tsmith@maint2.mysql.com2006-09-131-1/+1
| | |\ \ \ | | | |/ / | | | | | | | | | | into maint2.mysql.com:/data/localhome/tsmith/bk/mrg50/51
| | | * | after merge fixgluh@mysql.com/gluh.(none)2006-09-081-1/+1
| | | | |
| | | * | A fix for Bug#19022 "Memory bug when switching db during trigger execution". konstantin@mysql.com2006-06-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No test case as the bug is in an existing test case (rpl_trigger.test when it is run under valgrind). The warning was caused by memory corruption in replication slave: thd->db was pointing at a stack address that was previously used by sp_head::execute()::old_db. This happened because mysql_change_db behaved differently in replication slave and did not make a copy of the argument to assign to thd->db. The solution is to always free the old value of thd->db and allocate a new copy, regardless whether we're running in a replication slave or not.
| | | * | Fix yet another place that used uint32 instead of uint.konstantin@mysql.com2006-06-271-1/+1
| | | | |
| | | * | A fix and a test case forkonstantin@mysql.com2006-06-271-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#19022 "Memory bug when switching db during trigger execution" Bug#17199 "Problem when view calls function from another database." Bug#18444 "Fully qualified stored function names don't work correctly in SELECT statements" Documentation note: this patch introduces a change in behaviour of prepared statements. This patch adds a few new invariants with regard to how THD::db should be used. These invariants should be preserved in future: - one should never refer to THD::db by pointer and always make a deep copy (strmake, strdup) - one should never compare two databases by pointer, but use strncmp or my_strncasecmp - TABLE_LIST object table->db should be always initialized in the parser or by creator of the object. For prepared statements it means that if the current database is changed after a statement is prepared, the database that was current at prepare remains active. This also means that you can not prepare a statement that implicitly refers to the current database if the latter is not set. This is not documented, and therefore needs documentation. This is NOT a change in behavior for almost all SQL statements except: - ALTER TABLE t1 RENAME t2 - OPTIMIZE TABLE t1 - ANALYZE TABLE t1 - TRUNCATE TABLE t1 -- until this patch t1 or t2 could be evaluated at the first execution of prepared statement. CURRENT_DATABASE() still works OK and is evaluated at every execution of prepared statement. Note, that in stored routines this is not an issue as the default database is the database of the stored procedure and "use" statement is prohibited in stored routines. This patch makes obsolete the use of check_db_used (it was never used in the old code too) and all other places that check for table->db and assign it from THD::db if it's NULL, except the parser. How this patch was created: THD::{db,db_length} were replaced with a LEX_STRING, THD::db. All the places that refer to THD::{db,db_length} were manually checked and: - if the place uses thd->db by pointer, it was fixed to make a deep copy - if a place compared two db pointers, it was fixed to compare them by value (via strcmp/my_strcasecmp, whatever was approproate) Then this intermediate patch was used to write a smaller patch that does the same thing but without a rename. TODO in 5.1: - remove check_db_used - deploy THD::set_db in mysql_change_db See also comments to individual files.
| | * | | WL#3153 "Split logs". Recommit with post-review fixespetr@mysql.com2006-05-051-2/+2
| | | | |
| | * | | Merge mysql.com:/home/kostja/mysql/tmp_mergekonstantin@mysql.com2006-02-021-1/+1
| | |\ \ \ | | | |/ / | | | | | | | | | | into mysql.com:/home/kostja/mysql/mysql-5.1-merge
| | | * | many warnings (practically safe but annoying) correctedserg@serg.mylan2006-01-031-1/+1
| | | | |
| | * | | WL#1012: All changes as one single changeset.lars@mysql.com2005-12-221-274/+17
| | | | | | | | | | | | | | | | | | | | This includes both code and test cases.
| | * | | Merge mysql.com:/home/my/mysql-5.0monty@mysql.com2005-11-051-0/+11
| | |\ \ \ | | | |/ / | | | | | | | | | | into mysql.com:/home/my/mysql-5.1
| | | * | Merge mysql.com:/home/mysql_src/mysql-4.1guilhem@mysql.com2005-10-121-0/+11
| | | |\ \ | | | | |/ | | | | | | | | | | | | | | | into mysql.com:/home/mysql_src/mysql-5.0; a very bad automerge (issues with non-ascii chars), plus some hard conflicts I'll fix by hand in a next cset
| | | | * Fix for BUG#13023: "SQL Thread is up but doesn't move forward". Details in ↵guilhem@mysql.com2005-10-121-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | slave.cc; in short we now record whenever the slave I/O thread ignores a master's event because of its server id, and use this info in the slave SQL thread to advance Exec_master_log_pos. Because if we do not, this variable stays at the position of the last executed event, i.e. the last *non-ignored* executed one, which may not be the last of the master's binlog (and so the slave *looks* behind the master though it's data-wise it's not).
| | * | | Merge serg.mylan:/usr/home/serg/Abk/mysql-5.0serg@serg.mylan2005-10-091-2/+2
| | |\ \ \ | | | |/ / | | | | | | | | | | into serg.mylan:/usr/home/serg/Abk/mysql-5.1
| | | * | pthread_handler_decl() changed to be ctags-friendlyserg@serg.mylan2005-10-081-2/+2
| | | | | | | | | | | | | | | | | | | | (and contain extern "C" when necessary)
| | * | | Mergetomas@poseidon.ndb.mysql.com2005-10-061-1/+1
| | |\ \ \ | | | |/ /
| | | * | Fixed several boolean type options used in my_long_options[].jani@ua141d10.elisa.omakaista.fi2005-10-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some options were declared as 'bool', but since those are being handled in my_getopt.c, bool can be machine dependent. To make sure it works in all circumstances, the type should be my_bool for C (not C++) programs.
| | * | | 5.0 to 5.1 mergepatg@patrick.local2005-04-011-1/+9
| | |\ \ \ | | | |/ /
| | | * | merge from 4.1gbichot@quadita2.mysql.com2005-03-241-1/+8
| | | |\ \ | | | | |/
| | | | * "After Monty's review" changes to the fix for BUG#8325 "Deadlock in ↵gbichot@quadita2.mysql.com2005-03-231-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | replication thread stops replication": s/sleep/safe_sleep (thread safe); sleep 0/1/2/3/4/5/5/5 (get slave less late); no message on error log (deadlock is too common sometimes), a global counter instead (SHOW STATUS LIKE 'slave_retried_transactions'). Plus a fix for libmysql/Makefile.shared
| | | * | Last part of WL#1062: better replication of timezones: no more usegbichot@production.mysql.com2005-03-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | of SET ONE_SHOT; storing tz info directly in event (if this info is needed), it's now allowed to have different global tz on master and slave.
| | * | | WL#2472: Fixes according to reviewlars@mysql.com2005-03-221-2/+0
| | | | |
| | * | | Mergelars@mysql.com2005-03-211-34/+5
| | |\ \ \ | | | |/ / | | |/| |
| | | * | WL#2472: lars@mysql.com2005-03-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Renamed Table_filter to Rpl_filter Eliminated very annoying memory leak
| | | * | WL#2472: Addendum: Fixes after Mats reviewlars@mysql.com2005-03-101-0/+4
| | | | |
| | | * | WL#2472: Refactoring of replication and binlog filtering.lars@mysql.com2005-03-081-34/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Needed to be able to have multiple masters connected to same slave server with different filters.
| | * | | Mergeguilhem@mysql.com2005-03-021-1/+2
| | |\ \ \ | | | | |/ | | | |/|
| | | * | Fix for BUG#8325 "Deadlock in replication thread stops replication":guilhem@mysql.com2005-03-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | in slave SQL thread: if a transaction fails because of InnoDB deadlock or innodb_lock_wait_timeout exceeded, optionally retry the transaction a certain number of times (new variable --slave_transaction_retries).
| | * | | manually mergedserg@serg.mylan2005-02-141-10/+9
| | |\ \ \
| | | * | | open binlog index file *before* tc_log->open() and binlog itself *after*serg@serg.mylan2005-02-011-10/+9
| | | | | |
| | * | | | WL#1062 "log charset info into all Query_log_event":guilhem@mysql.com2005-02-031-0/+10
| | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we store 7 bytes (1 + 2*3) in every Query_log_event. In the future if users want binlog optimized for small size and less safe, we could add --binlog-no-charset (and binlog-no-sql-mode etc): charset info is something by design optional (even if for now we don't offer possibility to disable it): it's not a binlog format change. We try to reduce the number of get_charset() calls in the slave SQL thread to a minimum by caching the charset read from the previous event (which will often be equal to the one of the current event). We don't use SET ONE_SHOT for charset-aware repl (we still do for timezones, will be fixed later). No more errors if one changes the global value of charset vars on master or slave (as we log charset info in all Query_log_event). Not fixing Load_log_event as it will be rewritten soon by Dmitri. Testing how mysqlbinlog behaves in rpl_charset.test. mysqlbinlog needs to know where charset file is (to be able to convert a charset number found in binlog (e.g. in User_var_log_event) to a charset name); mysql-test-run needs to pass the correct value for this option to mysqlbinlog. Many result udpates (adding charset info into every event shifts log_pos in SHOW BINLOG EVENTS). Roughly the same job is to be done for timezones :)
| | * | | Merge with 4.1monty@mishka.local2004-12-221-5/+22
| | |\ \ \ | | | |/ / | | |/| / | | | |/
| | | * A change of behaviour of Seconds_Behind_Master from SHOW SLAVE STATUS. It's ↵guilhem@mysql.com2004-12-161-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | going into 4.1 because old behaviour was somewhat nonsensical (kind of bug). Changes are that if repl threads are down or disconnected the column will be NULL, and if master is idle the column will not grow indefinitely anymore.
| | * | Merge with 4.1monty@mysql.com2004-12-061-1/+1
| | |\ \ | | | |/
| | | * Due to a compiler bug, slave.cc:tables_ok() sometimes wrongly returnslars@mysql.com2004-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 if the return type is int or int_fast8_t. The test case that showed this problem is rpl000001 and the tested version was MySQL 5.0.2. The compiler with the problem is GCC 3.0.4 runing on "Linux bitch 2.4.18 #2 Thu Apr 11 14:37:17 EDT 2002 sparc64 unknown". By changing the return type to bool the problem disappear. (Another way to make the problem disappear is to simply print the returned value with printf("%d",?). The printed returned value is always 0 in the test cases I have run.) This is only a partial solution to the problem, since someone could later change the return type of the function back to int or some other type that does not work.
| | * | Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1tomas@poseidon.ndb.mysql.com2004-11-261-1/+2
| | |\ \ | | | |/ | | | | | | | | into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
| | | * Mergemats@mysql.com2004-11-251-1/+2
| | | |\
| | | | * Fix for Bug#6148. Only rewind read position in binary log when themats@mysql.com2004-11-251-1/+2
| | | | | | | | | | | | | | | | | | | | slave SQL thread is started.
| | * | | mergedserg@serg.mylan2004-11-171-1/+1
| | |\ \ \ | | | |/ /