|
@@ -1,5 +1,6 @@
|
|
%% MySQL/OTP – MySQL client library for Erlang/OTP
|
|
%% MySQL/OTP – MySQL client library for Erlang/OTP
|
|
-%% Copyright (C) 2014 Viktor Söderqvist
|
|
|
|
|
|
+%% Copyright (C) 2014-2015 Viktor Söderqvist,
|
|
|
|
+%% 2016 Johan Lövdahl
|
|
%%
|
|
%%
|
|
%% This file is part of MySQL/OTP.
|
|
%% This file is part of MySQL/OTP.
|
|
%%
|
|
%%
|
|
@@ -803,7 +804,7 @@ execute_stmt(Stmt, Args, Timeout, State = #state{socket = Socket}) ->
|
|
QueryResult ->
|
|
QueryResult ->
|
|
QueryResult
|
|
QueryResult
|
|
end,
|
|
end,
|
|
- inet:setopts(Socket, [{active, false}]),
|
|
|
|
|
|
+ inet:setopts(Socket, [{active, once}]),
|
|
State1 = lists:foldl(fun update_state/2, State, Recs),
|
|
State1 = lists:foldl(fun update_state/2, State, Recs),
|
|
State1#state.warning_count > 0 andalso State1#state.log_warnings
|
|
State1#state.warning_count > 0 andalso State1#state.log_warnings
|
|
andalso log_warnings(State1, Stmt#prepared.orig_query),
|
|
andalso log_warnings(State1, Stmt#prepared.orig_query),
|