Skip to content

Commit

Permalink
GRANT and CREATE are write operations ;)
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydwatkin committed Apr 9, 2024
1 parent ff96f8d commit 06a9a82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def send_to_replica(sql, connection: nil, method: :exec_query)
end

def write_query?(sql)
%w[INSERT UPDATE DELETE LOCK].include?(sql.split(' ').first)
%w[INSERT UPDATE DELETE LOCK CREATE GRANT].include?(sql.split(' ').first)
end

def replica_connection
Expand Down
2 changes: 1 addition & 1 deletion lib/janus/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Janus
unless defined?(::Janus::VERSION)
module VERSION
MAJOR = 0
MINOR = 5
MINOR = 6
PATCH = 0
PRE = nil

Expand Down

0 comments on commit 06a9a82

Please sign in to comment.