I got an error while updating from 2.03 to 2.1 beta on mdl_question_usages.
First during the update, and later when i try to do a test this on:
Debug info: BIGINT UNSIGNED value is out of range in '(-(1) * `moodledata`.`qas`.`id`)'
SELECT
COALESCE(qasd.id, -1 * qas.id) AS id,
quba.id AS qubaid,
quba.contextid,
quba.component,
quba.preferredbehaviour,
qa.id AS questionattemptid,
qa.questionusageid,
qa.slot,
qa.behaviour,
qa.questionid,
qa.variant,
qa.maxmark,
qa.minfraction,
qa.flagged,
qa.questionsummary,
qa.rightanswer,
qa.responsesummary,
qa.timemodified,
qas.id AS attemptstepid,
qas.sequencenumber,
qas.state,
qas.fraction,
qas.timecreated,
qas.userid,
qasd.name,
qasd.value
FROM mdl_question_usages quba
LEFT JOIN mdl_question_attempts qa ON qa.questionusageid = quba.id
LEFT JOIN mdl_question_attempt_steps qas ON qas.questionattemptid = qa.id
LEFT JOIN mdl_question_attempt_step_data qasd ON qasd.attemptstepid = qas.id
WHERE
quba.id = ?
ORDER BY
qa.slot,
qas.sequencenumber
[array (
0 => '5594',
)]
SELECT
COALESCE(qasd.id, -1 * qas.id) AS id,
quba.id AS qubaid,
quba.contextid,
quba.component,
quba.preferredbehaviour,
qa.id AS questionattemptid,
qa.questionusageid,
qa.slot,
qa.behaviour,
qa.questionid,
qa.variant,
qa.maxmark,
qa.minfraction,
qa.flagged,
qa.questionsummary,
qa.rightanswer,
qa.responsesummary,
qa.timemodified,
qas.id AS attemptstepid,
qas.sequencenumber,
qas.state,
qas.fraction,
qas.timecreated,
qas.userid,
qasd.name,
qasd.value
FROM mdl_question_usages quba
LEFT JOIN mdl_question_attempts qa ON qa.questionusageid = quba.id
LEFT JOIN mdl_question_attempt_steps qas ON qas.questionattemptid = qa.id
LEFT JOIN mdl_question_attempt_step_data qasd ON qasd.attemptstepid = qas.id
WHERE
quba.id = ?
ORDER BY
qa.slot,
qas.sequencenumber
[array (
0 => '5594',
)]
Stack trace:
- line 393 of \lib\dml\moodle_database.php: dml_read_exception thrown
- line 794 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
- line 269 of \question\engine\datalib.php: call to mysqli_native_moodle_database->get_records_sql()
- line 78 of \question\engine\lib.php: call to question_engine_data_mapper->load_questions_usage_by_activity()
- line 365 of \mod\quiz\attemptlib.php: call to question_engine::load_questions_usage_by_activity()
- line 385 of \mod\quiz\attemptlib.php: call to quiz_attempt->__construct()
- line 395 of \mod\quiz\attemptlib.php: call to quiz_attempt::create_helper()
- line 44 of \mod\quiz\attempt.php: call to quiz_attempt::create()
Any idea, its a copy (test) local of our production site
Thanks
Bas