MXS-2013 Move or remove STR-macros
- The ones that were not used were removed. - The ones that were used were moved close to the actual type. In most cases some values were missing and if the definition is close to the type there is a remote chance that they will stay in sync. If detached, they surely will not.
This commit is contained in:
@ -69,6 +69,13 @@ enum select_criteria_t
|
||||
LAST_CRITERIA /**< not used except for an index */
|
||||
};
|
||||
|
||||
#define STRCRITERIA(c) ((c) == UNDEFINED_CRITERIA ? "UNDEFINED_CRITERIA" : \
|
||||
((c) == LEAST_GLOBAL_CONNECTIONS ? "LEAST_GLOBAL_CONNECTIONS" : \
|
||||
((c) == LEAST_ROUTER_CONNECTIONS ? "LEAST_ROUTER_CONNECTIONS" : \
|
||||
((c) == LEAST_BEHIND_MASTER ? "LEAST_BEHIND_MASTER" : \
|
||||
((c) == LEAST_CURRENT_OPERATIONS ? "LEAST_CURRENT_OPERATIONS" : \
|
||||
"Unknown criteria")))))
|
||||
|
||||
/**
|
||||
* Controls how master failure is handled
|
||||
*/
|
||||
|
@ -295,3 +295,11 @@ private:
|
||||
* @return The internal ID of the prepared statement that the buffer contents refer to
|
||||
*/
|
||||
uint32_t get_internal_ps_id(RWSplitSession* rses, GWBUF* buffer);
|
||||
|
||||
#define STRTARGET(t) (t == TARGET_ALL ? "TARGET_ALL" : \
|
||||
(t == TARGET_MASTER ? "TARGET_MASTER" : \
|
||||
(t == TARGET_SLAVE ? "TARGET_SLAVE" : \
|
||||
(t == TARGET_NAMED_SERVER ? "TARGET_NAMED_SERVER" : \
|
||||
(t == TARGET_RLAG_MAX ? "TARGET_RLAG_MAX" : \
|
||||
(t == TARGET_UNDEFINED ? "TARGET_UNDEFINED" : \
|
||||
"Unknown target value"))))))
|
||||
|
Reference in New Issue
Block a user