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

Feedback... 'Show responses' fails with more than 61 questions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: 3.1
    • Fix Version/s: None
    • Component/s: Feedback
    • Labels:
      None

      Description

      To reproduce...

      • This may depend on MariaDB being the database in use
      • Create a Feedback with lots of questions, 62 or more. (import of questions attached)
      • At least one person has to make a response (example has lots of required questions but it only takes a few minutes)
      • Select 'Show responses'

      Database error is thrown with 'Too many tables; MariaDB can only use 61 tables in a join'. SQL is worse thing I have ever seen...

      {{SELECT
      c.id, c.random_response, c.courseid, v2.value AS val2, v3.value AS val3, v4.value AS val4, v5.value AS val5, v6.value AS val6, v7.value AS val7, v8.value AS val8, v11.value AS val11, v14.value AS val14, v15.value AS val15, v16.value AS val16, v17.value AS val17, v18.value AS val18, v19.value AS val19, v20.value AS val20, v21.value AS val21, v22.value AS val22, v23.value AS val23, v24.value AS val24, v25.value AS val25, v26.value AS val26, v27.value AS val27, v30.value AS val30, v31.value AS val31, v32.value AS val32, v33.value AS val33, v34.value AS val34, v35.value AS val35, v36.value AS val36, v37.value AS val37, v38.value AS val38, v39.value AS val39, v40.value AS val40, v41.value AS val41, v43.value AS val43, v45.value AS val45, v50.value AS val50, v51.value AS val51, v52.value AS val52, v53.value AS val53, v54.value AS val54, v55.value AS val55, v58.value AS val58, v59.value AS val59, v60.value AS val60, v61.value AS val61, v62.value AS val62, v63.value AS val63, v66.value AS val66, v71.value AS val71, v72.value AS val72, v73.value AS val73, v74.value AS val74, v75.value AS val75, v78.value AS val78, v79.value AS val79, v80.value AS val80, v81.value AS val81, v82.value AS val82, v84.value AS val84, v87.value AS val87, v88.value AS val88, v89.value AS val89, v90.value AS val90, v91.value AS val91, v92.value AS val92, v93.value AS val93, v94.value AS val94, v95.value AS val95, v96.value AS val96, v97.value AS val97, v98.value AS val98, v101.value AS val101, v102.value AS val102, v103.value AS val103, v104.value AS val104, v105.value AS val105, v108.value AS val108
      FROM mdl_feedback_completed c LEFT OUTER JOIN mdl_feedback_value v2 ON v2.completed = c.id AND v2.item = ? LEFT OUTER JOIN mdl_feedback_value v3 ON v3.completed = c.id AND v3.item = ? LEFT OUTER JOIN mdl_feedback_value v4 ON v4.completed = c.id AND v4.item = ? LEFT OUTER JOIN mdl_feedback_value v5 ON v5.completed = c.id AND v5.item = ? LEFT OUTER JOIN mdl_feedback_value v6 ON v6.completed = c.id AND v6.item = ? LEFT OUTER JOIN mdl_feedback_value v7 ON v7.completed = c.id AND v7.item = ? LEFT OUTER JOIN mdl_feedback_value v8 ON v8.completed = c.id AND v8.item = ? LEFT OUTER JOIN mdl_feedback_value v11 ON v11.completed = c.id AND v11.item = ? LEFT OUTER JOIN mdl_feedback_value v14 ON v14.completed = c.id AND v14.item = ? LEFT OUTER JOIN mdl_feedback_value v15 ON v15.completed = c.id AND v15.item = ? LEFT OUTER JOIN mdl_feedback_value v16 ON v16.completed = c.id AND v16.item = ? LEFT OUTER JOIN mdl_feedback_value v17 ON v17.completed = c.id AND v17.item = ? LEFT OUTER JOIN mdl_feedback_value v18 ON v18.completed = c.id AND v18.item = ? LEFT OUTER JOIN mdl_feedback_value v19 ON v19.completed = c.id AND v19.item = ? LEFT OUTER JOIN mdl_feedback_value v20 ON v20.completed = c.id AND v20.item = ? LEFT OUTER JOIN mdl_feedback_value v21 ON v21.completed = c.id AND v21.item = ? LEFT OUTER JOIN mdl_feedback_value v22 ON v22.completed = c.id AND v22.item = ? LEFT OUTER JOIN mdl_feedback_value v23 ON v23.completed = c.id AND v23.item = ? LEFT OUTER JOIN mdl_feedback_value v24 ON v24.completed = c.id AND v24.item = ? LEFT OUTER JOIN mdl_feedback_value v25 ON v25.completed = c.id AND v25.item = ? LEFT OUTER JOIN mdl_feedback_value v26 ON v26.completed = c.id AND v26.item = ? LEFT OUTER JOIN mdl_feedback_value v27 ON v27.completed = c.id AND v27.item = ? LEFT OUTER JOIN mdl_feedback_value v30 ON v30.completed = c.id AND v30.item = ? LEFT OUTER JOIN mdl_feedback_value v31 ON v31.completed = c.id AND v31.item = ? LEFT OUTER JOIN mdl_feedback_value v32 ON v32.completed = c.id AND v32.item = ? LEFT OUTER JOIN mdl_feedback_value v33 ON v33.completed = c.id AND v33.item = ? LEFT OUTER JOIN mdl_feedback_value v34 ON v34.completed = c.id AND v34.item = ? LEFT OUTER JOIN mdl_feedback_value v35 ON v35.completed = c.id AND v35.item = ? LEFT OUTER JOIN mdl_feedback_value v36 ON v36.completed = c.id AND v36.item = ? LEFT OUTER JOIN mdl_feedback_value v37 ON v37.completed = c.id AND v37.item = ? LEFT OUTER JOIN mdl_feedback_value v38 ON v38.completed = c.id AND v38.item = ? LEFT OUTER JOIN mdl_feedback_value v39 ON v39.completed = c.id AND v39.item = ? LEFT OUTER JOIN mdl_feedback_value v40 ON v40.completed = c.id AND v40.item = ? LEFT OUTER JOIN mdl_feedback_value v41 ON v41.completed = c.id AND v41.item = ? LEFT OUTER JOIN mdl_feedback_value v43 ON v43.completed = c.id AND v43.item = ? LEFT OUTER JOIN mdl_feedback_value v45 ON v45.completed = c.id AND v45.item = ? LEFT OUTER JOIN mdl_feedback_value v50 ON v50.completed = c.id AND v50.item = ? LEFT OUTER JOIN mdl_feedback_value v51 ON v51.completed = c.id AND v51.item = ? LEFT OUTER JOIN mdl_feedback_value v52 ON v52.completed = c.id AND v52.item = ? LEFT OUTER JOIN mdl_feedback_value v53 ON v53.completed = c.id AND v53.item = ? LEFT OUTER JOIN mdl_feedback_value v54 ON v54.completed = c.id AND v54.item = ? LEFT OUTER JOIN mdl_feedback_value v55 ON v55.completed = c.id AND v55.item = ? LEFT OUTER JOIN mdl_feedback_value v58 ON v58.completed = c.id AND v58.item = ? LEFT OUTER JOIN mdl_feedback_value v59 ON v59.completed = c.id AND v59.item = ? LEFT OUTER JOIN mdl_feedback_value v60 ON v60.completed = c.id AND v60.item = ? LEFT OUTER JOIN mdl_feedback_value v61 ON v61.completed = c.id AND v61.item = ? LEFT OUTER JOIN mdl_feedback_value v62 ON v62.completed = c.id AND v62.item = ? LEFT OUTER JOIN mdl_feedback_value v63 ON v63.completed = c.id AND v63.item = ? LEFT OUTER JOIN mdl_feedback_value v66 ON v66.completed = c.id AND v66.item = ? LEFT OUTER JOIN mdl_feedback_value v71 ON v71.completed = c.id AND v71.item = ? LEFT OUTER JOIN mdl_feedback_value v72 ON v72.completed = c.id AND v72.item = ? LEFT OUTER JOIN mdl_feedback_value v73 ON v73.completed = c.id AND v73.item = ? LEFT OUTER JOIN mdl_feedback_value v74 ON v74.completed = c.id AND v74.item = ? LEFT OUTER JOIN mdl_feedback_value v75 ON v75.completed = c.id AND v75.item = ? LEFT OUTER JOIN mdl_feedback_value v78 ON v78.completed = c.id AND v78.item = ? LEFT OUTER JOIN mdl_feedback_value v79 ON v79.completed = c.id AND v79.item = ? LEFT OUTER JOIN mdl_feedback_value v80 ON v80.completed = c.id AND v80.item = ? LEFT OUTER JOIN mdl_feedback_value v81 ON v81.completed = c.id AND v81.item = ? LEFT OUTER JOIN mdl_feedback_value v82 ON v82.completed = c.id AND v82.item = ? LEFT OUTER JOIN mdl_feedback_value v84 ON v84.completed = c.id AND v84.item = ? LEFT OUTER JOIN mdl_feedback_value v87 ON v87.completed = c.id AND v87.item = ? LEFT OUTER JOIN mdl_feedback_value v88 ON v88.completed = c.id AND v88.item = ? LEFT OUTER JOIN mdl_feedback_value v89 ON v89.completed = c.id AND v89.item = ? LEFT OUTER JOIN mdl_feedback_value v90 ON v90.completed = c.id AND v90.item = ? LEFT OUTER JOIN mdl_feedback_value v91 ON v91.completed = c.id AND v91.item = ? LEFT OUTER JOIN mdl_feedback_value v92 ON v92.completed = c.id AND v92.item = ? LEFT OUTER JOIN mdl_feedback_value v93 ON v93.completed = c.id AND v93.item = ? LEFT OUTER JOIN mdl_feedback_value v94 ON v94.completed = c.id AND v94.item = ? LEFT OUTER JOIN mdl_feedback_value v95 ON v95.completed = c.id AND v95.item = ? LEFT OUTER JOIN mdl_feedback_value v96 ON v96.completed = c.id AND v96.item = ? LEFT OUTER JOIN mdl_feedback_value v97 ON v97.completed = c.id AND v97.item = ? LEFT OUTER JOIN mdl_feedback_value v98 ON v98.completed = c.id AND v98.item = ? LEFT OUTER JOIN mdl_feedback_value v101 ON v101.completed = c.id AND v101.item = ? LEFT OUTER JOIN mdl_feedback_value v102 ON v102.completed = c.id AND v102.item = ? LEFT OUTER JOIN mdl_feedback_value v103 ON v103.completed = c.id AND v103.item = ? LEFT OUTER JOIN mdl_feedback_value v104 ON v104.completed = c.id AND v104.item = ? LEFT OUTER JOIN mdl_feedback_value v105 ON v105.completed = c.id AND v105.item = ? LEFT OUTER JOIN mdl_feedback_value v108 ON v108.completed = c.id AND v108.item = ?
      WHERE c.anonymous_response = ? AND c.feedback = ?
      ORDER BY random_response ASC
      [array (
      0 => '2',
      1 => '3',
      2 => '4',
      3 => '5',
      4 => '6',
      5 => '7',
      6 => '8',
      7 => '11',
      8 => '14',
      9 => '15',
      10 => '16',
      11 => '17',
      12 => '18',
      13 => '19',
      14 => '20',
      15 => '21',
      16 => '22',
      17 => '23',
      18 => '24',
      19 => '25',
      20 => '26',
      21 => '27',
      22 => '30',
      23 => '31',
      24 => '32',
      25 => '33',
      26 => '34',
      27 => '35',
      28 => '36',
      29 => '37',
      30 => '38',
      31 => '39',
      32 => '40',
      33 => '41',
      34 => '43',
      35 => '45',
      36 => '50',
      37 => '51',
      38 => '52',
      39 => '53',
      40 => '54',
      41 => '55',
      42 => '58',
      43 => '59',
      44 => '60',
      45 => '61',
      46 => '62',
      47 => '63',
      48 => '66',
      49 => '71',
      50 => '72',
      51 => '73',
      52 => '74',
      53 => '75',
      54 => '78',
      55 => '79',
      56 => '80',
      57 => '81',
      58 => '82',
      59 => '84',
      60 => '87',
      61 => '88',
      62 => '89',
      63 => '90',
      64 => '91',
      65 => '92',
      66 => '93',
      67 => '94',
      68 => '95',
      69 => '96',
      70 => '97',
      71 => '98',
      72 => '101',
      73 => '102',
      74 => '103',
      75 => '104',
      76 => '105',
      77 => '108',
      78 => 1,
      79 => '1',
      )]
      Error code: dmlreadexception}}

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              howardsmiller Howard Miller
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: