Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-11219

Database sequences are not updated for tests using fixtures with auto_incremented columns

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.0.11, 3.1.0-dev
    • 3.0.12-RC1
    • Test Suite
    • None
    • Oracle XE 11g, PostreSQL 9.1

    Description

      If a test uses a fixture that provides a value for an auto_incremented column, certain databases will not update their internal sequence values. If a test then attempts to insert a new row without that key specified, there will be an error since the system will use a key that is already in the table. Oracle and Postgres seem to be the only ones affected. For Oracle this could be fixed by making the triggers always check for the maximum value, but for PostgreSQL I don't believe it would be possible to fix in phpBB itself. Since we don't insert rows into the database with a value specified on auto_incremented columns, I think working around it in the testing framework should be sufficient.

      You can see an example of the problem occurring here: https://travis-ci.org/phpbb/phpbb3/jobs/3225621

      Attachments

        Activity

          People

            Oleg Oleg [X] (Inactive)
            Noxwizard Patrick Webster
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: