Commit graph

3 commits

Author SHA1 Message Date
unknown
bd6c4ef400 Fix for BUG#2983 "If statement was killed on master, slave errors despite 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).


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.
2004-03-11 17:38:19 +01:00
unknown
f200fa15db Fix for BUG#812
"mysqlhotcopy fails to copy tables but does not indicate a failure"
("does not indicate a failure");
this is about "mysqlhotcopy fails to copy tables".


mysql-test/t/rpl_error_ignored_table-slave.opt:
  added a missing newline
scripts/mysqlhotcopy.sh:
  Fix for BUG#812.
  The problem was that with many tables to copy (10000 in the bug's example),
  the generated 'cp' command line was 1MB long, whereas (at least on my Linux) it
  should not exceed 128 kB. Testing the 'cp' in a shell terminal gives
  "arguments list too long".
  So we issue several small (100 kB) 'cp' command lines instead of a big one.
  Of course, this will still fail on systems where the limit is below 100 kB.
  We now have safe_system() which cuts the command line in pieces,
  and calls safe_simple_system() (execution) for each piece.
2003-07-10 16:03:29 +02:00
unknown
eed62d993d Fix for
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).
2003-07-08 15:50:57 +02:00