Moodle

Query error in mdl_data_content table does not have the type collumn

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: 1.9.3
  • Fix Version/s: 1.9.6
  • Component/s: Database SQL/XMLDB
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

I have seen this query taking too much time to execute and generating a sql error

The mld_data_content table on moodle 1.9.3 does not have the type collumn

SELECT * FROM mdl_data_content WHERE recordid = 1111 AND type = 'text' ORDER BY recordid

This query is trigered by admin/cron.php and also index.php.

Issue Links

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

Wow Angelo,

I've been looking for any SQL statement combining "data_content" and "recordid" and only have found one in mod/data/view.php and it doesn't use "type" at all.

Do you have the complete stacktrace of the error? To see where it's exactly used?

TIA and ciao

Show
Eloy Lafuente (stronk7) added a comment - Wow Angelo, I've been looking for any SQL statement combining "data_content" and "recordid" and only have found one in mod/data/view.php and it doesn't use "type" at all. Do you have the complete stacktrace of the error? To see where it's exactly used? TIA and ciao
Hide
Angelo Rigo added a comment -

Hi ! Using 1.9.3 version it says the querys came from the cron.php file:

SELECT title FROM mdl_search_document WHERE docid = '111' AND itemtype = 'record' LIMIT 1
ERROR: Table 'moodle.mdl_search_document' doesn't exist admin/cron.php

SELECT * FROM mdl_data_content WHERE recordid = 111 AND type = 'text' ORDER BY recordid
ERROR: Unknown column 'type' in 'where clause' /admin/cron.php

From the ADOdb Performance Monitor

Show
Angelo Rigo added a comment - Hi ! Using 1.9.3 version it says the querys came from the cron.php file: SELECT title FROM mdl_search_document WHERE docid = '111' AND itemtype = 'record' LIMIT 1 ERROR: Table 'moodle.mdl_search_document' doesn't exist admin/cron.php SELECT * FROM mdl_data_content WHERE recordid = 111 AND type = 'text' ORDER BY recordid ERROR: Unknown column 'type' in 'where clause' /admin/cron.php From the ADOdb Performance Monitor
Hide
Eloy Lafuente (stronk7) added a comment -

re-wow Angelo,

after looking for it a lot... finally I've downloaded Moodle 1.9.3 and have found the original problem. See:

http://cvs.moodle.org/moodle/search/documents/data_document.php?r1=1.3.2.4&r2=1.3.2.5
(around line 250)

That's the culprit sentence!

It was reported (and fixed) in the Tracker at MDL-19154, so I guess your only chance is to upgrade to Moodle 1.9.5+ to get it properly fixed.

I'm going to close this as duplicate of the other bug. Thanks for your report... ciao

Show
Eloy Lafuente (stronk7) added a comment - re-wow Angelo, after looking for it a lot... finally I've downloaded Moodle 1.9.3 and have found the original problem. See: http://cvs.moodle.org/moodle/search/documents/data_document.php?r1=1.3.2.4&r2=1.3.2.5 (around line 250) That's the culprit sentence! It was reported (and fixed) in the Tracker at MDL-19154, so I guess your only chance is to upgrade to Moodle 1.9.5+ to get it properly fixed. I'm going to close this as duplicate of the other bug. Thanks for your report... ciao
Hide
Eloy Lafuente (stronk7) added a comment -

Resolving as dupe of MDL-19154 as commented. Ciao

Show
Eloy Lafuente (stronk7) added a comment - Resolving as dupe of MDL-19154 as commented. Ciao

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: