Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-822

2 records are inserted instead of 1 on sql error

    XMLWordPrintable

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.1.2-B2
    • Fix Version/s: 5.1.3-B1
    • Component/s: Database
    • Labels:
      None

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
                Developer:
                Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: