diff --git a/lib/gat/database/query_router/query_router.go b/lib/gat/database/query_router/query_router.go index a8f06a30f9e0367a50c34538231daf01b336a14c..0cd06b4a1c53f6d72ccaaa40326f7fee6a4eec4a 100644 --- a/lib/gat/database/query_router/query_router.go +++ b/lib/gat/database/query_router/query_router.go @@ -90,7 +90,7 @@ func (r *QueryRouter) InferRole(query string) (config.ServerRole, error) { var role = config.SERVERROLE_REPLICA for _, token := range tokens { switch token.Token { - case lex.KeywordUpdate, lex.KeywordDelete, lex.KeywordInsert, lex.KeywordDrop: + case lex.KeywordUpdate, lex.KeywordDelete, lex.KeywordInsert, lex.KeywordDrop, lex.KeywordCreate: role = config.SERVERROLE_PRIMARY } }