summaryrefslogtreecommitdiff
path: root/sql/slave.cc
Commit message (Collapse)AuthorAgeFilesLines
* few s/sql_print_error/sql_print_information/serg@serg.mylan2004-09-081-9/+7
|
* mergedserg@serg.mylan2004-09-071-4/+9
|\
| * when we update thd->db in replication, it's safer to update thd->db_length too.guilhem@mysql.com2004-09-071-4/+9
| | | | | | | | This does not fix any known bug, but is still a good idea.
* | sql_print_error cleanupserg@serg.mylan2004-09-041-1/+1
| |
* | Bug #4629 Crash after SLAVE STOP, if the IO thread is in special state.rburnett@build.mysql.com2004-08-231-21/+6
| | | | | | | | | | | | | | client.c: Removed call to clear_slave_vio in end_server(). Removed header declaration of clear_slave_vio slave.cc: Removed clear_slave_vio function and added calls to thd->clear_active_vio before each call to end_server()
* | Bug #4629 Crash after SLAVE STOP, if the IO thread is in special state.rburnett@build.mysql.com2004-08-211-0/+22
| | | | | | | | | | | | | | client.c: Added call to clear_slave_vio inside end_server only when under Windows with repliaction slave.cc: Added clear_slave_vio function for clearing active vio on THD under Windows replication
* | manually mergedserg@serg.mylan2004-08-181-11/+7
|\ \ | |/
| * Fix for:guilhem@mysql.com2004-07-311-11/+7
| | | | | | | | | | | | Bug #4810 "deadlock with KILL when the victim was in a wait state" (I included mutex unlock into exit_cond() for future safety) and BUG#4827 "KILL while START SLAVE may lead to replication slave crash"
* | Fix for BUG#4678 "mysql-test-run fails on grant_cache":guilhem@mysql.com2004-08-121-0/+6
| | | | | | | | | | do not use '' as user in tests, because it picks the Unix login (which gives unexpected results if it is 'root') (such behaviour is a feature of mysql_real_connect(), see the manual).
* | Unused variables removed (many files).konstantin@mysql.com2004-06-211-1/+0
| |
* | WL#1264 "Per-thread time zone support infrastructure".dlenev@brandersnatch.localdomain2004-06-181-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added basic per-thread time zone functionality (based on public domain elsie-code). Now user can select current time zone (from the list of time zones described in system tables). All NOW-like functions honor this time zone, values of TIMESTAMP type are interpreted as values in this time zone, so now our TIMESTAMP type behaves similar to Oracle's TIMESTAMP WITH LOCAL TIME ZONE (or proper PostgresSQL type). WL#1266 "CONVERT_TZ() - basic time with time zone conversion function". Fixed problems described in Bug #2336 (Different number of warnings when inserting bad datetime as string or as number). This required reworking of datetime realted warning hadling (they now generated at Field object level not in conversion functions). Optimization: Now Field class descendants use table->in_use member instead of current_thd macro.
* | don't need to tag the slave SQL thread as "bootstrap". It causes duplicateguilhem@mysql.com2004-06-101-1/+0
| | | | | | | | | | | | | | error messages when a query goes wrong. Note that from now on, if you run with --slave-skip-error=xx, then nothing will be printed to the error log when the slave is having this error xx and skipping it (but you don't care as you want to skip it).
* | Merge gbichot@213.136.52.20:/home/bk/mysql-4.1guilhem@mysql.com2004-06-031-23/+60
|\ \ | | | | | | | | | into mysql.com:/home/mysql_src/mysql-4.1
| * | Implementation of WL#1824 "Add replication of character set variables in 4.1",guilhem@mysql.com2004-06-031-23/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | by binlogging some SET ONE_SHOT CHARACTER_SETetc, which will be enough until we have it more compact and more complete in 5.0. With the present patch, replication will work ok between 4.1.3 master and slaves, as long as: - master and slave have the same GLOBAL.COLLATION_SERVER - COLLATION_DATABASE and CHARACTER_SET_DATABASE are not used - application does not use the fact that table is created with charset of the USEd db (BUG#2326). all of which are not too hard to fulfill. ONE_SHOT is reserved for internal use of mysqlbinlog|mysql and works only for charsets, so we give error if used for non-charset vars. Fix for BUG#3875 "mysqlbinlog produces wrong ouput if query uses variables containing quotes" and BUG#3943 "Queries with non-ASCII literals are not replicated properly after SET NAMES". Detecting that master and slave have different global charsets or server ids.
* | | Proposed fix for bug #3412 (embedded server: prepared statement returnshf@deer.(none)2004-05-281-1/+1
|/ / | | | | | | empty recordset where some records should be found)
* | Merge with 4.0 to get fixes for Windows project filesmonty@mysql.com2004-05-251-4/+8
|\ \ | |/
| * Fix for BUG#3871: a slave must always replicate a statement, even if it ↵guilhem@mysql.com2004-05-241-4/+8
| | | | | | | | | | | | examines more than 4G rows, so we set SQL_BIG_SELECTS to 1.
* | Merge with 4.0, mainly to get changes to windows project filesmonty@mysql.com2004-05-201-4/+2
|\ \ | |/
| * Fix for BUG#3829 "Setting server_id on fly doesn't allow replication to start"guilhem@mysql.com2004-05-191-4/+2
| | | | | | | | | | (fix by our Harrison Fisk): when one does SET GLOBAL SERVER_ID=x, we must set server_id_supplied to 1.
* | Merge with 4.0.20monty@mysql.com2004-05-171-0/+2
|\ \ | |/
| * Many files:heikki@hundin.mysql.fi2004-05-141-0/+2
| | | | | | | | Fix remaining cases of Bug #3596: fix possible races caused by an obsolete value of thd->query_length in SHOW PROCESSLIST and SHOW INNODB STATUS; this fix depends on the fact that thd->query is always set to NULL before setting it to point to a new query
| * very minor changes: a STOP SLAVE in a replication test to get rid of a non ↵guilhem@mysql.com2004-05-051-3/+3
| | | | | | | | | | | | critical message in slave.err, and a comment update
* | Replication:guilhem@mysql.com2004-05-051-6/+2
| | | | | | | | as the I/O thread filters on the server id, we must test replicate_same_server_id in it (on top of in the SQL thread).
* | Merge with 4.0.19monty@mysql.com2004-05-051-17/+54
|\ \ | |/
| * useless fixes for --report-password and --show-slave-auth-info (almost ↵guilhem@mysql.com2004-05-041-1/+1
| | | | | | | | | | | | undocumented options), just for beauty of truth.
| * A new option --replicate-same-server-id to force a slave to execute queries ↵guilhem@mysql.com2004-04-281-8/+27
| | | | | | | | | | | | | | | | | | originating from itself (WL#794). This can be of interest in some recovery-from-backup scenarios, and also when you have two databases in one mysqld, having a certain similarity and you want one db to be updated when the other is (some sort of trigger). Plus small fix for BUG#3568 "MySQL server crashes when built --with-debug and CHANGE MASTER +MASTER_POS_WAIT"
| * Fixed compiler error in slave.cc on some platforms.greg@mysql.com2004-04-211-1/+1
| |
| * Fix for BUG#3461 "multi-table DELETE replicated despite ↵guilhem@mysql.com2004-04-131-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | replicate-wild-ignore-table": In tables_ok(), when there is no table having "updating==TRUE" in the list, return that we don't replicate this statement (the slave is supposed to replicate *changes* only). In practice, the case can only happen for this statement: DELETE t FROM t,u WHERE ... ; tables_ok(t,u) will now return 0, which (check all_tables_not_ok()) will give a chance to tables_ok(t) to run.
* | compatibility fix (bug#3606)serg@serg.mylan2004-04-301-1/+1
| |
* | After merge fixesmonty@mishka.local2004-04-271-24/+27
| | | | | | | | Changed 'SHOW FIELD STATUS' to use 'Engine' instead of 'Type'
* | Merge with 4.0monty@mishka.local2004-04-261-2/+60
|\ \ | |/
| * Fix for BUG#3422 "In 3.23 -> 4.0 replication, slave segfault when ↵guilhem@mysql.com2004-04-081-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | replicating LOAD DATA INFILE": as we transform the 3.23 Load_log_event into a 4.0 Create_file_log_event which is one byte longer, we need to increment event_len. The bug was that we did not increment it, so later in code the end 0 was not seen so there was for example a segfault in strlen(fname) because fname was not 0-terminated. Other problems remain in 3.23->4.0 replication of LOAD DATA INFILE but they are less serious: Exec_master_log_pos and Relay_log_space are incorrect. I'll document them. They are not fixable without significant code changes (if you fix those problems in 4.0, you get assertion failures somewhere else etc), * which are already done in 5.0.0 *.
| * Fix for BUG#3401 "Rare replication bug which leads to "Binlog has bad magic ↵guilhem@mysql.com2004-04-071-0/+11
| | | | | | | | | | | | | | | | number" from slave": Backport of a part of this changeset of 4.1: ChangeSet@1.1753.1.1, 2004-04-05 13:56:05+03:00, monty@mysql.com which fixes the bug.
| * This is a fix for a bug in 3.23 -> 4.0 replication: Exec_master_log_pos is ↵guilhem@mysql.com2004-04-071-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | always too big by 6 bytes. So I add code to substract 6 bytes if the master is 3.23. This is not perfect (because it won't work if the slave I/O thread has not noticed yet that the master is 3.23), but as long as the slave I/O thread starts Exec_master_log_pos will be ok. It must be merged to 4.1 but not to 5.0 (or it can be, because of #if MYSQL_VERSION_ID), because 5.0 already works if the master is 3.23 (and in a more natural way: in 5.0 we store the end_log_pos in the binlog and relay log). I had to move functions from slave.h to slave.cc to satisfy gcc.
* | Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1bell@sanja.is.com.ua2004-04-071-7/+24
|\ \ | | | | | | | | | into sanja.is.com.ua:/home/bell/mysql/bk/work-ps3-4.1
| * | Fixed many compiler warningsmonty@mysql.com2004-04-051-7/+24
| | | | | | | | | | | | | | | | | | Fixed bugs in group_concat with ORDER BY and DISTINCT (Bugs #2695, #3381 and #3319) Fixed crash when doing rollback in slave and the io thread catched up with the sql thread Set locked_in_memory properly
* | | after review changesbell@sanja.is.com.ua2004-04-071-1/+1
| | |
* | | removed old way to prevent using stack tables for caching Items in PSbell@sanja.is.com.ua2004-04-041-0/+1
|/ / | | | | | | fixed error code in union test
* | false/true -> FALSE/TRUEmonty@mysql.com2004-03-301-1/+1
| | | | | | | | Fixes after last merge
* | sys_var_str.value is never NULLserg@serg.mylan2004-03-201-1/+1
| |
* | merge with 4.0monty@mysql.com2004-03-161-12/+19
|\ \ | |/
| * Fix for BUG#2983 "If statement was killed on master, slave errors despite ↵guilhem@mysql.com2004-03-111-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | replicate-wild-ignore-t" We introduce a new function mysql_test_parse_for_slave(). If the slave sees that the query got a really bad error on master (killed e.g.), then it calls this function to know if this query can be ignored because of replicate-*-table rules (do not worry about replicate-*-db rules: they are checked so early that they have no bug). If the answer is yes, it skips the query and continues. If it's no, then it stops and say "fix your slave data manually" (like it did before this change).
| * Fix for BUG#2921 "Replication problem on mutex lock in mySQL-4.0.18":guilhem@mysql.com2004-03-111-4/+17
| | | | | | | | | | | | | | | | | | | | | | re-using unused LOCK_active_mi to serialize all administrative commands related to replication: START SLAVE, STOP SLAVE, RESET SLAVE, CHANGE MASTER, init_slave() (replication autostart at server startup), end_slave() (replication autostop at server shutdown), LOAD DATA FROM MASTER. This protects us against a handful of deadlocks (like BUG#2921 when two START SLAVE, but when two STOP SLAVE too). Removing unused variables.
| * Backporting parts ofguilhem@mysql.com2004-03-101-3/+5
| | | | | | | | | | | | | | ChangeSet 1.1620.12.1 and ChangeSet 1.1625.2.1 from 4.1. This makes the slave I/O thread flush the relay log after every event, which provides additional safety in case of brutal crash (reduces chances to lose a part of the relay log).
| * Undoing 2 parts of changeset 1.1730.1.1 :guilhem@mysql.com2004-03-101-39/+13
| | | | | | | | | | | | | | - the one about BUG#2921 - the one about relay log flushing Both will be rewritten in a next changeset (this one will not be pushed before the next changeset).
| * Fixed memory leak in DROP DATABASE when using RAID tables (Bug #2882)monty@mysql.com2004-03-101-15/+40
| |
* | More comments on what could explain -1 in Seconds_Behind_Master inguilhem@mysql.com2004-03-021-2/+15
| | | | | | | | SHOW SLAVE STATUS.
* | After hours of unsuccessful research onguilhem@mysql.com2004-03-021-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | BUG#2826 "Seconds behind master weirdness" (sometimes this column of SHOW SLAVE STATUS shows a very big value, in fact a small negative number casted to ulonglong). This problem was reported by only one user, but which uses synchronized time between his servers. As suggested by the user, to hide this I display max(0, the value) so that it will be less confusing. For a user, seeing 0 is probably better than seeing -1 (both tell you that the slave is very close to the master).
* | Merge with 4.0.18monty@mysql.com2004-02-111-0/+8
|\ \ | |/
| * Fix for BUG#2452 "Empty LOAD DATA INFILE failes with the master in 3.23.x":guilhem@mysql.com2004-01-201-0/+8
| | | | | | | | | | do not write the Execute_load_log_event if there was no Create_file_log_event (empty file).