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

[PHP] The cubrid_get_class_name() function throws a warning if select data from a system table

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: PHP 9.1.0.0003
    • Fix Version/s: PHP 9.1.0 0004
    • Component/s: PHP Driver
    • Labels:
    • Environment:
      • OS: Linux 64bit
      • CUBRID Server: CUBRID 9.1 (9.1.0.0212) (64bit release build for linux_gnu) (Mar 14 2013 00:16:33)
      • PHP Version: PHP 5.5.0, PHP 5.4.15
      • CUBRID-PHP: PHP 9.1.0.0003

      Description

      • Brief: the cubrid_get_class_name() function can not get the class name if select data from a system table
      • Test Code {code}
        <?php
        $conn = cubrid_connect("localhost", 33367, "demodb", "dba");

        $req = cubrid_execute($conn, "SELECT * FROM db_class", CUBRID_INCLUDE_OID);
        $oid = cubrid_current_oid($req);
        $class_name = cubrid_get_class_name($conn, $oid);

        print_r($class_name);

        ?>{code}
      • Result
        • Expected Output: db_class
        • Actual Output: Warning: Error: DBMS, -48, Accessing deleted object 0|0|0.

        Activity

        Hide
        ryin005 Ray Yin added a comment - - edited

        The issue may be caused by that system tables are read-only. If so, we may need to add some explanation to the manual (cubrid_current_oid or cubrid_get_class_name manual) in order to let user know those functions will not work when selecting data from the system tables.

        PS: cubrid_current_oid returns "@0|0|0" in the above case

        Show
        ryin005 Ray Yin added a comment - - edited The issue may be caused by that system tables are read-only. If so, we may need to add some explanation to the manual (cubrid_current_oid or cubrid_get_class_name manual) in order to let user know those functions will not work when selecting data from the system tables. PS: cubrid_current_oid returns "@0|0|0" in the above case
        Hide
        cn15800 谢韦华[Bert] added a comment -
        Show
        cn15800 谢韦华[Bert] added a comment - We will modify manual: http://www.php.net/manual/zh/function.cubrid-get-class-name.php
        Hide
        cn15800 谢韦华[Bert] added a comment -

        New:

        The <function>cubrid_get_class_name</function> function is used to get the
        class name from <parameter>oid</parameter>. It is not work when selecting data from the system tables,
        for example db_class.

        Show
        cn15800 谢韦华[Bert] added a comment - New: The <function>cubrid_get_class_name</function> function is used to get the class name from <parameter>oid</parameter>. It is not work when selecting data from the system tables, for example db_class.
        Hide
        ryin005 Ray Yin added a comment -

        New:
        The <function>cubrid_get_class_name</function> function is used to get the
        class name from <parameter>oid</parameter>. It doesn't work when selecting data from the system tables,
        for example db_class.

        We could close this issue after modified the manual.

        Show
        ryin005 Ray Yin added a comment - New: The <function>cubrid_get_class_name</function> function is used to get the class name from <parameter>oid</parameter>. It doesn't work when selecting data from the system tables, for example db_class. We could close this issue after modified the manual.
        Hide
        cn15800 谢韦华[Bert] added a comment -

        fixed

        Show
        cn15800 谢韦华[Bert] added a comment - fixed
        Hide
        ryin005 Ray Yin added a comment -

        The document has been updated.

        Close the issue

        Show
        ryin005 Ray Yin added a comment - The document has been updated. Close the issue

          People

          • Assignee:
            cn15800 谢韦华[Bert]
            Reporter:
            ryin005 Ray Yin
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: