database errors when changing object tools

Started by Dani@M3T, June 24, 2014, 07:29:17 PM

Previous topic - Next topic

Dani@M3T

When we want to change object tools in our NetXMS installation (V1.2.14) we get database errors like:

[ERROR] SQL query failed (Query = "DELETE FROM object_tools_acl WHERE tool_id=?"): 08P01 ERROR:  bind message supplies 9 parameters, but prepared statement "netxms_stmt_0x7f51d4056c40_1403626097" requires 1


What can we do to fix it? Thanks in advance

Victor Kirhenshtein

Hi!

This bug already fixed in 1.2.15. It's not possible to fix it in 1.2.14 without code change. I can provide a patch for 1.2.14 if you are building from sources.

Best regards,
Victor

Dani@M3T

Yes I always build the server on Linux x64 from sources. A patch would be very nice.

Thanks for your very good forum support!

Victor Kirhenshtein

Lines 736 and 763 in file src/server/core/objtools.cpp should be


  DBBind(statment, 1, DB_SQLTYPE_INTEGER, dwToolId);


instead of


  DBBind(statment, bindID++, DB_SQLTYPE_INTEGER, dwToolId);


Best regards,
Victor

Dani@M3T