BitKeeper/etc/logging_ok:
auto-union
client/mysql.cc:
Auto merged
client/mysqltest.c:
Auto merged
innobase/btr/btr0btr.c:
Auto merged
innobase/dict/dict0dict.c:
Auto merged
innobase/dict/dict0load.c:
Auto merged
innobase/eval/eval0eval.c:
Auto merged
innobase/ibuf/ibuf0ibuf.c:
Auto merged
innobase/include/ut0mem.h:
Auto merged
innobase/lock/lock0lock.c:
Auto merged
innobase/row/row0ins.c:
Auto merged
innobase/row/row0mysql.c:
Auto merged
innobase/row/row0sel.c:
Auto merged
innobase/row/row0umod.c:
Auto merged
innobase/row/row0upd.c:
Auto merged
innobase/trx/trx0trx.c:
Auto merged
innobase/ut/ut0dbg.c:
Auto merged
innobase/ut/ut0mem.c:
Auto merged
myisam/mi_dynrec.c:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/t/fulltext.test:
Auto merged
mysql-test/t/rpl_rotate_logs.test:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_show.cc:
Auto merged
innobase/os/os0file.c:
Merge with 4.0.20
Ensure that we call F_UNLCK for files on which we call F_WRLCK.
This is to ensure that this code will be portable accross most platforms.
myisam/ft_boolean_search.c:
Merge with 4.0.20 (keep original file)
myisam/ft_parser.c:
Merge with 4.0.20 (keep original file)
myisam/ftdefs.h:
Merge with 4.0.20 (keep original file)
mysql-test/t/rpl000015.test:
Fix replace_result of $MASTER_MYPORT instead of literal numbers.
The test case rpl000015 needs one exlpicit literal number.
It changes partial master settings, which seems to reset other settings
to their defaults. To test this is obviously the intent of this case.
mysql-test/r/rpl_server_id1.result:
be port-independent
mysql-test/r/rpl_server_id2.result:
be port-independent
mysql-test/t/rpl_error_ignored_table.test:
we want to sleep 2 secs, not more; if we allow ourselves to sleep >=10 seconds, then
the get_lock() will be aborted and we will arrive to late for the KILL to have
the desired effect of generating an error code in the binlog.
mysql-test/t/rpl_server_id1.test:
be port-independent
mysql-test/t/rpl_server_id2.test:
be port-independent
Portability fixes
client/mysqltest.c:
Fixed that if error number 0 is included in --error, we will not generate an error message
include/mysql.h:
Portability fix
mysql-test/mysql-test-run.sh:
Portability fix
mysql-test/r/heap_btree.result:
Portability fix
mysql-test/r/rpl_error_ignored_table.result:
Portability fix
mysql-test/t/heap_btree.test:
Portability fix
mysql-test/t/rpl_error_ignored_table.test:
Portability fix
sql/sql_base.cc:
simple optimzation
sql/sql_yacc.yy:
simple optimzation
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/t/rpl_error_ignored_table.test:
Auto merged
BitKeeper/deleted/.del-mysql_fix_privilege_tables.sql:
Auto merged
BitKeeper/etc/logging_ok:
auto-union
VC++Files/innobase/innobase.dsp:
Auto merged
VC++Files/libmysql/libmysql.dsp:
Auto merged
acinclude.m4:
Auto merged
configure.in:
Auto merged
BitKeeper/deleted/.del-com0shm.c~6a16f0c3d81de1f:
Auto merged
BitKeeper/deleted/.del-mysql_fix_privilege_tables.sql:
Auto merged
extra/replace.c:
Auto merged
include/my_sys.h:
Auto merged
innobase/btr/btr0btr.c:
Auto merged
innobase/btr/btr0cur.c:
Auto merged
innobase/btr/btr0pcur.c:
Auto merged
innobase/btr/btr0sea.c:
Auto merged
innobase/configure.in:
Auto merged
innobase/data/data0data.c:
Auto merged
innobase/dict/dict0boot.c:
Auto merged
innobase/dict/dict0crea.c:
Auto merged
innobase/dict/dict0dict.c:
Auto merged
innobase/dict/dict0load.c:
Auto merged
innobase/dict/dict0mem.c:
Auto merged
innobase/ha/ha0ha.c:
Auto merged
innobase/ha/hash0hash.c:
Auto merged
innobase/include/btr0btr.ic:
Auto merged
innobase/include/data0type.ic:
Auto merged
innobase/include/dict0mem.h:
Auto merged
innobase/include/log0log.ic:
Auto merged
innobase/include/mach0data.ic:
Auto merged
innobase/include/mtr0log.h:
Auto merged
innobase/include/mtr0mtr.h:
Auto merged
innobase/include/os0file.h:
Auto merged
innobase/include/row0upd.ic:
Auto merged
innobase/include/srv0srv.h:
Auto merged
innobase/include/sync0sync.h:
Auto merged
innobase/include/trx0rseg.ic:
Auto merged
innobase/lock/lock0lock.c:
Auto merged
innobase/log/log0recv.c:
Auto merged
innobase/mem/mem0dbg.c:
Auto merged
innobase/mtr/mtr0log.c:
Auto merged
innobase/mtr/mtr0mtr.c:
Auto merged
innobase/os/os0file.c:
Auto merged
innobase/page/page0cur.c:
Auto merged
innobase/page/page0page.c:
Auto merged
innobase/pars/lexyy.c:
Auto merged
innobase/read/read0read.c:
Auto merged
innobase/rem/rem0cmp.c:
Auto merged
innobase/rem/rem0rec.c:
Auto merged
innobase/row/row0ins.c:
Auto merged
innobase/row/row0mysql.c:
Auto merged
innobase/row/row0purge.c:
Auto merged
innobase/row/row0sel.c:
Auto merged
innobase/row/row0undo.c:
Auto merged
innobase/row/row0upd.c:
Auto merged
innobase/srv/srv0srv.c:
Auto merged
innobase/srv/srv0start.c:
Auto merged
innobase/sync/sync0rw.c:
Auto merged
innobase/thr/thr0loc.c:
Auto merged
innobase/trx/trx0purge.c:
Auto merged
innobase/trx/trx0rec.c:
Auto merged
innobase/trx/trx0roll.c:
Auto merged
innobase/trx/trx0trx.c:
Auto merged
innobase/trx/trx0undo.c:
Auto merged
myisam/mi_check.c:
Auto merged
myisam/myisamchk.c:
Auto merged
mysql-test/r/multi_update.result:
Auto merged
mysql-test/r/mysqlbinlog.result:
Auto merged
mysql-test/r/rpl_error_ignored_table.result:
Auto merged
mysql-test/t/multi_update.test:
Auto merged
mysql-test/t/rpl_error_ignored_table.test:
Auto merged
mysys/mf_iocache.c:
Auto merged
mysys/mf_pack.c:
Auto merged
mysys/my_getopt.c:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/lock.cc:
Auto merged
sql/log.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_cache.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_list.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
tests/thread_test.c:
Auto merged
client/mysqldump.c:
Keep original indentation
mysql-test/r/merge.result:
keep old file
scripts/mysql_fix_privilege_tables.sh:
Keep old structure in merge with 4.0
sql/table.cc:
merge with 4.0 + simple optimizations
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).
mysql-test/r/rpl_error_ignored_table.result:
result update
mysql-test/t/rpl_error_ignored_table-slave.opt:
ignore more tables
mysql-test/t/rpl_error_ignored_table.test:
we test if a killed query on the master, is ignored on the slave
if the tables it involves should be excluded because of replicate-*-table
rules.
sql/log_event.cc:
If the query got a really bad error on the master (thread killed etc),
parse it to test the table names: if the replicate-*-do|ignore-table
rules say "this query must be ignored" then we exit gracefully;
otherwise we warn about the bad error and tell DBA to check/fix it.
Before this change, we always warned and stopped.
sql/mysql_priv.h:
new function
sql/slave.cc:
don't print error immediately as we need to do one more test to
be sure.
sql/sql_parse.cc:
we add a function mysql_test_parse_for_slave(), to be used only
by the slave if it wants to know if the query should be ignored or not;
so this function only parses the query, does not execute it.
I manually edited rpl_openssl.result because the test is skipped on my
machine. Hope it's correct.
mysql-test/r/rpl000015.result:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/r/rpl_error_ignored_table.result:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/r/rpl_flush_log_loop.result:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/r/rpl_loaddata.result:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/r/rpl_log.result:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/r/rpl_log_pos.result:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/r/rpl_max_relay_size.result:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/r/rpl_openssl.result:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/r/rpl_replicate_do.result:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/r/rpl_reset_slave.result:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/r/rpl_rotate_logs.result:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/r/rpl_trunc_binlog.result:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/r/rpl_until.result:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/t/rpl000015.test:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/t/rpl_empty_master_crash.test:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/t/rpl_error_ignored_table.test:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/t/rpl_flush_log_loop.test:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/t/rpl_loaddata.test:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/t/rpl_log.test:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/t/rpl_log_pos.test:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/t/rpl_max_relay_size.test:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/t/rpl_openssl.test:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/t/rpl_redirect.test:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/t/rpl_replicate_do.test:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/t/rpl_reset_slave.test:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/t/rpl_rotate_logs.test:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/t/rpl_trunc_binlog.test:
Don't show Slave_IO_State because it can't be predicted.
mysql-test/t/rpl_until.test:
Don't show Slave_IO_State because it can't be predicted.
"Add a column "Timestamp_of_last_master_event_executed" in SHOW SLAVE STATUS".
Finally this is adding
- Slave_IO_State (a copy of the State column of SHOW PROCESSLIST for the I/O thread,
so that the users, most of the time, has enough info with only SHOW SLAVE STATUS).
- Seconds_behind_master. When the slave connects to the master it does SELECT UNIX_TIMESTAMP()
on the master, computes the absolute difference between the master's and the slave's clock.
It records the timestamp of the last event executed by the SQL thread, and does a
small computation to find the number of seconds by which the slave is late.
mysql-test/r/rpl000015.result:
result update
mysql-test/r/rpl_empty_master_crash.result:
result update
mysql-test/r/rpl_error_ignored_table.result:
result update
mysql-test/r/rpl_flush_log_loop.result:
result update
mysql-test/r/rpl_loaddata.result:
result update
mysql-test/r/rpl_log.result:
result update
mysql-test/r/rpl_log_pos.result:
result update
mysql-test/r/rpl_max_relay_size.result:
result update
mysql-test/r/rpl_redirect.result:
result update
mysql-test/r/rpl_replicate_do.result:
result update
mysql-test/r/rpl_reset_slave.result:
result update
mysql-test/r/rpl_rotate_logs.result:
result update
mysql-test/r/rpl_trunc_binlog.result:
result update
mysql-test/r/rpl_until.result:
result update
mysql-test/t/rpl000015.test:
update to be independant of the new column Seconds_behind_master in SHOW SLAVE STATUS
mysql-test/t/rpl_empty_master_crash.test:
update to be independant of the new column Seconds_behind_master in SHOW SLAVE STATUS
mysql-test/t/rpl_error_ignored_table.test:
update to be independant of the new column Seconds_behind_master in SHOW SLAVE STATUS
mysql-test/t/rpl_flush_log_loop.test:
update to be independant of the new column Seconds_behind_master in SHOW SLAVE STATUS
mysql-test/t/rpl_loaddata.test:
update to be independant of the new column Seconds_behind_master in SHOW SLAVE STATUS
mysql-test/t/rpl_log.test:
update to be independant of the new column Seconds_behind_master in SHOW SLAVE STATUS
mysql-test/t/rpl_log_pos.test:
update to be independant of the new column Seconds_behind_master in SHOW SLAVE STATUS
mysql-test/t/rpl_max_relay_size.test:
update to be independant of the new column Seconds_behind_master in SHOW SLAVE STATUS
mysql-test/t/rpl_openssl.test:
update to be independant of the new column Seconds_behind_master in SHOW SLAVE STATUS
mysql-test/t/rpl_redirect.test:
update to be independant of the new column Seconds_behind_master in SHOW SLAVE STATUS
mysql-test/t/rpl_replicate_do.test:
update to be independant of the new column Seconds_behind_master in SHOW SLAVE STATUS
mysql-test/t/rpl_reset_slave.test:
update to be independant of the new column Seconds_behind_master in SHOW SLAVE STATUS
mysql-test/t/rpl_rotate_logs.test:
update to be independant of the new column Seconds_behind_master in SHOW SLAVE STATUS
mysql-test/t/rpl_trunc_binlog.test:
update to be independant of the new column Seconds_behind_master in SHOW SLAVE STATUS
mysql-test/t/rpl_until.test:
update to be independant of the new column Seconds_behind_master in SHOW SLAVE STATUS
sql/log_event.cc:
when the SQL thread executes an event, we record its timestamp
sql/slave.cc:
in check_master_version() we know read the master's clock, to know the clock difference
with the slave.
In show_master_info() we send the state of the I/O thread, and compute the number of
seconds by which the slave is late.
sql/slave.h:
timestamp of the last master's event executed by the SQL thread,
and difference between the clocks of the master and slave.
sql/sql_repl.cc:
clear the Seconds_behind_master column of SHOW SLAVE STATUS when RESET SLAVE or CHANGE MASTER.
port number can be different from 3306 when doing the release builds
with Do-compile, therefore it has to be replaced with the correct
value during the test run using the "--replace_result" function.
mysql-test/r/rpl_error_ignored_table.result:
- replaced hard-coded master port number with MASTER_PORT variable, since
the port number is different when running the test suite during the
release builds with "Do-compile".
mysql-test/t/rpl_error_ignored_table.test:
- replaced hard-coded master port number with MASTER_PORT variable, since
the port number is different when running the test suite during the
release builds with "Do-compile".
BUG#797 "If query ignored on slave (replicate-ignore-table) the slave still checks if
the returned error (0) is the same as the one on the master, whereas it shouldn't
test this.
Plus a new test for BUG#797.
include/mysqld_error.h:
New error code (can be sent only to the slave thread, not to normal clients).
sql/log.cc:
removed comment from a previous debugging.
sql/log_event.cc:
ER_SLAVE_IGNORED_TABLE is an ignorable error.
sql/share/czech/errmsg.txt:
for BUG#797
sql/share/danish/errmsg.txt:
for BUG#797
sql/share/dutch/errmsg.txt:
for BUG#797
sql/share/english/errmsg.txt:
for BUG#797
sql/share/estonian/errmsg.txt:
for BUG#797
sql/share/french/errmsg.txt:
for BUG#797
sql/share/german/errmsg.txt:
for BUG#797
sql/share/greek/errmsg.txt:
for BUG#797
sql/share/hungarian/errmsg.txt:
for BUG#797
sql/share/italian/errmsg.txt:
for BUG#797
sql/share/japanese/errmsg.txt:
for BUG#797
sql/share/korean/errmsg.txt:
for BUG#797
sql/share/norwegian-ny/errmsg.txt:
for BUG#797
sql/share/norwegian/errmsg.txt:
for BUG#797
sql/share/polish/errmsg.txt:
for BUG#797
sql/share/portuguese/errmsg.txt:
for BUG#797
sql/share/romanian/errmsg.txt:
for BUG#797
sql/share/russian/errmsg.txt:
for BUG#797
sql/share/slovak/errmsg.txt:
for BUG#797
sql/share/spanish/errmsg.txt:
for BUG#797
sql/share/swedish/errmsg.txt:
for BUG#797
sql/share/ukrainian/errmsg.txt:
for BUG#797
sql/sql_parse.cc:
when in sql_parse in the slave thread we ignore the query because of replicate-do
and replicate-ignore options, we return a specific error to the slave thread,
so that it knows that the query has been ignored (which is different from a
successful query).
A small cleanup (test was done twice).