-
Bug
-
Resolution: Not a bug
-
Minor
-
1.9.9
-
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?)