Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 5.5.32
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I do an insert, we don't specify the id so it uses autoincrement.

      INSERT INTO table_name (model, url, download_count, created_at, updated_at, user_id, asset_id) VALUES (?, ?, ?, ?, ?, ?, ?)
      

      with params ["value1", "aaaa, 1, "2013-09-02 07:33:11", "2013-09-02 18:47:16", 25595, 899]

      It causes a duplicate entry: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '5'

      The status of the table is OK:
      db_xxx.table_name check status OK

      Here is the show create:

      CREATE TABLE `table_name` (
        `id` int(11) NOT NULL AUTO_INCREMENT,
        `user_id` int(11) DEFAULT NULL,
        `asset_id` int(11) DEFAULT NULL,
        `model` varchar(31) COLLATE utf8_unicode_ci NOT NULL,
        `url` varchar(127) COLLATE utf8_unicode_ci NOT NULL,
        `download_count` int(11) NOT NULL,
        `created_at` datetime NOT NULL,
        `updated_at` datetime NOT NULL,
        PRIMARY KEY (`id`),
        KEY `IDX_7A5DB31DA76ED395` (`user_id`),
        KEY `IDX_7A5DB31D5DA1941` (`asset_id`),
        CONSTRAINT `FK_7A5DB31D5DA1941` FOREIGN KEY (`asset_id`) REFERENCES `asset` (`id`),
        CONSTRAINT `FK_7A5DB31DA76ED395` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`)
      ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            serg Sergei Golubchik added a comment -

            I couldn't repeat the bug based on the information you provided.
            Please try to create a repeatable test case.

            Show
            serg Sergei Golubchik added a comment - I couldn't repeat the bug based on the information you provided. Please try to create a repeatable test case.

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                denshade denshade
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: