mariadb/mysql-test/suite
Luis Soares eec4836a1b BUG#11745230: 12133: MASTER.INDEX FILE KEEPS MYSQLD FROM STARTING IF
BIN LOG HAS BEEN MOVED 

When moving the binary/relay log files from one location to
another and restarting the server with a different log-bin or
relay-log paths, would cause the startup process to abort. The
root cause was that the server would not be able to find the log
files because it would consider old paths for entries in the
index file instead of the new location.  What's even worse, the
relative paths would not be considered relative to the path
provided in log-bin and relay-log, but to mysql_data_dir.
      
We fix the cases where the server contains relative paths. When
the server is reading from the index file, it checks whether the
entry contains relative paths. If it does, we replace it with the
absolute path set in log-bin/relay-log option. Absolute paths
remain unchanged and the index must be manually edited to
consider the new log-bin and/or relay-log path (this should be
documented). This is a fix for a GA version, that does not break
behavior (that much).
      
For development versions, we should go with Zhenxing's approach 
that removes paths altogether from index files.

mysql-test/include/begin_include_file.inc:
  Added parameter to keep the begin_include_file.inc silent. Useful when 
  including scripts that contain platform dependent parameters, for example:
  
  --let $rpl_server_parameters=--log-bin=$tmpdir/slave-bin --relay-log=$tmpdir/slave-relay-bin
  --let $keep_include_silent=1
  source include/rpl_start_server.inc;
  --let $keep_include_silent=0
  
  We want the paths ($tmpdir/slave-bin and $tmpdir/slave-relay-bin) not to be in the 
  result file.
mysql-test/suite/rpl/t/rpl_binlog_index.test:
  Test case.
sql/log.cc:
  When finding the corresponding log entry in the index file, we first 
  normalize the paths before doing the comparison. This will make relative
  paths to be turned into absolute paths (based on the opt_bin_logname or
  opt_relay_logname) and then compared against also, expanded paths entered, 
  through CHANGE MASTER for instance.
sql/log.h:
  Added normalize_binlog_name, which turns relative paths, into absolute paths
  given the parameter: is_relay_log ? opt_relay_logname : opt_bin_logname .
sql/mysqld.cc:
  Exposing opt_bin_logname.
sql/mysqld.h:
  Exposing opt_bin_logname.
2011-11-24 17:15:58 +00:00
..
binlog BUG#11758262 - 50439: MARK INSERT...SEL...ON DUP KEY UPD,REPLACE...SEL,CREATE...[IGN|REPL] SEL 2011-09-29 14:47:27 +05:30
engines merge 5.1 -> 5.5 2011-10-12 10:19:46 +05:30
federated Followup to 11750417: 2011-11-21 12:28:35 +01:00
funcs_1 Changed to Oracle bug numbers 2011-05-24 12:08:13 +05:30
funcs_2 Changed to Oracle bug numbers 2011-05-24 12:08:13 +05:30
innodb merge bug#13390506 from mysql-5.1 2011-11-18 11:20:17 -05:00
jp WL#2360 Performance schema 2010-01-11 18:47:27 -07:00
large_tests BUG#11877618: rpl_slave_net_timeout fails in rpl_sync.inc (at sync_slave_with_master) 2011-03-17 11:31:42 +01:00
manual BUG#49978: Replication tests don't clean up replication state at the end 2010-12-19 18:07:28 +01:00
parts Bug#12696518: MEMORY LEAKS IN HA_PARTITION (VALGRIND TESTS ON TRUNK) 2011-09-15 20:49:39 +02:00
perfschema Removing copyright headers from test files 2011-10-19 23:44:17 +02:00
perfschema_stress Removing copyright headers from test files 2011-10-19 23:44:17 +02:00
rpl BUG#11745230: 12133: MASTER.INDEX FILE KEEPS MYSQLD FROM STARTING IF 2011-11-24 17:15:58 +00:00
stress Bug #11751927 42960: MTR2: NO MORE --STRESS PARAMETERS 2011-09-15 12:34:32 +02:00
sys_vars Bug#11748572:ALLOCATING A LARGE QUERY CACHE IS NOT DETERMINISTIC 2011-11-21 10:59:28 +05:30