Skip to content

turnloop-mysql: Event::Ok is overloaded between a real OK packet and a result-set-terminating EOF #64

Description

@proggeramlug

Problem

Event::Ok is overloaded between two different meanings: it fires for a genuine OK packet (carrying affected_rows / last_insert_id), and it fires again for the EOF that terminates a result set — where those same fields are not row counts at all. The event itself gives no way to tell which situation produced it.

Why it matters

Every host of turnloop-mysql has to track, on its own, whether a result set is currently open in order to interpret an Event::Ok's fields correctly. Get that tracking wrong and a host reads a meaningless affected_rows value as if it were real.

What would fix it

Splitting Event::Ok into two distinct variants (a real OK packet vs. a result-set-terminating EOF), so a host does not need to shadow the protocol's own state just to disambiguate one event.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions