2 records are inserted instead of 1 on sql error

Components

Labels

Description

Class kDBConnection has nice method called doInsert, that allows to insert data into database. It also can work in collect-only mode, when values are collected and then inserted using single database query, like INSERT .. VALUES (...),(...),(...) to improve execution speed.

In case, when all sql errors doesn't cause fatal error (e.g. debugger is disabled), then this could happen:

  • you have 2 inserts into different tables to be executed one after another

  • first insert fails, since database table corruption

  • second insert tries to insert values from first insert and it's own values together resulting a failure, since column mismatch occurs.

Context Information

None

Additional information (do not use)

None

Attachments

1
  • 13 Mar 2011, 11:41 AM

Confluence content

mentioned on

Phabricator

Activity

Show:

Alex September 19, 2011 at 9:08 PM

Closing, since 5.1.3 release has been released.

Alex May 23, 2011 at 8:00 AM

Fix committed to [b]5.1.x branch/b. Commit Message:

Fixes #0001019: 2 records are inserted instead of 1 on sql error

Dmitry Andrejev May 23, 2011 at 3:26 AM

Thank you Alex, patch tested okay - please commit.

Fixed

Priority

Assignee

Alex

Reporter

Developer

Change Log Message

Patch Instructions

Patches must be submitted through Phabricator.

External issue ID

Fix versions

Affects versions

Created March 13, 2011 at 11:41 AM
Updated December 29, 2024 at 9:13 PM
Resolved September 19, 2011 at 9:08 PM

Flag notifications