Skip to content

Commit

Permalink
Bug fixing for encoding non prepared statements
Browse files Browse the repository at this point in the history
  • Loading branch information
silviucpp committed Jun 25, 2021
1 parent e9f5836 commit c41f990
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mysql_connection.erl
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ build_query_string([], [], Acc) ->
{ok, iolist_to_binary(lists:reverse(Acc))}.

term_encode(V) when is_binary(V) ->
mysql_utils:quote(unicode:characters_to_binary(binary_to_list(V)));
mysql_utils:quote(V);
term_encode(V) when is_list(V) ->
<<"_binary ", (list_to_binary(mysql_utils:quote(V)))/binary>>;
term_encode({blob, V}) ->
Expand Down Expand Up @@ -223,4 +223,4 @@ reprepare_evicted_stm(PoolName, Pid, Stm) ->
Error ->
Error
end
end.
end.

0 comments on commit c41f990

Please sign in to comment.