Details

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

      Description

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

        Gliffy Diagrams

          Issue Links

          1.
          adodb does not support blob and clob updates with bound parameters Sub-task Closed Petr Skoda
           
          2.
          pgsql does not support bound parameters in comments Sub-task Closed Petr Skoda
           
          3.
          pgsql does not support bound queries in field default values Sub-task Closed Petr Skoda
           
          4.
          some unknown problem in big query (1.5MB) test Sub-task Closed Petr Skoda
           
          5.
          Use proper placeholders for IN senteces Sub-task Closed Petr Skoda
           
          6.
          rename xmldb stuff to follow lowercase guidelines Sub-task Closed Eloy Lafuente (stronk7)
           
          7.
          Installer script is broken Sub-task Closed Petr Skoda
           
          8.
          prefix check shouldn't be perfomed by moodle_database classes Sub-task Closed Petr Skoda
           
          9.
          preconfigure_dbconnection() stuff must be implemented in some way Sub-task Closed Petr Skoda
           
          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 Skoda
           
          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 Skoda
           
          21.
          M2: Normalize results returned from get_tables() get_indexes() and get_columns() Sub-task Closed Petr Skoda
           
          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 Skoda
           
          24.
          M2-M3-M4 Upgrade all code using DML Sub-task Closed Petr Skoda
           
          25.
          reset_columns() implementation... Sub-task Closed Petr Skoda
           
          26.
          Cleanup up deprecated functions so that we do not need to convert them Sub-task Closed Petr Skoda
           
          27.
          add optional dmllib regex search support Sub-task Closed Petr Skoda
           
          28.
          add magic quotes stripping option into data_submitted() Sub-task Closed Petr Skoda
           
          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 Skoda
           
          32.
          M2: adodb sessions switched to moodle sessions Sub-task Closed Petr Skoda
           
          33.
          M2: implement some workaround for Oracle recordset rewind Sub-task Closed Petr Skoda
           
          34.
          M2: delete_records should truncate table of delete of all records requested Sub-task Closed Petr Skoda
           
          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 Skoda
           
          37.
          M4: remove all dependencies on adodb code (except dml itself) Sub-task Closed Petr Skoda
           
          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 Skoda
           
          41.
          pdo patches from Andrei Sub-task Closed Petr Skoda
           
          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 Skoda
           
          44.
          M5: Test all sql_xxx() helper functions Sub-task Closed Petr Skoda
           
          45.
          Named parameters must accept repetitions Sub-task Closed Petr Skoda
           
          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 Skoda
           
          48.
          Make sql_substr() to accept parameters instead of simply returning function name Sub-task Closed Petr Skoda
           
          49.
          add new native mysqli dml driver Sub-task Closed Petr Skoda
           
          50.
          implement exceptions instead of error() and print_error() in ddl, dml and dtl Sub-task Closed Petr Skoda
           
          51.
          add new native pgsql dml driver Sub-task Closed Petr Skoda
           
          52.
          move dbpersist option into dboptions Sub-task Closed Petr Skoda
           
          53.
          implement dml_exceptions in drivers Sub-task Closed Petr Skoda
           
          54.
          obsolete $CFG->dbfamily Sub-task Closed Petr Skoda
           
          55.
          implement exceptions in all DML drivers Sub-task Closed Petr Skoda
           
          56.
          make native drivers default if library not specified in config.php Sub-task Closed Petr Skoda
           
          57.
          move reset_sequence into dbmanager Sub-task Closed Petr Skoda
           
          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 Skoda
           
          59.
          postgres native driver, socket connection not working for me Sub-task Closed Petr Skoda
           
          60.
          implement sql_modulo() method Sub-task Closed Petr Skoda
           
          61.
          improve dml and ddl unit tests Sub-task Closed Petr Skoda
           
          62.
          implement caching in get_tables() Sub-task Closed Petr Skoda
           
          63.
          leading zores are chopped off from strings Sub-task Closed Petr Skoda
           
          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 Skoda
           
          68.
          M2: logging Sub-task Closed Petr Skoda
           
          69.
          M2: profiling Sub-task Closed Petr Skoda
           
          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 Skoda
           
          72.
          Drop enums support Sub-task Closed Eloy Lafuente (stronk7)
           
          73.
          improve db transactions Sub-task Closed Petr Skoda
           
          74.
          remove obsoleted adodb database drivers before 2.0 branching Sub-task Closed Petr Skoda
           
          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 Skoda
           
          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 Skoda
           
          85.
          new sql_like() should accept parameters and treat case/accent sensitiveness properly Sub-task Closed Petr Skoda
           
          86.
          deprecate $DB->sql_ilike() Sub-task Closed Petr Skoda
           
          87.
          add $DB->sql_not_like() or add parameter to the sql_like() Sub-task Closed Petr Skoda
           

            Activity

            Hide
            skodak Petr Skoda 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
            skodak Petr Skoda 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
            skodak Petr Skoda added a comment -

            sending more feature complete sample,
            still only adodb mysql supported

            Show
            skodak Petr Skoda added a comment - sending more feature complete sample, still only adodb mysql supported
            Hide
            skodak Petr Skoda 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
            skodak Petr Skoda 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
            skodak Petr Skoda added a comment -

            sending latest patch - see wiki for details

            Show
            skodak Petr Skoda added a comment - sending latest patch - see wiki for details
            Hide
            skodak Petr Skoda added a comment -

            fresh patch before the meeting

            Show
            skodak Petr Skoda added a comment - fresh patch before the meeting
            Hide
            skodak Petr Skoda 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
            skodak Petr Skoda 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
            skodak Petr Skoda added a comment -

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

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

            fixed problem with undefined config settings, thanks Eloy

            Show
            skodak Petr Skoda added a comment - fixed problem with undefined config settings, thanks Eloy
            Hide
            skodak Petr Skoda 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
            skodak Petr Skoda 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
            mina 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
            mina 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
            skodak Petr Skoda 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
            skodak Petr Skoda 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
            skodak Petr Skoda 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
            skodak Petr Skoda 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
            mina Nicolas Martignoni added a comment -

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

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

            Sweet Mother of all Patches :-O

            Show
            samulik Samuli Karevaara added a comment - Sweet Mother of all Patches :-O
            Hide
            stronk7 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
            stronk7 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
            skodak Petr Skoda added a comment -

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

            Petr Skoda

            Show
            skodak Petr Skoda added a comment - Finally after several years all known issues should be solved now. Thanks everybody! Petr Skoda
            Hide
            timhunt 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
            timhunt 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
            skodak Petr Skoda 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
            skodak Petr Skoda 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 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 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:
                  Fix Release Date:
                  24/Nov/10