Details

    • Technical task
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.2(EOL)
    • N/A
    • Documentation, Server
    • None
    • GNU/Linux

    Description

      Now this starts to smell.
      If a column is defined as NULL-able, 10.2 will automatically append DEFAULT NULL to create statements.

      10.2

        `description` text COLLATE utf8_bin DEFAULT NULL
      

      10.0

       `description` text COLLATE utf8_bin
      

      Originally the column does not have DEFAULT value set at all!

      Basically table exported from 10.2 will not work in a same way on MariaDB 10.0 or MySQL servers.

      Attachments

        Issue Links

          Activity

            stamster Nemanja Stambolic added a comment - - edited

            Furthermore, this only seems to apply for text columns which are defined NULL-able, while NOT-NULL-able text columns and varchar columns share same behavior with 10.0 series.

            Same on both 10.2 and 10.0

            author varchar(100) CHARACTER SET utf8 DEFAULT NULL
            

            Same on both 10.2 and 10.0

            article text CHARACTER SET utf8 NOT NULL
            

            Now that's a mess.

            stamster Nemanja Stambolic added a comment - - edited Furthermore, this only seems to apply for text columns which are defined NULL-able, while NOT-NULL-able text columns and varchar columns share same behavior with 10.0 series. Same on both 10.2 and 10.0 author varchar(100) CHARACTER SET utf8 DEFAULT NULL Same on both 10.2 and 10.0 article text CHARACTER SET utf8 NOT NULL Now that's a mess.
            greenman Ian Gilfillan added a comment -

            From MariaDB 10.2.1, BLOB and TEXT fields can have a DEFAULT value. The behaviour is unchanged, but the DEFAULT is now explicitly specified, as is preferable. The specification is now the same as for all other types. NOT NULL fields without a default will obviously fail or give a warning, depending on the strict mode, as they always have. In an unrelated change, 10.2 has also changed to strict mode by default.

            greenman Ian Gilfillan added a comment - From MariaDB 10.2.1, BLOB and TEXT fields can have a DEFAULT value. The behaviour is unchanged, but the DEFAULT is now explicitly specified, as is preferable. The specification is now the same as for all other types. NOT NULL fields without a default will obviously fail or give a warning, depending on the strict mode, as they always have. In an unrelated change, 10.2 has also changed to strict mode by default.

            Thanks for clarification. I think this deserves to be documented.

            stamster Nemanja Stambolic added a comment - Thanks for clarification. I think this deserves to be documented.
            greenman Ian Gilfillan added a comment - Added to https://mariadb.com/kb/en/library/show-create-table/ and https://mariadb.com/kb/en/library/incompatibilities-and-feature-differences-between-mariadb-102-and-mysql-57/

            People

              greenman Ian Gilfillan
              stamster Nemanja Stambolic
              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.