good morning!!!!

Skip to content
Snippets Groups Projects
Commit abea50fb authored by Garet Halliday's avatar Garet Halliday
Browse files

truncate pls

parent 4b1d98ac
No related branches found
No related tags found
No related merge requests found
......@@ -90,7 +90,12 @@ 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, lex.KeywordCreate, lex.KeywordTruncate:
case lex.KeywordUpdate,
lex.KeywordDelete,
lex.KeywordInsert,
lex.KeywordDrop,
lex.KeywordCreate,
lex.KeywordTruncate:
role = config.SERVERROLE_PRIMARY
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment