Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-11503

Implementation of DB drivers vary too much

    Details

      Description

      As from my understand the two drivers mssql_odbc.php and mssqlnative.php handle somethings different which should be equal. In most cases the code fomr the odbc driver is the better one:

      mssql_odbc.php

      function sql_query($query = '', $cache_ttl = 0)
      ...
      if ($cache && $cache_ttl)


      mssqlnative.php

      function sql_query($query = '', $cache_ttl = 0)
      ...
      if ($cache_ttl)

      =====

      mssql_odbc.php

      	function sql_affectedrows()
      	{
      		return ($this->db_connect_id) ? @odbc_num_rows($this->query_result) : false;
      	}


      mssqlnative.php

      	function sql_affectedrows()
      	{
      		return (!empty($this->query_result)) ? @sqlsrv_rows_affected($this->query_result) : false;
      	}

      =====

      mssql_odbc.php ODBC INCORRECT HERE

      function sql_fetchrow($query_id = false, $debug = false)


      mssqlnative.php

      function sql_fetchrow($query_id = false)

      =====

      mssql_odbc.php

      		if ($cache && $cache->sql_exists($query_id))
      		{
      			return $cache->sql_fetchrow($query_id);
      		}


      mssqlnative.php

      		if ($cache->sql_exists($query_id))
      		{
      			return $cache->sql_fetchrow($query_id);
      		}

      =====

      mssql_odbc.php

      		if ($cache && $cache->sql_exists($query_id))
      		{
      			return $cache->sql_freeresult($query_id);
      		}
       
      		if (isset($this->open_queries[(int) $query_id]))
      		{
      			unset($this->open_queries[(int) $query_id]);


      mssqlnative.php

      		if ($cache->sql_exists($query_id))
      		{
      			return $cache->sql_freeresult($query_id);
      		}
       
      		if (isset($this->open_queries[$query_id]))
      		{
      			unset($this->open_queries[$query_id]);

        Activity

        Hide
        encryptedmind Jesús Cova [X] (Inactive) added a comment -

        This is not a bug, it is an improvement so you need to put it on the foro and discuss what the development team thinks about it

        Show
        encryptedmind Jesús Cova [X] (Inactive) added a comment - This is not a bug, it is an improvement so you need to put it on the foro and discuss what the development team thinks about it
        Hide
        Marshalrusty Yuriy Rusko added a comment -

        Protip: check who the reporter is before telling him/her to check with the development team

        Show
        Marshalrusty Yuriy Rusko added a comment - Protip: check who the reporter is before telling him/her to check with the development team
        Hide
        encryptedmind Jesús Cova [X] (Inactive) added a comment - - edited

        I have a question, because I am new, I need to name him or her? I mean that Joas Schilling is the reporter, may you explain me?

        Show
        encryptedmind Jesús Cova [X] (Inactive) added a comment - - edited I have a question, because I am new, I need to name him or her? I mean that Joas Schilling is the reporter, may you explain me?
        Hide
        Marshalrusty Yuriy Rusko added a comment -

        1) Joas is a phpBB Developer
        2) This is a bug
        3) RFC topics go on the forum, but even improvements get an issue ticket here

        Show
        Marshalrusty Yuriy Rusko added a comment - 1) Joas is a phpBB Developer 2) This is a bug 3) RFC topics go on the forum, but even improvements get an issue ticket here
        Hide
        encryptedmind Jesús Cova [X] (Inactive) added a comment -

        ahhh ok ok thanks

        Show
        encryptedmind Jesús Cova [X] (Inactive) added a comment - ahhh ok ok thanks

          People

          • Assignee:
            dhruv.goel92 Dhruv Goel
            Reporter:
            nickvergessen Joas Schilling
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development