Moodle

"range" is a reserved word as of MySQL 5.1

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9.4
  • Fix Version/s: 1.9.5
  • Component/s: Database SQL/XMLDB
  • Labels:
    None
  • Environment:
    Windows, XAMPP 1.7.0, Moodle 1.9.4
  • Database:
    MySQL
  • Difficulty:
    Easy
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

I cannot get my activity installed since it uses a column named `range`.
There should either be a possibility to set quote_all = true or the keyword `range` should be included in the list at
/moodle/lib/xmldb/classes/generators/mysql/mysql.class.php
line 340

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

Aha,

well spotted. Just found some new MySQL reserved words here:

http://dev.mysql.com/doc/mysqld-version-reference/en/mysqld-version-reference-reservedwords-5-1.html

I'm going to add all them right now to mysql drivers. Thanks!

Show
Eloy Lafuente (stronk7) added a comment - Aha, well spotted. Just found some new MySQL reserved words here: http://dev.mysql.com/doc/mysqld-version-reference/en/mysqld-version-reference-reservedwords-5-1.html I'm going to add all them right now to mysql drivers. Thanks!
Hide
Eloy Lafuente (stronk7) added a comment -

Hi, I've added these:

accessible, linear, master_heartbeat_period, master_ssl_verify_server_cert, overwrite, range, read_only, read_write

That are the new reserved words found in MySQL 5.1 and 6.0

Resolving as fixed. Thanks!

Show
Eloy Lafuente (stronk7) added a comment - Hi, I've added these: accessible, linear, master_heartbeat_period, master_ssl_verify_server_cert, overwrite, range, read_only, read_write That are the new reserved words found in MySQL 5.1 and 6.0 Resolving as fixed. Thanks!
Hide
Eloy Lafuente (stronk7) added a comment -

Also, added two new postgresql reserved words: "returning" and "with"

Show
Eloy Lafuente (stronk7) added a comment - Also, added two new postgresql reserved words: "returning" and "with"
Hide
Eloy Lafuente (stronk7) added a comment -

Also, converted sqlite list to lowercase (in 2.0). Ciao

Show
Eloy Lafuente (stronk7) added a comment - Also, converted sqlite list to lowercase (in 2.0). Ciao
Hide
Dongsheng Cai added a comment -

Verified, thanks everyone

Show
Dongsheng Cai added a comment - Verified, thanks everyone

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: