Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-23940

reserved word "longtext" not escaped as a mysql field name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Minor Minor
    • 1.9.9
    • 1.9.9
    • Database SQL/XMLDB
    • None
    • MySQL
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

      The reserved word "longtext" (possibly among others?) as a field name is not escaped when inserting/deleting data in mysql.

      I discovered this when experimenting with Penny's contrib "matrix" question type, which has a table with the field name "longtext". Saving a new question fails because the field name "longtext" is not escaped properly in the insert/delete statements. I can find the list of reserved words in lib/xmldb and since the table was created successfully, it was obviously escaped when the question type was installed. What I can't figure out is where reserved words are specified or where they are taken into consideration for field names in lib/adodb. (Or am I looking the wrong place?)

            stronk7 Eloy Lafuente (stronk7)
            adrianeboyd Adriane Boyd (Inactive)
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.