Skip to content

is rollback necessary if the connection drops? #588

@bbigras

Description

@bbigras

Issue description

I have a many (20+) INSERT in multiples tables (4-5) in the same transaction. If an error happens, some data is still INSERTED, no rollback.

I have autocommit=0 in my MySQL URL (not sure if it's 0 by default).

I'm assuming that the transaction should fail and all the data discarded if there's an error and the connection drops.

Am I wrong?

Example code

I'm not able to reproduce it with a small sample yet.

Error log

Configuration

Driver version (or git SHA): ae5a66d

Go version: go version go1.8.1 linux/amd64

Server version: E.g. MySQL 5.7.18 (using the official MySQL docker image)

Server OS: Arch Linux 64-bit

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