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

FR: sql_mode to throw errors instead of warnings on DECIMAL truncating rounding

Details

    • New Feature
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      When assigning a value with more decimals than a DECIMAL column was created for a

      1265 | Data truncated for column 'val' at row 1

      warning is raised.There has been a request whether an error could be raised instead.

      We looked into solving this using triggers or a check constraint, but apparently rounding already happens before trigger or check condition code is executed, so this approach does not seem to work.

      Hence this feature request for some sort of "NO_DECIMAL_TRUNCATION" sql_mode

      Attachments

        Activity

          People

            ralf.gebhardt Ralf Gebhardt
            hholzgra Hartmut Holzgraefe
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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