Skip to content

SQL error when "pre event image count" >150 or so due to insufficient ZM_SQL_LGE_BUFSIZ #222

@fastolfe

Description

@fastolfe

When setting "pre event image count" to a high-ish value (200), the SQL query constructed in zm_event.cpp Event::AddFrames can exceed the length allowed by ZM_SQL_LGE_BUFSIZ.

10/26/13 17:21:55.391681 zma_m3[5151].DB1-zm_event.cpp/525 [Adding 200/200 frames to DB]
10/26/13 17:21:55.392908 zma_m3[5151].ERR-zm_event.cpp/529 [Can't insert frames: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]

Consider batching these INSERTs with reasonable batch sizes, and/or use std::string concatenation (or std::stringstream) to build up these strings instead of all of this low-level pointer arithmetic with fixed buffer sizes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions