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

[Perl]Return value is not empty when passing a not exist type to table_info

    Details

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

      Description

      Test Build:CUBRID 2008 R4.0 (8.4.0.2019) (64bit release build for linux_gnu)
      OS: Linux 64
      Description: Error doesn't appear when passing a not exist type to table_info

      Repro Steps
      perl table_info_2.pl

      Statements in table_info_2.pl:

      $dbh->do("CREATE TABLE aaa(id INT NOT NULL,phone VARCHAR(10));") or die "create error: $dbh->errstr";
      $dbh->do("INSERT INTO aaa VALUES(1,'111-1111'), (2,'222-2222'), (3, '333-3333'), (4, NULL), (5, NULL);") or die "insert error: $dbh->errstr
       ";
      $dbh->do("CREATE VIEW aaa_view1 AS SELECT * FROM aaa WHERE phone IS NOT NULL WITH CHECK OPTION;") or die "create view error: $dbh->errstr";
      $dbh->do("CREATE VIEW aaa_view2 AS SELECT * FROM aaa ORDER BY id DESC;") or die "create view error: $dbh->errstr";
      
      my $sth=$dbh->table_info('','','aaa%', 'VIEWaaaaaaaaaa')  or die $dbh->errstr ."  :table_info error\n";
      my $table_counter=1;
      my $true1=0;
      my $true2=0;
      while (my  @row=$sth->fetchrow_array()){
         my $catalog=$row[0];
         my $schema=$row[1];
         my $table=$row[2];
         my $type=$row[3];
         my $remarks=$row[4];
         printf("TableName: %d %s \t", $table_counter,$table );
         printf("TableType: %s \t", $type );
         printf("Schema: %s \t", $schema );
         printf("Catalog: %s \t", $catalog );
         printf("Remarks: %s \t", $remarks);
         print "\n\n\n";
      
         $table_counter++;
      
      }
      
      

      Actual result:
      Return value isn't empty.

      [perl@NC-PL-QA033 cases]$ perl table_info_2.pl pldb
      TableName: 1 aaa_view1  TableType: VIEW         Schema:         Catalog:        Remarks:  
      
      
      TableName: 2 aaa_view2  TableType: VIEW         Schema:         Catalog:        Remarks: 
      

      Expect result:
      Return value is empty.

      1. APIS-84_FIX01.creview
        25 kB
        张慧
      2. table_info_2.pl
        2 kB
        ZouJing

        Activity

        Hide
        hellohuizhang 张慧 added a comment -

        Commit rev: 366

        Show
        hellohuizhang 张慧 added a comment - Commit rev: 366
        Hide
        zoujing ZouJing added a comment -

        Test build : CUBRID 2008 R4.0 (8.4.0.2019)
        OS: Linux 64bit
        Test Result: PASS
        so i close it

        Show
        zoujing ZouJing added a comment - Test build : CUBRID 2008 R4.0 (8.4.0.2019) OS: Linux 64bit Test Result: PASS so i close it

          People

          • Assignee:
            zoujing ZouJing
            Reporter:
            zoujing ZouJing
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: