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

cubrid_fetch_field() return default value as empty string instead of NULL

    Details

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

      Description

      Assume there is a table which has "id INTEGER AUTO_INCREMENT NOT NULL". It has no DEFAULT value, which means it should be NULL, however, "" (empty string) is returned. Moreover, integer cannot have an empty string default value. Is it CUBRID specification or can you change this value?

        Activity

        Hide
        xiaoshan78 李成龙[이성룡] added a comment -

        In the case "id INTEGER AUTO_INCREMENT NOT NULL", the value cannot be null.
        The values should be starts from 1 and 2, 3, 4, ... so on.

        Can you give me more detail information or test cases that returns null values or empty string on Integer column?

        Show
        xiaoshan78 李成龙[이성룡] added a comment - In the case "id INTEGER AUTO_INCREMENT NOT NULL", the value cannot be null. The values should be starts from 1 and 2, 3, 4, ... so on. Can you give me more detail information or test cases that returns null values or empty string on Integer column?
        Hide
        kadishmal Esen Sagynov added a comment -

        Just create any integer column which can be NULL, then run cubrid_fetch_field() on it. It will return empty string instead of NULL.

        Show
        kadishmal Esen Sagynov added a comment - Just create any integer column which can be NULL , then run cubrid_fetch_field() on it. It will return empty string instead of NULL.
        Hide
        hellohuizhang 张慧 added a comment -

        Commit rev: 462

        Show
        hellohuizhang 张慧 added a comment - Commit rev: 462
        Hide
        hellohuizhang 张慧 added a comment -

        We have resolved this issue on PHP-8.4.1 and PHP-Apricot.

        If you have any problem, please let me know.

        Thank you!

        Show
        hellohuizhang 张慧 added a comment - We have resolved this issue on PHP-8.4.1 and PHP-Apricot. If you have any problem, please let me know. Thank you!

          People

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

            Dates

            • Created:
              Updated:
              Resolved: