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

[Per 8.4.4] Fetchall the value of meonetay type is not expected using moethod fetchall_arrayref

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Perl Driver
    • Labels:
    • Environment:

      Linux

      Description

      [Per 8.4.4] Fetchall the value of meonetay type failed from table using fetchall_arrayref

      cuibrid 8.4.4 
      cubrid perl driver 8.4.4
      
      $dbh -> do("CREATE TABLE test_cn ( sh1 short, i1 int, b1 bigint, n1 numeric, f1 float, d1 double, m1 monetary);") or die "create error: $dbh-
      >errstr";
      $dbh->do("insert into test_cn values (193, 193,193,193,193,193,193);");
      
      
      
      my @m1=(193);
      my $i=0;
      foreach my $row(@$arry){
       is($row->{'m1'},$m1[$i],"fetchall_arrayref ok");
       print $m1[$i];
      }
      
      The value inserted is 193, but the select value is not 193
      

      The detailed code is attached

      1. i18n_02.pl
        1 kB
        欧明宝[Bom Owen]
      2. test_bind_monetary.c
        3 kB
        李金虎

        Activity

        Hide
        cn14130 欧明宝[Bom Owen] added a comment -

        This issue also exists in 9.1.0

        Test case: http://svn.cubrid.org/cubridapis/perl/branches/RB-9.1.0/t2/Perl/_47_I18n/cases/i18n_02.pl

        Test Environment:

        cubrid_rel:  9.1.0.0201
        perl driver: http://svn.cubrid.org/cubridapis/perl/branches/RB-9.1.0 1499
        perl:  5.14.2
        
        Show
        cn14130 欧明宝[Bom Owen] added a comment - This issue also exists in 9.1.0 Test case: http://svn.cubrid.org/cubridapis/perl/branches/RB-9.1.0/t2/Perl/_47_I18n/cases/i18n_02.pl Test Environment: cubrid_rel: 9.1.0.0201 perl driver: http://svn.cubrid.org/cubridapis/perl/branches/RB-9.1.0 1499 perl: 5.14.2
        Hide
        jinhu 李金虎 added a comment -

        To QA:
        In the hash, there is no key 'm1'. Please update the test case.
        I advice to use this select SQL "SELECT * FROM test_cubrid;", and the keys in the hash are the column names. So it's clearer.

        Another question:
        (1) My test case for CCI: test_monetary_select.c
        (2) My steps:
        Create table:
        CREATE TABLE test_cubrid ( sh1 short, i1 int, b1 bigint, n1 numeric, f1 float, d1 double, m1 monetary)
        Insert data:
        insert into test_cubrid values (193, 193, 193, 193, 193, 193, 19300.12)
        Then select data:
        SELECT * FROM test_cubrid
        (3) Test result:
        The result is as below by my test case for CCI:

        193     193     193     193     193.000000      193.0000000000000000    19300.1199999999989814
        

        The value in column 'm1' is 19300.1199999999989814

        This result is not the same as the below output in CSQL:

             sh1           i1                    b1  n1                               f1                        d1                    m1
        ================================================================================================================================
             193          193                   193  193                    1.930000e+02     1.930000000000000e+02            $19,300.12
        

        The document about MONETARY is here: http://www.cubrid.org/manual/90/en/MONETARY

        I guess it's a issue of CCI. Please register it.

        Show
        jinhu 李金虎 added a comment - To QA: In the hash, there is no key 'm1'. Please update the test case. I advice to use this select SQL "SELECT * FROM test_cubrid;", and the keys in the hash are the column names. So it's clearer. Another question: (1) My test case for CCI: test_monetary_select.c (2) My steps: Create table: CREATE TABLE test_cubrid ( sh1 short, i1 int, b1 bigint, n1 numeric, f1 float, d1 double, m1 monetary) Insert data: insert into test_cubrid values (193, 193, 193, 193, 193, 193, 19300.12) Then select data: SELECT * FROM test_cubrid (3) Test result: The result is as below by my test case for CCI: 193 193 193 193 193.000000 193.0000000000000000 19300.1199999999989814 The value in column 'm1' is 19300.1199999999989814 This result is not the same as the below output in CSQL: sh1 i1 b1 n1 f1 d1 m1 ================================================================================================================================ 193 193 193 193 1.930000e+02 1.930000000000000e+02 $19,300.12 The document about MONETARY is here: http://www.cubrid.org/manual/90/en/MONETARY I guess it's a issue of CCI. Please register it.
        Hide
        cn15800 谢韦华[Bert] added a comment -

        The issue have not fixed in 9.2.0

        Show
        cn15800 谢韦华[Bert] added a comment - The issue have not fixed in 9.2.0

          People

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

            Dates

            • Created:
              Updated: