Uploaded image for project: 'CUBRID APIs'
  1. CUBRID APIs
  2. APIS-44

[PHP]Modified the return value for cubrid_fetch, cubrid_fetch_row, cubrid_fetch_array and cubrid_fetch_assoc when there are no more data

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: PHP-8.4.0
    • Fix Version/s: PHP-8.4.1
    • Component/s: PHP Driver
    • Labels:
      None
    • Environment:

      CUBRID 8.4.1

      Description

      According to the documents cubrid_fetch, cubrid_fetch_row, cubrid_fetch_array and cubrid_fetch_assoc, we shouldn't return false when there are no more data, but these functions will return false in this situation now.

      In order to synchronizing with the documents, when there are no more data, we return nothing, not false.

        Activity

        Hide
        kadishmal Esen Sagynov added a comment -

        Do other DB vendor drivers also return nothing?

        Show
        kadishmal Esen Sagynov added a comment - Do other DB vendor drivers also return nothing ?
        Hide
        hellohuizhang 张慧 added a comment -

        No, mysql return false. But the documents on php.net, cubrid shouldn't return false when there are no more data.

        Show
        hellohuizhang 张慧 added a comment - No, mysql return false. But the documents on php.net, cubrid shouldn't return false when there are no more data.
        Hide
        kadishmal Esen Sagynov added a comment -

        Is shouldn't return false when there are no more data correct and expected behavior? Or is the manual incorrect? Why should we change it?

        Show
        kadishmal Esen Sagynov added a comment - Is shouldn't return false when there are no more data correct and expected behavior? Or is the manual incorrect? Why should we change it?
        Hide
        hellohuizhang 张慧 added a comment -

        You mean we change the manual to be compatible with mysql and don't change the source code?

        Show
        hellohuizhang 张慧 added a comment - You mean we change the manual to be compatible with mysql and don't change the source code?
        Hide
        kadishmal Esen Sagynov added a comment -

        I don't know how critical is to change the code? Do we really need to change and stick with the manual? Or is it better to provide MySQL compatible solution and change our manual? Please talk to your leader and let me know.

        Show
        kadishmal Esen Sagynov added a comment - I don't know how critical is to change the code? Do we really need to change and stick with the manual? Or is it better to provide MySQL compatible solution and change our manual? Please talk to your leader and let me know.
        Hide
        hellohuizhang 张慧 added a comment -

        I have talked to my leader. We discussed this issue yesterday. It is not reasonable return false for mysql, in this case, we can't distinguish whether there is an error or no more data. So our manual is correct, and we should synchronize our source code.

        Show
        hellohuizhang 张慧 added a comment - I have talked to my leader. We discussed this issue yesterday. It is not reasonable return false for mysql, in this case, we can't distinguish whether there is an error or no more data. So our manual is correct, and we should synchronize our source code.
        Hide
        kadishmal Esen Sagynov added a comment -

        Ok. Please proceed.

        Show
        kadishmal Esen Sagynov added a comment - Ok. Please proceed.
        Hide
        hellohuizhang 张慧 added a comment -

        commit rev: 297

        Show
        hellohuizhang 张慧 added a comment - commit rev: 297
        Hide
        hellohuizhang 张慧 added a comment -

        We have fixed this issue on PHP-8.4.1

        Show
        hellohuizhang 张慧 added a comment - We have fixed this issue on PHP-8.4.1

          People

          • Assignee:
            hellohuizhang 张慧
            Reporter:
            hellohuizhang 张慧
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: