NetXMS Support Forum

English Support => General Support => Topic started by: Dani@M3T on June 24, 2014, 07:29:17 PM

Title: database errors when changing object tools
Post by: Dani@M3T on June 24, 2014, 07:29:17 PM
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
Title: Re: database errors when changing object tools
Post by: Victor Kirhenshtein on June 24, 2014, 11:42:05 PM
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
Title: Re: database errors when changing object tools
Post by: Dani@M3T on June 25, 2014, 09:13:06 AM
Yes I always build the server on Linux x64 from sources. A patch would be very nice.

Thanks for your very good forum support!
Title: Re: database errors when changing object tools
Post by: Victor Kirhenshtein on June 25, 2014, 10:00:03 AM
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
Title: Re: database errors when changing object tools
Post by: Dani@M3T on June 25, 2014, 10:13:51 AM
Hi Victor

That fixed it, thank you