Aadded some of the code from routeQuery to its own function, change_current_db, which extracts db name, tests if the name can be found among cached database names (hashtable) and if it does, change the db. Otherwise create an error message and add it to poll eventqueue like it was sent from some of the backends.
This commit is contained in:
@ -265,8 +265,9 @@ typedef enum skygw_chk_t {
|
||||
#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_UNDEFINED ? "TARGET_UNDEFINED" : \
|
||||
"Unknown target value"))))
|
||||
"Unknown target value")))))
|
||||
|
||||
#define BREFSRV(b) (b->bref_backend->backend_server)
|
||||
|
||||
|
Reference in New Issue
Block a user