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

Update with inner join false row count result

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.4.25
    • None

    Description

      In “update_bug_example_1.sql”, we have a situation where an UPDATE with INNER JOIN triggers an unwarranted warning. Although the update is successful, with two rows modified, the subsequent call to ROW_COUNT() returns 0.

      The warning is:
      Code: 1264 — Out of range value for column 'start_date' at row 1

      In “update_bug_example_2.sql”, we have removed the NOT NULL option on the start_date field. Having done so, no more warning is issued, and the ROW_COUNT() function returns the correct value 2.

      In “update_bug_example_3.sql”, the start_date field is back to NOT NULL, but we have removed the INNER JOIN portion of the UPDATE statement. Again, we have no warning and ROW_COUNT() returns 2 as expected.

      Attachments

        1. update_bug_example_1.sql
          0.8 kB
          Marc
        2. update_bug_example_2.sql
          0.8 kB
          Marc
        3. update_bug_example_3.sql
          0.8 kB
          Marc

        Activity

          People

            serg Sergei Golubchik
            marc.langevin@usherbrooke.ca Marc
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.