Moodle

We need more tests on the output of dml functions to ensure they are consistent across db engines

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 2.0
  • Fix Version/s: None
  • Component/s: Unit tests
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE

Description

For things like column naming

Activity

Hide
Dan Poltawski added a comment -

Adding Eloy and Petr here.

When playing with sqlite - I noticed that none of the current dml tests didn't spot inconsistencies with complicated things like subqueries.

In the case of sqlite it was returning things like:

stdClass Object
(
[one.name] => record3
[one.course] => 3
)

Instead of:

stdClass Object
(
[name] => record3
[course] => 3
)

Attached one test which demonstrates this (but we probably need more and I am not sure if its the best approach)

Show
Dan Poltawski added a comment - Adding Eloy and Petr here. When playing with sqlite - I noticed that none of the current dml tests didn't spot inconsistencies with complicated things like subqueries. In the case of sqlite it was returning things like: stdClass Object ( [one.name] => record3 [one.course] => 3 ) Instead of: stdClass Object ( [name] => record3 [course] => 3 ) Attached one test which demonstrates this (but we probably need more and I am not sure if its the best approach)

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated: