Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-14679 META: DB layer 2.0
  3. MDL-17347

Need to put back the debug code that tells you if your first column is not unique in get_records_sql

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      I have just messed up by writing a complicated query where it turned out that the first column was not unique (again!).

      I notice that pgsql_native_moodle_database.php does not have the nice debugging code I wrote that tells you immediately if you make this mistake. Please can you add it (around like 650 - maybe other methods need it to).

      And in adodb_moodle_database.php (around like 470) the code is no longer effective, since we are doing $records = $rs->GetAssoc(true) - which, in isolation, seems like a good idea - but makes it impossible to detect this common programming error.

        Attachments

          Activity

            People

            Assignee:
            skodak Petr Skoda
            Reporter:
            timhunt Tim Hunt
            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