mariadb/sql
Alfranio Correia 9682ff8a26 BUG#43075 rpl.rpl_sync fails sporadically on pushbuild
NOTE: Backporting the patch to next-mr.
      
The slave was crashing while failing to execute the init_slave() function.
      
The issue stems from two different reasons:
      
1 - A failure while allocating the master info structure generated a
    segfault due to a NULL pointer.
      
2 - A failure while recovering generated a segfault due to a non-initialized
    relay log file. In other words, the mi->init and rli->init were both set to true
    before executing the recovery process thus creating an inconsistent state as the
    relay log file was not initialized.
      
To circumvent such problems, we refactored the recovery process which is now executed
while initializing the relay log. It is ensured that the master info structure is
created before accessing it and any error is propagated thus avoiding to set mi->init
and rli->init to true when for instance the relay log is not initialized or the relay
info is not flushed.
      
The changes related to the refactory are described below:
      
1 - Removed call to init_recovery from init_slave.
      
2 - Changed the signature of the function init_recovery.
      
3 - Removed flushes. They are called while initializing the relay log and master
    info.
      
4 - Made sure that if the relay info is not flushed the mi-init and rli-init are not
    set to true.
      
In this patch, we also replaced the exit(1) in the fault injection by DBUG_ABORT()
to make it compliant with the code guidelines.
2009-09-30 22:41:05 +01:00
..
examples Bug #43414 Parenthesis (and other) warnings compiling MySQL 2009-06-17 15:54:01 +02:00
share Bug#32430: 'show innodb status' causes errors 2009-08-07 15:08:32 +02:00
.cvsignore
add_errmsg
authors.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
client_settings.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
CMakeLists.txt Backport WL#3653 to 5.1 to enable bundled innodb plugin. 2009-06-10 10:59:49 +02:00
contributors.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
custom_conf.h
derror.cc
des_key_file.cc
discover.cc
event_data_objects.cc Merge from 5.0 2009-07-24 21:04:55 +05:00
event_data_objects.h Bug#35997 Event scheduler seems to let the server crash, if it is embedded. 2008-05-09 09:43:02 +02:00
event_db_repository.cc Added "Sun Microsystems, Inc." to copyright headers on files modified 2008-11-10 21:21:49 +01:00
event_db_repository.h
event_parse_data.cc Bug#29125 Windows Server X64: so many compiler warnings 2009-02-13 11:41:47 -05:00
event_parse_data.h Added "Sun Microsystems, Inc." to copyright headers on files modified 2008-11-10 21:21:49 +01:00
event_queue.cc Bug#35997 Event scheduler seems to let the server crash, if it is embedded. 2008-05-09 09:43:02 +02:00
event_queue.h
event_scheduler.cc Bug#43587: Putting event_scheduler=1 in init SQL file crashes 2009-07-24 15:45:42 -03:00
event_scheduler.h
events.cc Bug #44331 Restore of database with events produces warning in replication 2009-08-29 16:52:22 +08:00
events.h
field.cc Merge from 5.0 for 43414 2009-08-28 18:21:54 +02:00
field.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
field_conv.cc Bug #43414 Parenthesis (and other) warnings compiling MySQL 2009-06-17 15:54:01 +02:00
filesort.cc Bug #41543: Assertion `m_status == DA_ERROR' failed in Diagnostics_area::sql_errno 2009-01-09 14:04:47 +02:00
frm_crypt.cc
gen_lex_hash.cc Bug#29125 Windows Server X64: so many compiler warnings 2009-02-13 11:41:47 -05:00
gstream.cc Bug #43414 Parenthesis (and other) warnings compiling MySQL 2009-06-09 18:11:21 +02:00
gstream.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
ha_ndbcluster.cc Bug#44834 strxnmov is expected to behave as you'd expect 2009-06-19 13:24:43 +05:00
ha_ndbcluster.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
ha_ndbcluster_binlog.cc Backport Tomas Ulin fix for a spurious failure on PushBuild: 2009-08-01 18:24:20 -03:00
ha_ndbcluster_binlog.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
ha_ndbcluster_cond.cc fixed warnings and compile errors from the fix for bug 26243 2008-03-29 09:52:16 +02:00
ha_ndbcluster_cond.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
ha_ndbcluster_tables.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
ha_partition.cc Bug#46639: 1030 (HY000): Got error 124 from storage engine on 2009-08-21 17:38:29 +02:00
ha_partition.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
handler.cc Bug #47645: Segmentation fault when out of memory during handlerton initialization 2009-09-25 11:47:15 +02:00
handler.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
hash_filo.cc
hash_filo.h
hostname.cc
init.cc Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug26294/my50-bug26294 2008-04-03 13:14:57 -04:00
item.cc Merge from 5.0 for 43414 2009-08-28 18:21:54 +02:00
item.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
item_buff.cc
item_cmpfunc.cc Merge from 5.0 for 43414 2009-08-28 18:21:54 +02:00
item_cmpfunc.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
item_create.cc Merge from 5.0 for 43414 2009-08-28 18:21:54 +02:00
item_create.h
item_func.cc Merge from 5.0 for 43414 2009-08-28 18:21:54 +02:00
item_func.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
item_geofunc.cc Bug#44684: valgrind reports invalid reads in 2009-06-17 16:58:33 +02:00
item_geofunc.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
item_row.cc Fix for Bug#30217: Views: changes in metadata behaviour 2008-02-22 13:30:33 +03:00
item_row.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
item_strfunc.cc Bug#45168: assertion with convert() and empty set value 2009-06-16 16:36:15 +02:00
item_strfunc.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
item_subselect.cc Merged fix for the bug#46051. 2009-07-19 16:49:40 +04:00
item_subselect.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
item_sum.cc Bug#45261: Crash, stored procedure + decimal 2009-08-24 16:47:08 -03:00
item_sum.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
item_timefunc.cc Manual merge between bug#46362 and bug#20577. 2009-08-28 12:55:59 +02:00
item_timefunc.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
item_xmlfunc.cc Bug#43183 ExctractValue() brings result list in missorder 2009-04-01 13:40:33 +05:00
item_xmlfunc.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
key.cc Bug#37721: ORDER BY when WHERE contains non-partitioned 2008-10-10 12:01:01 +02:00
lex.h BUG#28777, WL#4293: SHOW BINLOG EVENTS does not work on relay log 2009-09-29 00:04:20 +01:00
lex_symbol.h
lock.cc Merge from 5.0 for 43414 2009-08-28 18:21:54 +02:00
log.cc Automerge: mysql-5.1-rep+2 (local backports) --> mysql-5.1-rep+2 (local latest) 2009-09-30 12:48:22 +01:00
log.h Automerge: mysql-5.1-rep+2 (local backports) --> mysql-5.1-rep+2 (local latest) 2009-09-30 12:48:22 +01:00
log_event.cc BUG#43789 different master/slave table defs cause crash: text/varchar null 2009-09-29 15:18:44 +01:00
log_event.h BUG#43789 different master/slave table defs cause crash: text/varchar null 2009-09-29 15:18:44 +01:00
log_event_old.cc Bug#29125 Windows Server X64: so many compiler warnings 2009-02-13 11:41:47 -05:00
log_event_old.h BUG#31583 (5.1-telco-6.1 -> 5.1.22. Slave returns Error in unknown event): 2007-12-05 20:00:14 +01:00
Makefile.am Auto-merge 2009-07-31 15:28:15 -04:00
message.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
message.mc Bug#40280: Message compiler(mc.exe) needed to compile MySQL on windows. 2008-10-23 15:28:53 +02:00
message.rc Bug#40280: Message compiler(mc.exe) needed to compile MySQL on windows. 2008-10-23 15:28:53 +02:00
mf_iocache.cc
MSG00001.bin Bug#40280: Message compiler(mc.exe) needed to compile MySQL on windows. 2008-10-23 15:28:53 +02:00
my_decimal.cc auto-merge 2008-11-27 12:33:04 +01:00
my_decimal.h Bug#45261: Crash, stored procedure + decimal 2009-08-24 16:47:08 -03:00
my_lock.c
mysql_priv.h BUG#40337 Fsyncing master and relay log to disk after every event is too slow 2009-09-29 15:40:52 +01:00
mysql_priv.h.pp WL#4380 2008-06-17 17:57:04 +05:30
mysqld.cc Automerge: mysql-5.1-rep+2 (local backports) --> mysql-5.1-rep+2 (local latest) 2009-09-30 12:48:22 +01:00
mysqld_suffix.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
net_serv.cc Manual merge. 2009-07-28 22:44:28 +04:00
nt_servc.cc merge 2008-11-22 01:10:38 +01:00
nt_servc.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
opt_range.cc Merge from 5.1-bugteam 2009-08-30 19:01:48 +02:00
opt_range.h Merge BUG#36639 into 5.1 2008-08-25 21:18:22 +04:00
opt_sum.cc Merge from 5.0-bugteam for 43414 2009-06-09 18:44:26 +02:00
parse_file.cc Bug#44834 strxnmov is expected to behave as you'd expect 2009-06-19 13:24:43 +05:00
parse_file.h Bug#43385 Cannot ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME when Views exist(addon) 2009-04-13 18:09:10 +05:00
partition_element.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
partition_info.cc Bug#40389: REORGANIZE PARTITION crashes when only using one partition 2008-12-02 11:18:01 +01:00
partition_info.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
password.c Manual merge. 2009-06-01 16:00:38 +04:00
procedure.cc
procedure.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
protocol.cc Bug#44521 Executing a stored procedure as a prepared statement can sometimes cause 2009-07-29 22:07:08 +02:00
protocol.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
records.cc Merge fix for BUG#35478 into 5.1 2008-07-15 21:46:02 +04:00
repl_failsafe.cc BUG#41924: high-level replication functions are not commented 2009-01-09 13:49:24 +01:00
repl_failsafe.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
rpl_constants.h BUG#40482: server/mysqlbinlog crashes when reading invalid Incident_log_event 2008-12-29 17:04:10 +01:00
rpl_filter.cc merging 2009-04-29 07:59:10 +05:00
rpl_filter.h
rpl_injector.cc A fix and a test case for Bug#12713 "Error in a stored function called from 2008-02-19 14:43:01 +03:00
rpl_injector.h
rpl_mi.cc BUG#43075 rpl.rpl_sync fails sporadically on pushbuild 2009-09-30 22:41:05 +01:00
rpl_mi.h BUG#40337 Fsyncing master and relay log to disk after every event is too slow 2009-09-29 15:40:52 +01:00
rpl_record.cc BUG#43789 different master/slave table defs cause crash: text/varchar null 2009-09-29 15:18:44 +01:00
rpl_record.h BUG#43789 different master/slave table defs cause crash: text/varchar null 2009-09-29 15:18:44 +01:00
rpl_record_old.cc
rpl_record_old.h
rpl_reporting.cc BUG#45511 rpl.rpl_binlog_corruption fails with warning messages in Valgrind 2009-06-16 16:04:30 +01:00
rpl_reporting.h BUG#45511 rpl.rpl_binlog_corruption fails with warning messages in Valgrind 2009-06-16 16:04:30 +01:00
rpl_rli.cc BUG#43075 rpl.rpl_sync fails sporadically on pushbuild 2009-09-30 22:41:05 +01:00
rpl_rli.h BUG#40337 Fsyncing master and relay log to disk after every event is too slow 2009-09-29 15:40:52 +01:00
rpl_tblmap.cc Bug#31455 mysqlbinlog don't print user readable info about RBR events 2008-08-20 19:06:31 +05:00
rpl_tblmap.h Bug#31455 mysqlbinlog don't print user readable info about RBR events 2008-08-20 19:06:31 +05:00
rpl_utility.cc BUG#37426: RBR breaks for CHAR() UTF-8 fields > 85 chars 2008-06-30 22:11:18 +02:00
rpl_utility.h Bug#42977 RBR logs for rows with more than 250 column results in corrupt binlog 2009-03-25 12:53:56 +02:00
scheduler.cc
scheduler.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
set_var.cc BUG#40337 Fsyncing master and relay log to disk after every event is too slow 2009-09-29 15:40:52 +01:00
set_var.h BUG#40337 Fsyncing master and relay log to disk after every event is too slow 2009-09-29 15:40:52 +01:00
slave.cc BUG#43075 rpl.rpl_sync fails sporadically on pushbuild 2009-09-30 22:41:05 +01:00
slave.h BUG#43075 rpl.rpl_sync fails sporadically on pushbuild 2009-09-30 22:41:05 +01:00
sp.cc BUG#41166 stored function requires "deterministic" if binlog_format is "statement" 2009-07-28 18:44:38 +01:00
sp.h BUG#41166 stored function requires "deterministic" if binlog_format is "statement" 2009-07-28 18:44:38 +01:00
sp_cache.cc A fix for 2008-07-03 23:41:22 +04:00
sp_cache.h A fix for 2008-07-03 23:41:22 +04:00
sp_head.cc BUG#28777, WL#4293: SHOW BINLOG EVENTS does not work on relay log 2009-09-29 00:04:20 +01:00
sp_head.h merging 2009-04-29 07:59:10 +05:00
sp_pcontext.cc merging 2009-04-29 07:59:10 +05:00
sp_pcontext.h merging 2009-04-29 07:59:10 +05:00
sp_rcontext.cc Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-33618 2008-01-23 15:36:57 -07:00
sp_rcontext.h Bug#33618 (Crash in sp_rcontext) 2008-01-23 13:26:41 -07:00
spatial.cc Merge from 5.0 for 43414 2009-08-28 18:21:54 +02:00
spatial.h Merge from 5.0-bugteam 2009-06-17 16:56:44 +02:00
sql_acl.cc Bug #43414 Parenthesis (and other) warnings compiling MySQL 2009-08-28 17:51:31 +02:00
sql_acl.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
sql_analyse.cc Merge from 5.0-bugteam 2009-06-17 16:56:44 +02:00
sql_analyse.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
sql_array.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
sql_base.cc Bug #43414 Parenthesis (and other) warnings compiling MySQL 2009-08-28 17:51:31 +02:00
sql_binlog.cc BUG#40337 Fsyncing master and relay log to disk after every event is too slow 2009-09-29 15:40:52 +01:00
sql_bitmap.h Fix Bug#27812 "an ampersand is missed in sql/sql_bitmap.h, line 68" 2008-01-29 14:14:34 +03:00
sql_builtin.cc.in
sql_cache.cc Bug#43758 Query cache can lock up threads in 'freeing items' state 2009-06-16 10:34:47 +02:00
sql_cache.h Bug#43758 Query cache can lock up threads in 'freeing items' state 2009-06-16 10:34:47 +02:00
sql_class.cc WL#4828 and BUG#45747 2009-09-29 14:55:36 +01:00
sql_class.h WL#4828 and BUG#45747 2009-09-29 14:55:36 +01:00
sql_client.cc
sql_connect.cc Fix for a valgrind warning due to use of a uninitialized 2009-06-08 19:05:24 -03:00
sql_crypt.cc Bug#44358 valgrind errors with decode() function 2009-04-23 12:43:42 +05:00
sql_crypt.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
sql_cursor.cc 5.0-bugteam->5.1-bugteam merge 2008-12-10 18:16:21 +04:00
sql_cursor.h
sql_db.cc BUG#45574 CREATE IF NOT EXISTS is not binlogged if the object exists 2009-08-13 10:48:57 +08:00
sql_delete.cc Fix for bug #46456 [Ver->Prg]: HANDLER OPEN + TRUNCATE + DROP 2009-08-21 10:55:35 +05:00
sql_derived.cc merged 5.0-bugteam to 5.1-bugteam 2009-05-27 18:19:44 +03:00
sql_do.cc Rename send_ok to my_ok. Similarly to my_error, it only records the status, 2008-02-19 15:45:21 +03:00
sql_error.cc Bug#29125 Windows Server X64: so many compiler warnings 2009-02-13 11:41:47 -05:00
sql_error.h
sql_handler.cc Bug#45781 infinite hang/crash in "opening tables" after handler tries to open merge 2009-07-16 01:23:57 +02:00
sql_help.cc Merge from 5.0-bugteam 2009-06-17 16:56:44 +02:00
sql_insert.cc BUG#45574 CREATE IF NOT EXISTS is not binlogged if the object exists 2009-08-13 10:48:57 +08:00
sql_lex.cc Manual merge. 2009-08-10 15:46:20 -03:00
sql_lex.h BUG#28777, WL#4293: SHOW BINLOG EVENTS does not work on relay log 2009-09-29 00:04:20 +01:00
sql_list.cc
sql_list.h Backport WL#3653 to 5.1 to enable bundled innodb plugin. 2009-06-10 10:59:49 +02:00
sql_load.cc Bug# 30946: mysqldump silently ignores --default-character-set 2009-07-31 22:14:52 +05:00
sql_locale.cc Bug#37575 UCASE fails on monthname 2008-12-23 18:08:04 +04:00
sql_manager.cc Bug#38522: 5 seconds delay when closing application using embedded server 2008-12-04 19:41:53 +01:00
sql_map.cc
sql_map.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
sql_olap.cc
sql_parse.cc BUG#23300: Slow query log on slave does not log slow replicated statements 2009-09-29 15:09:01 +01:00
sql_partition.cc WL#4828 and BUG#45747 2009-09-29 14:55:36 +01:00
sql_partition.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
sql_plugin.cc Bug#19027 MySQL 5.0 starts even with Fatal InnoDB errors 2009-05-18 10:10:30 +02:00
sql_plugin.h Bug#19027 MySQL 5.0 starts even with Fatal InnoDB errors 2009-05-14 14:03:33 +02:00
sql_prepare.cc Bug #43414 Parenthesis (and other) warnings compiling MySQL 2009-08-28 17:51:31 +02:00
sql_profile.cc Bug #45287: phase 2 : 5.0 64 bit compilation warnings 2009-07-16 15:37:38 +03:00
sql_profile.h Backport WL#3653 to 5.1 to enable bundled innodb plugin. 2009-06-10 10:59:49 +02:00
sql_rename.cc Bug#44834 strxnmov is expected to behave as you'd expect 2009-06-19 13:24:43 +05:00
sql_repl.cc Automerge: mysql-5.1-rep+2 (local backports) --> mysql-5.1-rep+2 (local latest) 2009-09-30 12:48:22 +01:00
sql_repl.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
sql_select.cc automerge 2009-08-31 16:40:35 +03:00
sql_select.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
sql_servers.cc fixed compilation warnings. addendum to the fix for bug 29125 2009-03-20 16:27:53 +02:00
sql_servers.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
sql_show.cc Bug #43414 Parenthesis (and other) warnings compiling MySQL 2009-08-28 17:51:31 +02:00
sql_show.h Added "Sun Microsystems, Inc." to copyright headers on files modified 2008-11-10 21:21:49 +01:00
sql_sort.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
sql_state.c
sql_string.cc Bug# 30946: mysqldump silently ignores --default-character-set 2009-07-31 22:14:52 +05:00
sql_string.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
sql_table.cc Fixed win32 compilation warnings 2009-09-02 13:22:47 +03:00
sql_tablespace.cc
sql_test.cc Bug#44164: TL_WRITE has no description in lock_descriptions[] 2009-04-14 14:05:32 +02:00
sql_trigger.cc Merge from 5.0-bugteam 2009-06-17 16:56:44 +02:00
sql_trigger.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
sql_udf.cc Bug#29125 Windows Server X64: so many compiler warnings 2009-02-13 11:41:47 -05:00
sql_udf.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
sql_union.cc 5.0-bugteam->5.1-bugteam merge 2009-05-15 12:11:07 +05:00
sql_update.cc Bug #43414 Parenthesis (and other) warnings compiling MySQL 2009-08-28 17:51:31 +02:00
sql_view.cc Merge from 5.0 for 43414 2009-08-28 18:21:54 +02:00
sql_view.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
sql_yacc.yy BUG#28777, WL#4293: SHOW BINLOG EVENTS does not work on relay log 2009-09-29 00:04:20 +01:00
strfunc.cc @@optimizer_switch backport and change from no_xxx to xx=on|off: post-review fixes 2009-03-14 21:58:23 +03:00
structs.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
table.cc merge 2009-08-12 11:46:08 +02:00
table.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
thr_malloc.cc Merge from 5.0 2009-06-29 16:00:47 +02:00
time.cc Merge from 5.0-bugteam 2009-06-17 16:56:44 +02:00
tzfile.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
tztime.cc Merge from 5.0-bugteam 2009-06-17 16:56:44 +02:00
tztime.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
udf_example.c Bug#29125 Windows Server X64: so many compiler warnings 2009-02-13 11:41:47 -05:00
udf_example.def
uniques.cc Merge from 5.0-bugteam 2009-06-17 16:56:44 +02:00
unireg.cc bug#44166 2009-05-04 22:33:23 +02:00
unireg.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00