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

[Ruby]The stmt.execute() throws an undesired error if it is called multiple times

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Ruby 8.4.4.0002
    • Fix Version/s: Ruby 8.4.4.0002
    • Component/s: Ruby Driver
    • Labels:
    • Environment:
      • Test OS: Linux 64
      • CUBRID: 8.4.4.0227
      • Ruby: 1.8.7
      • Driver: cubrid-ruby 8.4.4.0002 (2013-10-17)

      Description

      • The stmt.execute() throws an undesired error if it is called multiple times
      • Test Code {code}
        require 'rubygems'
        require 'cubrid'

        con = Cubrid.connect('demodb','localhost',33559,'dba','')
        if con
        con.query('drop table if exists test_cubrid')
        con.query('create table test_cubrid (a int)')

        stmt = con.prepare('insert into test_cubrid values ')
        stmt.execute(100)
        stmt.execute(101)

        con.close()
        else
        puts "Connection could not be established"
        end{code}

      Output

      test_prepare.rb:11:in `execute': ERROR: CAS, -18, Invalid request handle (Cubrid::Error)
              from test_prepare.rb:11
      

        Activity

        Hide
        cn15800 谢韦华[Bert] added a comment -

        It is same with apis-683, driver will close request handl when stmt.execute comlete.

        Show
        cn15800 谢韦华[Bert] added a comment - It is same with apis-683, driver will close request handl when stmt.execute comlete.
        Hide
        cn15800 谢韦华[Bert] added a comment -

        fixed.

        Show
        cn15800 谢韦华[Bert] added a comment - fixed.
        Hide
        ryin005 Ray Yin added a comment -

        Added a test case for this issue

        RB-8.4.4

        [ruby@NC-PL-QA-012 _13_issues]$ svn ci --username cn14323 -m "[APIS-684]Added a case to test implement execute() multiple times"
        Adding         _13_issues/bug_apis_684
        Adding         _13_issues/bug_apis_684/cases
        Adding         _13_issues/bug_apis_684/cases/bug_apis_684.rb
        Transmitting file data .
        Committed revision 35523.
        

        Case Link: http://svn.bds.nhncorp.com/xdbms/cubridqa/branches/RB-8.4.4/interface/Ruby/qa_test/ruby/_13_issues/bug_apis_684/

        Show
        ryin005 Ray Yin added a comment - Added a test case for this issue RB-8.4.4 [ruby@NC-PL-QA-012 _13_issues]$ svn ci --username cn14323 -m "[APIS-684]Added a case to test implement execute() multiple times" Adding _13_issues/bug_apis_684 Adding _13_issues/bug_apis_684/cases Adding _13_issues/bug_apis_684/cases/bug_apis_684.rb Transmitting file data . Committed revision 35523. Case Link: http://svn.bds.nhncorp.com/xdbms/cubridqa/branches/RB-8.4.4/interface/Ruby/qa_test/ruby/_13_issues/bug_apis_684/
        Hide
        ryin005 Ray Yin added a comment -
        • Test OS: Linux 64, Windows 32
        • CUBRID: 8.4.4.0227
        • Ruby: 1.8.7
        • Driver: cubrid-ruby 8.4.4.0002 (2013-10-21)

        Test Result: Pass

        Close the issue

        Show
        ryin005 Ray Yin added a comment - Test OS: Linux 64, Windows 32 CUBRID: 8.4.4.0227 Ruby: 1.8.7 Driver: cubrid-ruby 8.4.4.0002 (2013-10-21) Test Result: Pass Close the issue

          People

          • Assignee:
            cn15800 谢韦华[Bert]
            Reporter:
            ryin005 Ray Yin
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: