You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function in line 224 of emysql_util.erl returns a list when it should return a binary. This bug makes line 240 of emysql_conn.erl to fail when updating a table with a float value:
(energyservice_node@127.0.0.1)12> emysql:execute(api_pool, update_activity_r, [0, 190.5, 293209]).
16:43:36.441 [error] Lager event handler error_logger_lager_h exited with reason {'EXIT',{function_clause,[{lager,log,[error,emulator,["Error in process <0.314.0> on node 'energyservice_node@127.0.0.1' with exit value: {badarg,[{erlang,byte_size,["190.5"],[]},{emysql_conn,set_params,4,[{file,"src/emysql_conn.erl"},{line,240}]},{emysql_conn,execute,3,[{file,"src/emysql_conn.erl"},{line,82}]},{emysql,'-monitor_work/3-fun-0-',4,[{file,"src/emysql... \n","\n"]],[{file,"src/lager.erl"},{line,86}]},{error_logger_lager_h,handle_event,2,[{file,"src/error_logger_lager_h.erl"},...]},...]}}
16:43:36.504 [debug] Lager installed handler error_logger_lager_h into error_logger
** exception exit: {{badarg,[{erlang,byte_size,["190.5"],[]},
{emysql_conn,set_params,4,
[{file,"src/emysql_conn.erl"},{line,240}]},
{emysql_conn,execute,3,
[{file,"src/emysql_conn.erl"},{line,82}]},
{emysql,'-monitor_work/3-fun-0-',4,
[{file,"src/emysql.erl"},{line,567}]}]},
{}}
in function emysql:monitor_work/3 (src/emysql.erl, line 592)
This bug can be fixed by simply changing line 226 of emysql_util.erl to:
The function in line 224 of emysql_util.erl returns a list when it should return a binary. This bug makes line 240 of emysql_conn.erl to fail when updating a table with a float value:
(energyservice_node@127.0.0.1)12> emysql:execute(api_pool, update_activity_r, [0, 190.5, 293209]).
16:43:36.441 [error] Lager event handler error_logger_lager_h exited with reason {'EXIT',{function_clause,[{lager,log,[error,emulator,["Error in process <0.314.0> on node 'energyservice_node@127.0.0.1' with exit value: {badarg,[{erlang,byte_size,["190.5"],[]},{emysql_conn,set_params,4,[{file,"src/emysql_conn.erl"},{line,240}]},{emysql_conn,execute,3,[{file,"src/emysql_conn.erl"},{line,82}]},{emysql,'-monitor_work/3-fun-0-',4,[{file,"src/emysql... \n","\n"]],[{file,"src/lager.erl"},{line,86}]},{error_logger_lager_h,handle_event,2,[{file,"src/error_logger_lager_h.erl"},...]},...]}}
16:43:36.504 [debug] Lager installed handler error_logger_lager_h into error_logger
** exception exit: {{badarg,[{erlang,byte_size,["190.5"],[]},
{emysql_conn,set_params,4,
[{file,"src/emysql_conn.erl"},{line,240}]},
{emysql_conn,execute,3,
[{file,"src/emysql_conn.erl"},{line,82}]},
{emysql,'-monitor_work/3-fun-0-',4,
[{file,"src/emysql.erl"},{line,567}]}]},
{}}
in function emysql:monitor_work/3 (src/emysql.erl, line 592)
This bug can be fixed by simply changing line 226 of emysql_util.erl to:
list_to_binary(Res);
AFAIK this bug was first spotted by valinurovam:
#39
The text was updated successfully, but these errors were encountered: