Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-5324

UPDATE and PRIMARY KEY

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Not a Bug
    • 5.5.33a-galera
    • None
    • None
    • Linux Debian Wheezy x64 - OVH dedicated server

    Description

      Create this table :

      CREATE TABLE `user_session` (
      `php_id` varchar(26) NOT NULL,
      `session_id` varchar(32) NOT NULL DEFAULT '',
      `session_data` text,
      `session_time` int(11) NOT NULL,
      PRIMARY KEY (`php_id`,`session_id`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

      Add any values and try to update them :

      UPDATE user_session SET session_id = :session_id, session_data = :session_data, session_time = :session_time WHERE php_id = :php_id

      i get always this error :

      SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'xxxx' for key 'PRIMARY'

      This is illogical, i try to update an existing line, i should not have this error.

      Attachments

        Activity

          People

            elenst Elena Stepanova
            Gecko Antoine Pous
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.