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

Error on overwriting My private files with Oracle & SQL*Server

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.1
    • Fix Version/s: 2.3.5, 2.4.2
    • Component/s: Files API
    • Labels:
    • Database:
      Oracle
    • Testing Instructions:
      Hide

      Needs testing using oracle, mssql and sqlsrv drivers

      1. Upload a file to your private files area
      2. Save changes
      3. Upload a different file (different content) with the same name
      4. Overwrite the original file
      5. Save changes
      6. VERIFY you see no errors
      7. Repeat this with a file resource in a course that has a reference to the file in private files area that is being updated
      Show
      Needs testing using oracle, mssql and sqlsrv drivers Upload a file to your private files area Save changes Upload a different file (different content) with the same name Overwrite the original file Save changes VERIFY you see no errors Repeat this with a file resource in a course that has a reference to the file in private files area that is being updated
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull Master Branch:
      wip-MDL-38091-master

      Description

      When you try to overwrite your private file with a new file the system display this error:

      ORA-00932: inconsistent datatypes: expected - got CLOB
       
       
      SELECT repositoryid, id FROM c_files_reference WHERE referencehash = :o_param1 and reference = :o_param2 [array ( 'o_param1' ⇒ '8bccfd63767d981f2cc7d76caa0348dd6b219f0e', 'o_param2' ⇒ 'YTo2OntzOjk6ImNvbnRleHRpZCI7aTo1O3M6OToiY29tcG9uZW50IjtzOjQ6InVzZXIiO3M6NjoiaXRlbWlkIjtpOjA7czo4OiJmaWxlYXJlYSI7czo3OiJwcml2YXRlIjtzOjg6ImZpbGVwYXRoIjtzOjE2OiIvUHJvdmEgQ2FydGVsbGEvIjtzOjg6ImZpbGVuYW1lIjtzOjE5OiJhcmdvbWVudG9fdmlvbGEucG5nIjt9', )]
       
      Error code: dmlreadexception
       
      Stack trace:
       
        line 426 of /lib/dml/moodle_database.php: dml_read_exception thrown
        line 274 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->query_end()
        line 1066 of /lib/dml/oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
        line 1856 of /lib/filestorage/file_storage.php: call to oci_native_moodle_database->get_recordset_sql()
        line 871 of /lib/filelib.php: call to file_storage->update_references_to_storedfile()
        line 296 of /lib/filelib.php: call to file_save_draft_area_files()
        line 70 of /user/files.php: call to file_postupdate_standard_filemanager()
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    11/Mar/13