Skip to content

MSSQL unit test failures #692

@matthewhilton

Description

@matthewhilton
291) tool_objectfs\task\populate_objects_filesize_test::test_orphaned_objects_are_not_updated
dml_read_exception: Error reading from database (SQLState: 42000<br>
Error Code: 8120<br>
Message: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Column 'phpu_tool_objectfs_objects.timeduplicated' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.<br>

SELECT o.id, o.contenthash, o.timeduplicated, o.location, f.filesize
                  FROM phpu_tool_objectfs_objects o
                  JOIN phpu_files f ON o.contenthash = f.contenthash
                 WHERE o.filesize IS NULL
                   AND o.location >= 0
              GROUP BY o.id,
                       o.contenthash,
                       f.filesize ORDER BY 1 OFFSET 0 ROWS  FETCH NEXT 100001 ROWS ONLY
[array (
)])

/var/www/site/lib/dml/moodle_database.php:497
/var/www/site/lib/dml/sqlsrv_native_moodle_database.php:331
/var/www/site/lib/dml/sqlsrv_native_moodle_database.php:438
/var/www/site/lib/dml/sqlsrv_native_moodle_database.php:909
/var/www/site/admin/tool/objectfs/classes/task/populate_objects_filesize.php:55
/var/www/site/admin/tool/objectfs/tests/task/populate_objects_filesize_test.php:191
/var/www/site/lib/phpunit/classes/advanced_testcase.php:76

292) tool_objectfs\task\populate_objects_filesize_test::test_objects_with_error_are_not_updated
dml_read_exception: Error reading from database (SQLState: 42000<br>
Error Code: 8120<br>
Message: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Column 'phpu_tool_objectfs_objects.timeduplicated' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.<br>

SELECT o.id, o.contenthash, o.timeduplicated, o.location, f.filesize
                  FROM phpu_tool_objectfs_objects o
                  JOIN phpu_files f ON o.contenthash = f.contenthash
                 WHERE o.filesize IS NULL
                   AND o.location >= 0
              GROUP BY o.id,
                       o.contenthash,
                       f.filesize ORDER BY 1 OFFSET 0 ROWS  FETCH NEXT 100001 ROWS ONLY
[array (
)])

/var/www/site/lib/dml/moodle_database.php:497
/var/www/site/lib/dml/sqlsrv_native_moodle_database.php:331
/var/www/site/lib/dml/sqlsrv_native_moodle_database.php:438
/var/www/site/lib/dml/sqlsrv_native_moodle_database.php:909
/var/www/site/admin/tool/objectfs/classes/task/populate_objects_filesize.php:55
/var/www/site/admin/tool/objectfs/tests/task/populate_objects_filesize_test.php:226
/var/www/site/lib/phpunit/classes/advanced_testcase.php:76

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions