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

[Perl] After importing a NULL BLOB file, the exporting operation cause segment fault.

    Details

      Description

      When exporting a NULL BLOB column, segment fault occurs(Line 20).

      The test case is as below:

      {code}
      my $table = "test_cubrid";
      my $create = <<EOT;
      CREATE TABLE $table (
      id INT(3) NOT NULL DEFAULT 0,
      picture BLOB )
      EOT

      ok ($dbh->do($create));

      # Insert a row into the test table.......
      my ($sth, $query);
      $query = "INSERT INTO $table VALUES(1, NULL)";
      $sth = $dbh->prepare($query);
      $sth->execute;
      $sth->finish;

      $sth = $dbh->prepare("SELECT * FROM $table WHERE id = 1");
      $sth->execute;
      $sth->cubrid_lob_get(2);
      $sth->cubrid_lob_export(1, "out"); ----->>> Here: segment fault

      $sth->cubrid_lob_close;
      $sth->finish;{code}
      1. APIS-442_FIX01.creview
        17 kB
        李金虎
      2. APIS-442_FIX02.creview
        19 kB
        李金虎

        Activity

        Hide
        jinhu 李金虎 added a comment -

        Resolution:
        Initialize the buffer to 0 before invoking cci_get_data().

        In trunk. Revision: 1386
        Merge into RB-8.4.1. Revision: 1387
        Merge into RB-8.4.3. Revision: 1388
        Merge into RB-8.4.4. Revision: 1389

        Show
        jinhu 李金虎 added a comment - Resolution: Initialize the buffer to 0 before invoking cci_get_data(). In trunk. Revision: 1386 Merge into RB-8.4.1. Revision: 1387 Merge into RB-8.4.3. Revision: 1388 Merge into RB-8.4.4. Revision: 1389
        Hide
        jinhu 李金虎 added a comment -

        Resolved

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

        Test Build: 9.1.0.0204
        Test OS: Linux 64
        perl driver: 9.1.0.001
        Test Result: pass

        when executing cubrid_lob_export, throw error message:
        CCI Error : Invalid lob handle

        Show
        cn14130 欧明宝[Bom Owen] added a comment - Test Build: 9.1.0.0204 Test OS: Linux 64 perl driver: 9.1.0.001 Test Result: pass when executing cubrid_lob_export, throw error message: CCI Error : Invalid lob handle
        Hide
        jinhu 李金虎 added a comment -

        When exporting a NULL LOB, the errstr is changed to below:

        ERROR: CLIENT, -30008, Exporting NULL LOB is invalid
        

        Fixed in RB-9.1.0, revision: 1574
        Merge into trunk, revision: 1575

        Because there are many difference of LOB exorting part between 9.1.0 to 8.4.. So, not merge into 8.4..

        Show
        jinhu 李金虎 added a comment - When exporting a NULL LOB, the errstr is changed to below: ERROR: CLIENT, -30008, Exporting NULL LOB is invalid Fixed in RB-9.1.0, revision: 1574 Merge into trunk, revision: 1575 Because there are many difference of LOB exorting part between 9.1.0 to 8.4. . So, not merge into 8.4. .
        Hide
        cn14130 欧明宝[Bom Owen] added a comment - - edited

        Add test case: http://svn.cubrid.org/cubridapis/python/branches/RB-9.1.0/tests2/python/_07_execute/execute_bind_None.py
        Test Build: 9.1.0.0206
        Test OS: linux x64
        python driver: 9.1.0.0001 Revision: 1627
        Test Result: pass

        Show
        cn14130 欧明宝[Bom Owen] added a comment - - edited Add test case: http://svn.cubrid.org/cubridapis/python/branches/RB-9.1.0/tests2/python/_07_execute/execute_bind_None.py Test Build: 9.1.0.0206 Test OS: linux x64 python driver: 9.1.0.0001 Revision: 1627 Test Result: pass

          People

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

            Dates

            • Created:
              Updated:
              Resolved: