Refs #10: avoid gvwstate.file to interfere with unit tests
1. move vst.write_file from pc_proto.cpp to pc.cpp
2. add pc.save_prim to control save prim component or not.
Refs #10: remove pc.save_prim and make pc.recovery to control write state file or not
Refs #10: remove gvwstate.dat file if pc.recovery=0 to avoid read stale state file.
This situation could happens in following scenario.
1. node starts up with pc.recovery=1, and has state file
2. then node starts up with pc.recovery=0, so right now state file is stale.
3. then node starts up with pc.recovery=1 again, stale file is used.
Refs #10: fix typo
Refs #47: default value of MYSQL_STARTUP_WAIT is -1 which means wait infinitely, I guess
Refs #47: linger case happens much more than expected
Refs #10: remove state file on graceful shutdown
Refs #47: wait nodes process disappear when kill node
Refs #47: fix previous error commit
Refs #47: get pid before killing and monitor process frequently
Refs #10: clear rst_view when pc is formed.
otherwise it may prevents pc remerge. see case https://github.com/codership/galera/issues/47\#issuecomment-45083066
Refs #10: don not clear rst view after sending install message. otherwise if network partition happens when sending install message, restored view is lost
Initial implementation of gu_atomic_XXX functions via __atomic_XXX GCC builtins. This should help with compilation on platforms which don't support all of __sync_XXX builtins.
Merge branch 'gh46' into 3.x
Refs #10: set restored view type to NON_PRIM, this could solve pc remerge problem well
Refs #47: default value of MYSQL_STARTUP_WAIT is -1 which means wait infinitely, I guess
Refs #47: linger case happens much more than expected
Refs #47: wait nodes process disappear when kill node
Refs #47: fix previous error commit
Refs #47: get pid before killing and monitor process frequently