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

[PHP] php driver throw -20008 error when executing cubrid_column_types on column which type is BLOB/CLOB

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: PHP-Aprium
    • Fix Version/s: None
    • Component/s: PHP Driver
    • Labels:
    • Environment:

      Linux 64

      Description

      [PHP] php driver throw -20008 error when executing cubrid_column_types on column which type is BLOB/CLOB

      Test case: http://svn.cubrid.org/cubridapis/php/branches/RB-9.1.0/tests2/php/_05_field/column.phpt

      Test codes:

      $create_result=cubrid_query("create class collection_tb(sChar set(char(10)),
              sVarchar set(varchar(10)),
              sNchar set(nchar(10)),
              sNvchar set(nchar VARYING(10)),
              sBit set(bit(10)),
              sBvit set(bit VARYING(10)),
              sNumeric set(numeric),
              sInteger set(integer),
              sSmallint set(smallint),
              sMonetary set(monetary),
              sFloat set(float),
              sReal set(real),
              sDouble set(double),
              sDate set(date),
              sTime set(time),
              sTimestamp set(timestamp),
              sSet set(set),
              sMultiSet set(multiset),
              sList set(list),
              sSequence set(sequence),
              multiset_t multiset(int, CHAR(1)),
              list_t list(float, VARCHAR(1))
      )");
      if (!$create_result) {
          die('Create Failed: ' . cubrid_error());
      }
      
      $result = cubrid_execute($conn, "SELECT * FROM collection_tb;");
      
      $column_names = cubrid_column_names($result);
      $column_types = cubrid_column_types($result);
      

      Test result:

      When executing the code "$column_types = cubrid_column_types($result);", throw warning:
      
      Warning: Error: CCI, -20008, Type conversion error in /home/hudson/workspace/jobs/dailybuild_CUBRID-9.1.0/workspace/php/branches/RB-9.1.0/tes
      ts2/php/_05_field/column.php on line 109
      

        Activity

        Hide
        jinhu 李金虎 added a comment -

        Whne querying the column info of "set(set)", return "unknown" instead of error.

        Fixed in RB-9.1.0, revision: 1491

        The result after fixing:
        array(22) {
        [0]=>
        string(9) "set(char)"
        [1]=>
        string(12) "set(varchar)"
        [2]=>
        string(10) "set(nchar)"
        [3]=>
        string(13) "set(varnchar)"
        [4]=>
        string(8) "set(bit)"
        [5]=>
        string(11) "set(varbit)"
        [6]=>
        string(12) "set(numeric)"
        [7]=>
        string(12) "set(integer)"
        [8]=>
        string(13) "set(smallint)"
        [9]=>
        string(13) "set(monetary)"
        [10]=>
        string(10) "set(float)"
        [11]=>
        string(10) "set(float)"
        [12]=>
        string(11) "set(double)"
        [13]=>
        string(9) "set(date)"
        [14]=>
        string(9) "set(time)"
        [15]=>
        string(14) "set(timestamp)"
        [16]=>
        string(14) "set([unknown])"
        [17]=>
        string(14) "set([unknown])"
        [18]=>
        string(14) "set([unknown])"
        [19]=>
        string(14) "set([unknown])"
        [20]=>
        string(19) "multiset([unknown])"
        [21]=>
        string(19) "sequence([unknown])"
        }

        Show
        jinhu 李金虎 added a comment - Whne querying the column info of "set(set)", return "unknown" instead of error. Fixed in RB-9.1.0, revision: 1491 The result after fixing: array(22) { [0] => string(9) "set(char)" [1] => string(12) "set(varchar)" [2] => string(10) "set(nchar)" [3] => string(13) "set(varnchar)" [4] => string(8) "set(bit)" [5] => string(11) "set(varbit)" [6] => string(12) "set(numeric)" [7] => string(12) "set(integer)" [8] => string(13) "set(smallint)" [9] => string(13) "set(monetary)" [10] => string(10) "set(float)" [11] => string(10) "set(float)" [12] => string(11) "set(double)" [13] => string(9) "set(date)" [14] => string(9) "set(time)" [15] => string(14) "set(timestamp)" [16] => string(14) "set( [unknown] )" [17] => string(14) "set( [unknown] )" [18] => string(14) "set( [unknown] )" [19] => string(14) "set( [unknown] )" [20] => string(19) "multiset( [unknown] )" [21] => string(19) "sequence( [unknown] )" }
        Hide
        jinhu 李金虎 added a comment -

        Merge into RB-8.4.1, revision: 1493
        Merge into RB-8.4.3, revision: 1494
        Merge into RB-8.4.4, revision: 1495
        Merge into trunk, revision: 1496

        Show
        jinhu 李金虎 added a comment - Merge into RB-8.4.1, revision: 1493 Merge into RB-8.4.3, revision: 1494 Merge into RB-8.4.4, revision: 1495 Merge into trunk, revision: 1496
        Hide
        jinhu 李金虎 added a comment -

        Resolved.

        Show
        jinhu 李金虎 added a comment - Resolved.
        Hide
        cn14130 欧明宝[Bom Owen] added a comment -

        Test Build: 9.1.0.0206
        Test OS: linux 64
        php driver: 9.1.0.0001
        Test Result: pass
        RB-8.4.1, RB-8.4.3, RB-8.4.4 will be validated by daily qa test

        Show
        cn14130 欧明宝[Bom Owen] added a comment - Test Build: 9.1.0.0206 Test OS: linux 64 php driver: 9.1.0.0001 Test Result: pass RB-8.4.1, RB-8.4.3, RB-8.4.4 will be validated by daily qa test

          People

          • Assignee:
            cn14130 欧明宝[Bom Owen]
            Reporter:
            cn14130 欧明宝[Bom Owen]
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: