Moodle
  1. Moodle
  2. MDL-10195

xmldb generates is adding a "default =''" clause to the column when not specified in xml definition

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.8.1
    • Fix Version/s: None
    • Component/s: Installation
    • Labels:
      None
    • Environment:
      MySQL
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_18_STABLE
    • Rank:
      3685

      Description

      When installing a module that had the following in the xmldb install.xml field definition:

      <FIELD NAME="type" TYPE="char" LENGTH="16" NOTNULL="true" SEQUENCE="false" ENUM="true" ENUMVALUES="'qe', 'qb'" COMMENT="The type of this server - question engine or question bank." PREVIOUS="engineid" NEXT="url"/>

      This generated an error when installing on MySQL, error message - default not a valid value for field type.

      Looking at the SQL xmldb lib had produced, it had added default='' to the SQL statement. I got around this problem by specifying a (non null and non-empty/blank) default value in the install.xml - but there could be cases when you don't want a default specified in the xmldb definition - in which case xmldb lib shouldn't automatically add default=''

        Activity

        Hide
        Michael de Raadt added a comment -

        Thanks for reporting this issue.

        We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

        If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

        Michael d;

        lqjjLKA0p6

        Show
        Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
        Hide
        Michael de Raadt added a comment -

        I'm closing this issue as it has become inactive and does not appear to affect a current supported version. If you are encountering this problem or one similar, please launch a new issue.

        Show
        Michael de Raadt added a comment - I'm closing this issue as it has become inactive and does not appear to affect a current supported version. If you are encountering this problem or one similar, please launch a new issue.

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: