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

[Python]A lot of error messages will appear when sql statements is "select * from db_user"

    Details

      Description

      Test Build:CUBRID 2008 R4.2 (8.4.2.0022)
      OS: Linux 64
      Description:
      When executing "select * from db_user", a lot of error messages will appear.
      When executing "select * from db_class", result will return.

      Repro Steps:
      python testSelect.py

      Statements in testSelect.py

      #cursor.execute ("select * from db_class")
      cursor.execute ("select * from db_user")
      result_set = cursor.fetchall ()
      

      Actual result:

      Connect to db
      *** glibc detected *** python: double free or corruption (fasttop): 0x0000000002776cb0 ***
      ======= Backtrace: =========
      /lib64/libc.so.6[0x3e2c67245f]
      /lib64/libc.so.6(cfree+0x4b)[0x3e2c6728bb]
      /home/python/opt/Python265/lib/python2.6/site-packages/_cubrid.so[0x2ad510959ea0]
      python(PyEval_EvalFrameEx+0x6cf4)[0x4955c4]
      python(PyEval_EvalFrameEx+0x5fcf)[0x49489f]
      ..........................................................................
      2ad510fa7000-2ad5111a7000 ---p 00011000 08:03 245858468                  /home/python/opt/Python265/lib/python2.6/lib-dynload/datetime.so
      2ad5111a7000-2ad5111ab000 rw-p 00011000 08:03 245858468                  /home/python/opt/Python265/lib/python2.6/lib-dynload/datetime.so
      2ad5111ab000-2ad5111ac000 rw-p 2ad5111ab000 00:00 0 
      2ad5111ac000-2ad5111e1000 r--s 00000000 08:01 716884                     /var/db/nscd/hosts
      7fff28c6a000-7fff28c82000 rw-p 7ffffffe6000 00:00 0                      [stack]
      7fff28dc8000-7fff28dcc000 r-xp 7fff28dc8000 00:00 0                      [vdso]
      ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0                  [vsyscall]
      Aborted
      
      
      1. APIS-181_FIX01.creview
        30 kB
        张慧
      2. test_181.c
        3 kB
        张慧
      3. testSelect.py
        0.4 kB
        ZouJing

        Activity

        Hide
        hellohuizhang 张慧 added a comment -

        Hello Jing!

        I have tested your case on both Python driver and CCI.

        Actually the table db_user you use to test is special, we can see the schema information below:

             name                 CHARACTER VARYING(1073741823)
             id                   INTEGER
             password             db_password
             direct_groups        SET OF db_user
             groups               SET OF db_user
             authorization        db_authorization
             triggers             SEQUENCE OF object
        

        There are two SET columns and one SEQUENCE column. These types are special operated in Python driver when we need to fetch them. However, there are some problems because the CCI have not processed successfully.

        The problems happen in the test case are:

        If we don't use cci_set_free(), it will work well, otherwise, it will be aborted.

        But according to the cci_set_free()'s document, we should use this function after cci_get_data have gotten the T_CCI_SET data.

        Show
        hellohuizhang 张慧 added a comment - Hello Jing! I have tested your case on both Python driver and CCI. Actually the table db_user you use to test is special, we can see the schema information below: name CHARACTER VARYING(1073741823) id INTEGER password db_password direct_groups SET OF db_user groups SET OF db_user authorization db_authorization triggers SEQUENCE OF object There are two SET columns and one SEQUENCE column. These types are special operated in Python driver when we need to fetch them. However, there are some problems because the CCI have not processed successfully. The problems happen in the test case are: If we don't use cci_set_free(), it will work well, otherwise, it will be aborted. But according to the cci_set_free() 's document, we should use this function after cci_get_data have gotten the T_CCI_SET data.
        Hide
        zoujing ZouJing added a comment -

        Hi hui,
        if you define a T_CCI_SET variable set, this set variable just can only be released once.
        In test_181.c case T_CCI_SET variable set is be defined and released more than one time, so the error appear.

        if the T_CCI_SET variable set is defined once at the beginning of the main function, and then released on time at the end of the main function, error will not appear in this case.

        Show
        zoujing ZouJing added a comment - Hi hui, if you define a T_CCI_SET variable set, this set variable just can only be released once. In test_181.c case T_CCI_SET variable set is be defined and released more than one time, so the error appear. if the T_CCI_SET variable set is defined once at the beginning of the main function, and then released on time at the end of the main function, error will not appear in this case.
        Hide
        hellohuizhang 张慧 added a comment -

        Commit rev on Python-8.4.0: 584
        Commit rev on Python-8.4.1: 583
        Commit rev on Python-8.4.2: 582
        Commit rev on Python-8.4.3: 581
        Commit rev on Python-Apricot: 580

        Show
        hellohuizhang 张慧 added a comment - Commit rev on Python-8.4.0: 584 Commit rev on Python-8.4.1: 583 Commit rev on Python-8.4.2: 582 Commit rev on Python-8.4.3: 581 Commit rev on Python-Apricot: 580
        Hide
        zoujing ZouJing added a comment -
        Show
        zoujing ZouJing added a comment - CUBRIDSUS-8104

          People

          • Assignee:
            xiaoshan78 李成龙[이성룡]
            Reporter:
            zoujing ZouJing
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: