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

MariaDB Community Server 10.8.4 ERROR 1048 (23000): Column 'FIELDID' cannot be null

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.6.9, 10.7.5, 10.8.4, 10.9.2, 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL)
    • 10.5.18, 10.6.11, 10.7.7, 10.8.6, 10.9.4, 10.10.2
    • Optimizer
    • MariaDB Community Server 10.8.4 and operating system Windows Server 2019 X64-based

    Description

      My current MariaDB version is MariaDB Community Server 10.8.4 and operating system Windows Server 2019 X64-based
      A business table was created and an error was reported when using the following SQL:
      INSERT INTO meeting (fielDID,fieldorder) SELECT MAX(fielDID)+1 AS fielDID, MAX(fieldorder)+1 AS fieldorder FROM meeting

      ERROR 1048 (23000): Column 'FIELDID' cannot be null

      Attachments

        Issue Links

          Activity

            Thanks for the report. Reproducible as described.

            MTR-friendly, otherwise the same test case:

            CREATE TABLE meeting (fieldid int NOT NULL, fieldorder int DEFAULT NULL, PRIMARY KEY (fieldid));
            INSERT INTO meeting (fieldid,fieldorder) values (1,1),(2,1),(3,1),(4,1);
            INSERT INTO meeting (fielDID,fieldorder) SELECT MAX(fieldid)+1 AS fieldid, MAX(fieldorder)+1 AS fieldorder FROM meeting;
             
            DROP TABLE meeting;
            

            10.5 ba987a46

            query 'INSERT INTO meeting (fielDID,fieldorder) SELECT MAX(fieldid)+1 AS fieldid, MAX(fieldorder)+1 AS fieldorder FROM meeting' failed: 1048: Column 'fieldid' cannot be null
            

            The failure started happening after this commit in 10.5.15:

            commit 38058c04a4fc021f381f8000e40ed23bd4fb8d75
            Author: Monty
            Date:   Wed Feb 2 14:25:25 2022 +0200
             
                MDEV-26585 Wrong query results when `using index for group-by`
            

            elenst Elena Stepanova added a comment - Thanks for the report. Reproducible as described. MTR-friendly, otherwise the same test case: CREATE TABLE meeting (fieldid int NOT NULL , fieldorder int DEFAULT NULL , PRIMARY KEY (fieldid)); INSERT INTO meeting (fieldid,fieldorder) values (1,1),(2,1),(3,1),(4,1); INSERT INTO meeting (fielDID,fieldorder) SELECT MAX (fieldid)+1 AS fieldid, MAX (fieldorder)+1 AS fieldorder FROM meeting;   DROP TABLE meeting; 10.5 ba987a46 query 'INSERT INTO meeting (fielDID,fieldorder) SELECT MAX(fieldid)+1 AS fieldid, MAX(fieldorder)+1 AS fieldorder FROM meeting' failed: 1048: Column 'fieldid' cannot be null The failure started happening after this commit in 10.5.15: commit 38058c04a4fc021f381f8000e40ed23bd4fb8d75 Author: Monty Date: Wed Feb 2 14:25:25 2022 +0200   MDEV-26585 Wrong query results when `using index for group-by`
            M.Wang ZhiChao Wang added a comment - - edited

            Version 10.9.3 did not fix this problem, and my test failed again, Which version will be fixed? thanks

            M.Wang ZhiChao Wang added a comment - - edited Version 10.9.3 did not fix this problem, and my test failed again, Which version will be fixed? thanks

            Cannot repeat it in the latest 10.5. Closing as fixed. Please comment if this is wrong and you still see it

            serg Sergei Golubchik added a comment - Cannot repeat it in the latest 10.5. Closing as fixed. Please comment if this is wrong and you still see it

            People

              psergei Sergei Petrunia
              M.Wang ZhiChao Wang
              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.