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

Database drivers missing sql_cast_char2real() and associated tests

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Database:
      Any
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Was working on MDL-21437, when I detected that some fields that internally are using $DB->sql_cast_char2real(), weren't being properly casted, causing wrong sorts.

      Looking at drivers implementation, only moodle_database has one default implementation and moodle_pgsql_database a custom one.

      Also, tests were incomplete/inaccurate enough to cause us to think that everything was under control. So I'm going to implement the sql_cast_char2real() method for the drivers missing it and create/modify tests, to check for those implementations better.

      Ciao

        Attachments

          Activity

            People

            Assignee:
            stronk7 Eloy Lafuente (stronk7)
            Reporter:
            stronk7 Eloy Lafuente (stronk7)
            Tester:
            Nobody
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              24/Nov/10