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

SQL errors in cron: > HTML entity in SQL code

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.3
    • Fix Version/s: 1.9.6
    • Component/s: Global search
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      I ran the cron script today as Admin on 1.9.3, and got a bunch of SQL errors, like the following:

      ... the right syntax to use near 'AND id IN ('')'
      SELECT id as docid
      FROM mdl_lesson_pages
      WHERE timemodified > AND id IN ('')

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Seems to be lesson-related. Addressing to 1.9.4 and assigning to Mark... thanks for report!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Seems to be lesson-related. Addressing to 1.9.4 and assigning to Mark... thanks for report!
            Hide
            skodak Petr Skoda added a comment -

            looks more like global search issue

            Show
            skodak Petr Skoda added a comment - looks more like global search issue
            Hide
            vf Valery Fremaux added a comment -

            Nicolas

            IMHO the issue does not come from > that is a trace effect, but rather on missing $CFG->search_indexer_update_date entry in config, breaking the UPDATE SQL statements.

            Could you check for presence of this date ?

            Could u try that fix and tell me ?

            search/update.php §56

            write :

            $indexdate = 0 + @$CFG->search_indexer_update_date;

            to protect writing of the SQL statement at line §101

            After the cron sequence running search indexer should the config value have changed...

            Cheers.

            Show
            vf Valery Fremaux added a comment - Nicolas IMHO the issue does not come from > that is a trace effect, but rather on missing $CFG->search_indexer_update_date entry in config, breaking the UPDATE SQL statements. Could you check for presence of this date ? Could u try that fix and tell me ? search/update.php §56 write : $indexdate = 0 + @$CFG->search_indexer_update_date; to protect writing of the SQL statement at line §101 After the cron sequence running search indexer should the config value have changed... Cheers.
            Hide
            vf Valery Fremaux added a comment -

            Query protection commited in CVS (MOODLE_19_STABLE, HEAD)

            Show
            vf Valery Fremaux added a comment - Query protection commited in CVS (MOODLE_19_STABLE, HEAD)

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  21/Oct/09