Refactor version number detection

Use the reported `server_version_num` integer for version number
detection and comparison. This makes it easier to set an arbitrary
minimum supported version (rather than "9.0 or later") as well
as future-proofing for 10.x and later.
This commit is contained in:
Ian Barwick
2014-12-29 14:54:04 +09:00
parent 4c64d52afb
commit f94626bf7b
5 changed files with 123 additions and 126 deletions

View File

@@ -32,6 +32,9 @@
#define STANDBY_MODE 1
#define WITNESS_MODE 2
#define MIN_SUPPORTED_VERSION "9.1"
#define MIN_SUPPORTED_VERSION_NUM 90100
#include "config.h"
#define MAXFILENAME 1024
#define ERRBUFF_SIZE 512
@@ -46,6 +49,7 @@
#define MANUAL_FAILOVER 0
#define AUTOMATIC_FAILOVER 1
/* Run time options type */
typedef struct
{