Details

      Description

      Partially discussed in http://area51.phpbb.com/phpBB/viewtopic.php?p=210819#p210819

      Sqlite 3 wasn't available when phpBB 3.0.x was released, but it has some functionality over sqlite 2 that could be used. Also see: http://area51.phpbb.com/phpBB/viewtopic.php?p=210900#p210900

        Issue Links

          Activity

          bantu Andreas Fischer created issue -
          bantu Andreas Fischer made changes -
          Field Original Value New Value
          Link This issue blocks PHPBB3-8674 [ PHPBB3-8674 ]
          rxu Ruslan Uzdenov made changes -
          Link This issue is duplicated by PHPBB3-9736 [ PHPBB3-9736 ]
          Show
          igorw Igor Wiedler [X] (Inactive) added a comment - RFC: http://area51.phpbb.com/phpBB/viewtopic.php?f=84&t=33447
          igorw Igor Wiedler [X] (Inactive) made changes -
          Assignee Igor Wiedler [ igorw ]
          Hide
          ToonArmy Chris Smith added a comment -

          I'm working on pulling the MOD into a branch.

          Show
          ToonArmy Chris Smith added a comment - I'm working on pulling the MOD into a branch.
          ToonArmy Chris Smith made changes -
          Assignee Igor Wiedler [ igorw ] Chris Smith [ toonarmy ]
          Hide
          ToonArmy Chris Smith added a comment -

          Various complications should be resolved with db_tools before making a bigger mess with this feature. Hence I won't be updating the updater db_tools in my branch.

          Show
          ToonArmy Chris Smith added a comment - Various complications should be resolved with db_tools before making a bigger mess with this feature. Hence I won't be updating the updater db_tools in my branch.
          ToonArmy Chris Smith made changes -
          Link This issue depends on PHPBB3-10003 [ PHPBB3-10003 ]
          Show
          ToonArmy Chris Smith added a comment - Work has started: https://github.com/cs278/phpbb3/compare/develop...feature/sqlite3
          Hide
          igorw Igor Wiedler [X] (Inactive) added a comment -

          Here's a version that passes almost all tests, except for one with null bytes.

          https://github.com/igorw/phpbb3/compare/ticket%2F9728

          The problem is the same that is fixed here: https://github.com/rails/rails/commit/88636f7195fc936421392740f980d17ebe77d701

          Fixing it may however be non-trivial.

          Show
          igorw Igor Wiedler [X] (Inactive) added a comment - Here's a version that passes almost all tests, except for one with null bytes. https://github.com/igorw/phpbb3/compare/ticket%2F9728 The problem is the same that is fixed here: https://github.com/rails/rails/commit/88636f7195fc936421392740f980d17ebe77d701 Fixing it may however be non-trivial.
          Hide
          igorw Igor Wiedler [X] (Inactive) added a comment -

          Related (and partial fix): https://gist.github.com/1076914

          Show
          igorw Igor Wiedler [X] (Inactive) added a comment - Related (and partial fix): https://gist.github.com/1076914
          Hide
          nickvergessen Joas Schilling added a comment -

          After some research tonight, I came to the conclusion that we need to give the column_type or column_name&table_name (so we can determinate the type) to sql_escape, so we can find out whether its binary data that is going to be handled or not. This however should be optional, so you can still use $db->sql_escape() as it works today.

          I'd suggest to add a parameter $is_binary = false to sql_escape() and set this properly within _sql_validate_value(), therefore we need to either pass the column_name&table_name or column_type to that function aswell. I'd suggest to use the column_type here.

          However if we want to fix this, we need to specify the table on sql_build_array()and sql_in_set(),[sql_multi_insert() already has it] if it can contain binary data.

          I will try to turn my idea into a patch later today or tomorrow, so we can see whether its too much or not.

          Show
          nickvergessen Joas Schilling added a comment - After some research tonight, I came to the conclusion that we need to give the column_type or column_name&table_name (so we can determinate the type) to sql_escape, so we can find out whether its binary data that is going to be handled or not. This however should be optional, so you can still use $db->sql_escape() as it works today. I'd suggest to add a parameter $is_binary = false to sql_escape() and set this properly within _sql_validate_value(), therefore we need to either pass the column_name&table_name or column_type to that function aswell. I'd suggest to use the column_type here. However if we want to fix this, we need to specify the table on sql_build_array()and sql_in_set(), [sql_multi_insert() already has it] if it can contain binary data. I will try to turn my idea into a patch later today or tomorrow, so we can see whether its too much or not.
          Hide
          nickvergessen Joas Schilling added a comment -

          Well so the problem is, sql_escape can not handle binary in sqlite3, as it needs to add an x before the '' in the query, so we would need to include the ' into the function, I would suggest using a new function sql_escape_binary() https://gist.github.com/1078063

          But the problem with terminating whether a column is binary or not, is still a problem which might lead to big code changes.

          Show
          nickvergessen Joas Schilling added a comment - Well so the problem is, sql_escape can not handle binary in sqlite3, as it needs to add an x before the '' in the query, so we would need to include the ' into the function, I would suggest using a new function sql_escape_binary() https://gist.github.com/1078063 But the problem with terminating whether a column is binary or not, is still a problem which might lead to big code changes.
          shibulijack shibulijack [X] (Inactive) made changes -
          Status Open [ 1 ] Unreviewed Patch [ 10002 ]
          Proposed Patch URL https://github.com/phpbb/phpbb3/pull/666
          Proposed Patch Location URL [ 10012 ]
          shibulijack shibulijack [X] (Inactive) made changes -
          Comment [ I have tried to add support for sqlite3 by analysing the mod "Support of SQLite 3.0+" by Boris Berdichevski. Passes the travis test. ]
          Hide
          shibulijack shibulijack [X] (Inactive) added a comment -

          Can someone please review this PR: https://github.com/phpbb/phpbb3/pull/666
          Passes the travis test.

          Show
          shibulijack shibulijack [X] (Inactive) added a comment - Can someone please review this PR: https://github.com/phpbb/phpbb3/pull/666 Passes the travis test.
          naderman Nils Adermann made changes -
          Workflow phpBB Full Tracker Workflow 2 [ 38703 ] phpBB Full Tracker Workflow 3 [ 50285 ]
          nickvergessen Joas Schilling made changes -
          Status Patch Awaiting Review [ 10002 ] Patch Needs Work [ 10004 ]
          Hide
          EXreaction EXreaction added a comment -
          Show
          EXreaction EXreaction added a comment - Previous WIP PR: https://github.com/phpbb/phpbb3/pull/666
          EXreaction EXreaction made changes -
          Status Patch Needs Work [ 10004 ] Patch Awaiting Review [ 10002 ]
          GitHub Pull Request URL https://github.com/phpbb/phpbb3/pull/666
          EXreaction EXreaction made changes -
          Status Patch Awaiting Review [ 10002 ] Open [ 1 ]
          Assignee Chris Smith [ toonarmy ]
          nickvergessen Joas Schilling made changes -
          Fix Version/s 3.1.0-A2 [ 10393 ]
          Fix Version/s 3.1.0-A1 [ 10052 ]
          nickvergessen Joas Schilling made changes -
          Fix Version/s 3.1.0-a3 [ 10590 ]
          Fix Version/s 3.1.0-a2 [ 10393 ]
          nickvergessen Joas Schilling made changes -
          Fix Version/s 3.1.0-a4 [ 10591 ]
          Fix Version/s 3.1.0-a3 [ 10590 ]
          nickvergessen Joas Schilling made changes -
          Fix Version/s 3.1.0-b2 [ 10691 ]
          Fix Version/s 3.1.0-a4 [ 10591 ]
          nickvergessen Joas Schilling made changes -
          Fix Version/s 3.1.0-b3 [ 10692 ]
          Fix Version/s 3.1.0-b2 [ 10691 ]
          Hide
          rxu Ruslan Uzdenov added a comment -

          Would be nice to get it completed in 3.1.

          Show
          rxu Ruslan Uzdenov added a comment - Would be nice to get it completed in 3.1.
          Hide
          nickvergessen Joas Schilling added a comment -

          Which it is not going to

          Show
          nickvergessen Joas Schilling added a comment - Which it is not going to
          nickvergessen Joas Schilling made changes -
          Affects Version/s 3.1.0-b2 [ 10691 ]
          Affects Version/s 3.0.12 [ 10191 ]
          Fix Version/s 3.2.0-a1 [ 10100 ]
          Fix Version/s 3.1.0-b3 [ 10692 ]
          Hide
          Boris Berdichevski Boris Berdichevski added a comment -

          Php doesn't support SQLite 2 yet. Now, we support for SQLite 3 PDO (integrated into php from version 5.3).

          Show
          Boris Berdichevski Boris Berdichevski added a comment - Php doesn't support SQLite 2 yet. Now, we support for SQLite 3 PDO (integrated into php from version 5.3).
          Boris Berdichevski Boris Berdichevski made changes -
          Status Open [ 1 ] Patch Awaiting Review [ 10002 ]
          GitHub Pull Request URL https://github.com/phpbb/phpbb/pull/2333
          Noxwizard Patrick Webster made changes -
          Status Patch Awaiting Review [ 10002 ] Patch Awaiting Review [ 10002 ]
          GitHub Pull Request URL https://github.com/phpbb/phpbb/pull/2333 https://github.com/phpbb/phpbb/pull/2351
          naderman Nils Adermann made changes -
          Assignee Joas Schilling [ nickvergessen ]
          Fix Version/s 3.1.0-b3 [ 10692 ]
          Fix Version/s 3.2.0-a1 [ 10100 ]
          naderman Nils Adermann made changes -
          Resolution Fixed [ 1 ]
          Status Patch Awaiting Review [ 10002 ] Unverified Fix [ 5 ]
          naderman Nils Adermann made changes -
          Resolution Fixed [ 1 ]
          Status Unverified Fix [ 5 ] Open [ 1 ]
          naderman Nils Adermann made changes -
          Status Open [ 1 ] Patch Awaiting Review [ 10002 ]
          GitHub Pull Request URL https://github.com/phpbb/phpbb/pull/2351 https://github.com/phpbb/phpbb/pull/2370
          naderman Nils Adermann made changes -
          Resolution Fixed [ 1 ]
          Status Patch Awaiting Review [ 10002 ] Unverified Fix [ 5 ]
          nickvergessen Joas Schilling made changes -
          Link This issue obsoletes PHPBB3-11931 [ PHPBB3-11931 ]

            People

            • Assignee:
              nickvergessen Joas Schilling
              Reporter:
              bantu Andreas Fischer
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development