Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Rank:
      15744

      Description

      General collection of tasks and bugs related to datalib rewrite for Moodle 2.0

        Issue Links

        Progress
        Resolved Sub-Tasks

        Sub-Tasks

        1.
        adodb does not support blob and clob updates with bound parameters Sub-task Closed Petr Škoda
         
        2.
        pgsql does not support bound parameters in comments Sub-task Closed Petr Škoda
         
        3.
        pgsql does not support bound queries in field default values Sub-task Closed Petr Škoda
         
        4.
        some unknown problem in big query (1.5MB) test Sub-task Closed Petr Škoda
         
        5.
        Use proper placeholders for IN senteces Sub-task Closed Petr Škoda
         
        6.
        rename xmldb stuff to follow lowercase guidelines Sub-task Closed Eloy Lafuente (stronk7)
         
        7.
        Installer script is broken Sub-task Closed Petr Škoda
         
        8.
        prefix check shouldn't be perfomed by moodle_database classes Sub-task Closed Petr Škoda
         
        9.
        preconfigure_dbconnection() stuff must be implemented in some way Sub-task Closed Petr Škoda
         
        10.
        Fix one error in SetFetchMode() + minor clean Sub-task Closed Eloy Lafuente (stronk7)
         
        11.
        ADOdb Insert_ID() function under MSSQL, using placeholders doesn't work Sub-task Closed Eloy Lafuente (stronk7)
         
        12.
        M2: Implement mssql_adodb driver Sub-task Closed Eloy Lafuente (stronk7)
         
        13.
        M2: Implement oci8po_adodb driver Sub-task Closed Eloy Lafuente (stronk7)
         
        14.
        Move function emulate_bound_params() to adodb_moodle_database Sub-task Closed Eloy Lafuente (stronk7)
         
        15.
        Make generators stuff reentrant Sub-task Closed Eloy Lafuente (stronk7)
         
        16.
        M2: DDL and DML functional tests Sub-task Closed Nicolas Connault
         
        17.
        moodle_database should have one disconnect method Sub-task Closed Petr Škoda
         
        18.
        M2: Modify XMLDB Editor to suggest PHP code using the manager Sub-task Closed Eloy Lafuente (stronk7)
         
        19.
        M2: Modify XMLDB Editor to suggest creation conditional code Sub-task Closed Eloy Lafuente (stronk7)
         
        20.
        M2: Exception handling in DDL stuff Sub-task Closed Petr Škoda
         
        21.
        M2: Normalize results returned from get_tables() get_indexes() and get_columns() Sub-task Closed Petr Škoda
         
        22.
        M2: Tests get_tables() get_indexes() get_columns() Sub-task Closed Nicolas Connault
         
        23.
        M2: Move moodle_recordset to separate class into lib/dml Sub-task Closed Petr Škoda
         
        24.
        M2-M3-M4 Upgrade all code using DML Sub-task Closed Petr Škoda
         
        25.
        reset_columns() implementation... Sub-task Closed Petr Škoda
         
        26.
        Cleanup up deprecated functions so that we do not need to convert them Sub-task Closed Petr Škoda
         
        27.
        add optional dmllib regex search support Sub-task Closed Petr Škoda
         
        28.
        add magic quotes stripping option into data_submitted() Sub-task Closed Petr Škoda
         
        29.
        M2: Move emulate_bound_params() from adodb drivers to adodb_moodle_database Sub-task Closed Eloy Lafuente (stronk7)
         
        30.
        undefined variable in oci raw insert $primarykey Sub-task Closed Eloy Lafuente (stronk7)
         
        31.
        M2: Enable dml/ddl functional tests for MSSQL and Oracle Sub-task Closed Petr Škoda
         
        32.
        M2: adodb sessions switched to moodle sessions Sub-task Closed Petr Škoda
         
        33.
        M2: implement some workaround for Oracle recordset rewind Sub-task Closed Petr Škoda
         
        34.
        M2: delete_records should truncate table of delete of all records requested Sub-task Closed Petr Škoda
         
        35.
        M2: implement full temp table support in ddl Sub-task Closed Eloy Lafuente (stronk7)
         
        36.
        M4: stop using magic quotes Sub-task Closed Petr Škoda
         
        37.
        M4: remove all dependencies on adodb code (except dml itself) Sub-task Closed Petr Škoda
         
        38.
        M2: review missing $this-> inside dml/ddl code Sub-task Closed Eloy Lafuente (stronk7)
         
        39.
        Create one script to detect old uses of dml/ddl stuff Sub-task Closed Eloy Lafuente (stronk7)
         
        40.
        M2: basic read/write perf counter in moodle_database Sub-task Closed Petr Škoda
         
        41.
        pdo patches from Andrei Sub-task Closed Petr Škoda
         
        42.
        implement upgrade savepoints for mods and plugins Sub-task Closed Eloy Lafuente (stronk7)
         
        43.
        Some oddities in admin/report/courseoverview Sub-task Closed Petr Škoda
         
        44.
        M5: Test all sql_xxx() helper functions Sub-task Closed Petr Škoda
         
        45.
        Named parameters must accept repetitions Sub-task Closed Petr Škoda
         
        46.
        M5: Add some more tests about CLOBs and BLOBs Sub-task Closed Nicolas Connault
         
        47.
        cleanup the last stripslashes and friends Sub-task Closed Petr Škoda
         
        48.
        Make sql_substr() to accept parameters instead of simply returning function name Sub-task Closed Petr Škoda
         
        49.
        add new native mysqli dml driver Sub-task Closed Petr Škoda
         
        50.
        implement exceptions instead of error() and print_error() in ddl, dml and dtl Sub-task Closed Petr Škoda
         
        51.
        add new native pgsql dml driver Sub-task Closed Petr Škoda
         
        52.
        move dbpersist option into dboptions Sub-task Closed Petr Škoda
         
        53.
        implement dml_exceptions in drivers Sub-task Closed Petr Škoda
         
        54.
        obsolete $CFG->dbfamily Sub-task Closed Petr Škoda
         
        55.
        implement exceptions in all DML drivers Sub-task Closed Petr Škoda
         
        56.
        make native drivers default if library not specified in config.php Sub-task Closed Petr Škoda
         
        57.
        move reset_sequence into dbmanager Sub-task Closed Petr Škoda
         
        58.
        Need to put back the debug code that tells you if your first column is not unique in get_records_sql Sub-task Closed Petr Škoda
         
        59.
        postgres native driver, socket connection not working for me Sub-task Closed Petr Škoda
         
        60.
        implement sql_modulo() method Sub-task Closed Petr Škoda
         
        61.
        improve dml and ddl unit tests Sub-task Closed Petr Škoda
         
        62.
        implement caching in get_tables() Sub-task Closed Petr Škoda
         
        63.
        leading zores are chopped off from strings Sub-task Closed Petr Škoda
         
        64.
        ADOdb ODBC Insert_ID() function under MSSQL doesn't work Sub-task Closed Eloy Lafuente (stronk7)
         
        65.
        M2: Document xmldb/database/manager APIs Sub-task Closed Eloy Lafuente (stronk7)
         
        66.
        M2-M3-M4: Document all changes to perform in code to use new XMLDD/DDL/DML libs properly Sub-task Closed Eloy Lafuente (stronk7)
         
        67.
        M5: Finish the Tests page in Docs Sub-task Closed Petr Škoda
         
        68.
        M2: logging Sub-task Closed Petr Škoda
         
        69.
        M2: profiling Sub-task Closed Petr Škoda
         
        70.
        Implement native MS sql server drivers (freetds and sqlsrv) Sub-task Closed Eloy Lafuente (stronk7)
         
        71.
        do not check return value from isert_record and update_record and cleanup unused error messages replaced by new DML exceptions Sub-task Closed Petr Škoda
         
        72.
        Drop enums support Sub-task Closed Eloy Lafuente (stronk7)
         
        73.
        improve db transactions Sub-task Closed Petr Škoda
         
        74.
        remove obsoleted adodb database drivers before 2.0 branching Sub-task Closed Petr Škoda
         
        75.
        Any field operation (drop, rename, change_xxx) must look for field dependencies (indexes, keys...) Sub-task Closed Eloy Lafuente (stronk7)
         
        76.
        Improve PostgreSQL generator code Sub-task Closed Eloy Lafuente (stronk7)
         
        77.
        OCI breaks badly with statement_cache enabled under certain situations Sub-task Closed Eloy Lafuente (stronk7)
         
        78.
        Drop find_sequence_name() function Sub-task Closed Eloy Lafuente (stronk7)
         
        79.
        sql_ilike() refactoring Sub-task Closed Petr Škoda
         
        80.
        raise min Oracle reqs to 10R2 (10.2) Sub-task Closed Eloy Lafuente (stronk7)
         
        81.
        Nested DB transactions Sub-task Closed Eloy Lafuente (stronk7)
         
        82.
        insert/update/set_field expected behaviour is to cast empty string to 0 for numeric columns Sub-task Closed Eloy Lafuente (stronk7)
         
        83.
        On database dispose() check/warn/drop any remaining temp tables... Sub-task Closed Eloy Lafuente (stronk7)
         
        84.
        Control (count) opened recordsets Sub-task Closed Petr Škoda
         
        85.
        new sql_like() should accept parameters and treat case/accent sensitiveness properly Sub-task Closed Petr Škoda
         
        86.
        deprecate $DB->sql_ilike() Sub-task Closed Petr Škoda
         
        87.
        add $DB->sql_not_like() or add parameter to the sql_like() Sub-task Closed Petr Škoda
         

          Activity

          Hide
          Petr Škoda added a comment -

          sanding some simple implementation of new dmllib,
          it is very raw - some parts are probably broken, installer does not work, etc.
          Inline docs are missing too.

          Show
          Petr Škoda added a comment - sanding some simple implementation of new dmllib, it is very raw - some parts are probably broken, installer does not work, etc. Inline docs are missing too.
          Hide
          Petr Škoda added a comment -

          sending more feature complete sample,
          still only adodb mysql supported

          Show
          Petr Škoda added a comment - sending more feature complete sample, still only adodb mysql supported
          Hide
          Petr Škoda added a comment -

          Now sort of works with pg and mysql, all old dmllib functions with (.., $filed1, $value1, ..) and logging are redirected to the new library

          Show
          Petr Škoda added a comment - Now sort of works with pg and mysql, all old dmllib functions with (.., $filed1, $value1, ..) and logging are redirected to the new library
          Hide
          Petr Škoda added a comment -

          sending latest patch - see wiki for details

          Show
          Petr Škoda added a comment - sending latest patch - see wiki for details
          Hide
          Petr Škoda added a comment -

          fresh patch before the meeting

          Show
          Petr Škoda added a comment - fresh patch before the meeting
          Hide
          Petr Škoda added a comment - - edited

          to keep everybody informed: we (me and Eloy) discussed today needed changes in xmldb library - the changes are not major, just refactoring. Sample patch should be ready by Tuesday...

          Show
          Petr Škoda added a comment - - edited to keep everybody informed: we (me and Eloy) discussed today needed changes in xmldb library - the changes are not major, just refactoring. Sample patch should be ready by Tuesday...
          Hide
          Petr Škoda added a comment -

          sending fresh patch with new dml and ddl stuff - good luck

          Show
          Petr Škoda added a comment - sending fresh patch with new dml and ddl stuff - good luck
          Hide
          Petr Škoda added a comment -

          fixed problem with undefined config settings, thanks Eloy

          Show
          Petr Škoda added a comment - fixed problem with undefined config settings, thanks Eloy
          Hide
          Petr Škoda added a comment - - edited

          patch landed in cvs:

          TODO:

          • make mssql and ora work again
          • readd caching, better debugging and perf tracking
          • unit tests + functional tests
          • better docs
          • convert all code to use new API
          • etc.
          Show
          Petr Škoda added a comment - - edited patch landed in cvs: TODO: make mssql and ora work again readd caching, better debugging and perf tracking unit tests + functional tests better docs convert all code to use new API etc.
          Hide
          Nicolas Martignoni added a comment -

          I think taht the modification corresponding to this one: http://cvs.moodle.org/moodle/lang/en_utf8/help/richtext.html.diff?r1=1.10&r2=1.11 in lang packs will break pre-2.0 Moodle help files in all languages other than english, since we don't have branches for lang packs.

          Show
          Nicolas Martignoni added a comment - I think taht the modification corresponding to this one: http://cvs.moodle.org/moodle/lang/en_utf8/help/richtext.html.diff?r1=1.10&r2=1.11 in lang packs will break pre-2.0 Moodle help files in all languages other than english, since we don't have branches for lang packs.
          Hide
          Petr Škoda added a comment - - edited

          I reviewed the code before the commit, the can_use_html_editor() I put there is available since 1.6 at least, I do not think it could break anything. Versions bellow 1.6 are not supported anymore.

          Or did I miss something?

          Show
          Petr Škoda added a comment - - edited I reviewed the code before the commit, the can_use_html_editor() I put there is available since 1.6 at least, I do not think it could break anything. Versions bellow 1.6 are not supported anymore. Or did I miss something?
          Hide
          Petr Škoda added a comment - - edited

          Double checked it, the can_use_html_editor() was available in 1.6.0.
          The only potential problem could be if somebody used <1.9.2 language pack in 2.0 which would not work anyway..

          Show
          Petr Škoda added a comment - - edited Double checked it, the can_use_html_editor() was available in 1.6.0. The only potential problem could be if somebody used <1.9.2 language pack in 2.0 which would not work anyway..
          Hide
          Nicolas Martignoni added a comment -

          OK, thanks for the clarification. And sorry for the trouble.

          Show
          Nicolas Martignoni added a comment - OK, thanks for the clarification. And sorry for the trouble.
          Hide
          Samuli Karevaara added a comment -

          Sweet Mother of all Patches :-O

          Show
          Samuli Karevaara added a comment - Sweet Mother of all Patches :-O
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Just for reference, I've applied a minor modif to the mssql driver to better handling of booleans and bug in set_field(). Just a tiny commit being part of the WIP.

          Show
          Eloy Lafuente (stronk7) added a comment - Just for reference, I've applied a minor modif to the mssql driver to better handling of booleans and bug in set_field(). Just a tiny commit being part of the WIP.
          Hide
          Petr Škoda added a comment -

          Finally after several years all known issues should be solved now. Thanks everybody!

          Petr Skoda

          Show
          Petr Škoda added a comment - Finally after several years all known issues should be solved now. Thanks everybody! Petr Skoda
          Hide
          Tim Hunt added a comment -

          Dongsheng. I think you should change your last commit. The code

          echo 200;

          really looks like debug output that someone left in by mistake. I am not surprised that Petr deleted it accidentally.

          I suggest you create a function called chat_print_ok(), to match chat_print_error(), so that the code is self-documenting. Or, if you can't be bothered to do that, at least add a comment.

          Anyway, I was confused by this, and I thought I ought to report it.

          Show
          Tim Hunt added a comment - Dongsheng. I think you should change your last commit. The code echo 200; really looks like debug output that someone left in by mistake. I am not surprised that Petr deleted it accidentally. I suggest you create a function called chat_print_ok(), to match chat_print_error(), so that the code is self-documenting. Or, if you can't be bothered to do that, at least add a comment. Anyway, I was confused by this, and I thought I ought to report it.
          Hide
          Petr Škoda added a comment -

          I suppose that is old style ajax "success" message, which I deleted it by mistake. We have started using json encoded messages in the new AJAX_SCRIPT after this code was created.

          Show
          Petr Škoda added a comment - I suppose that is old style ajax "success" message, which I deleted it by mistake. We have started using json encoded messages in the new AJAX_SCRIPT after this code was created.
          Hide
          Dongsheng Cai added a comment -

          Hi, Tim and Petr

          I changed echo 200; to echo json_encode(true); and added a comment there.

          Show
          Dongsheng Cai added a comment - Hi, Tim and Petr I changed echo 200; to echo json_encode(true); and added a comment there.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: