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

[Ruby] The default con.auto_commit value should be true not false

    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:
      • OS: Linux 64
      • CUBRID: 8.4.4.0227
      • Ruby: 1.8.7
      • Driver: cubrid-ruby 8.4.4.0002 (20130917)

      Description

      • Brief: the default value of @con.auto_commit always return false, but actually the connection has auto_commit on
      • Test Code
            def test_autocommit
                @con = Cubrid.connect('demodb','localhost',30000,'dba','')
                #the default autocommit should be true
                puts @con.auto_commit?
                @con.query('create table tbl (a int)')
                
            end
        

      Expected Result: true, the table tbl is created successfully

      Actual Result: false, the table tbl is created successfully

        Activity

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

        test code

        {code}
        require 'rubygems'
        require 'cubrid'
        con = Cubrid.connect('demodb','127.0.0.1',33000,'dba','')
        if con
        puts "connection established"
        puts "CUBRID Database version is: #{con.server_version}"
        puts con.auto_commit?
        con.close()
        else
        puts "Connection could not be established"
        end{code}

        output

        {code}
        connection established
        CUBRID Database version is: 8.4.4.0227
        true{code}
        Show
        cn15800 谢韦华[Bert] added a comment - test code {code} require 'rubygems' require 'cubrid' con = Cubrid.connect('demodb','127.0.0.1',33000,'dba','') if con puts "connection established" puts "CUBRID Database version is: #{con.server_version}" puts con.auto_commit? con.close() else puts "Connection could not be established" end{code} output {code} connection established CUBRID Database version is: 8.4.4.0227 true{code}
        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-676]Added a case to test the default autocommit value"
        Adding         _13_issues/bug_apis_676
        Adding         _13_issues/bug_apis_676/cases
        Adding         _13_issues/bug_apis_676/cases/bug_apis_676.rb
        Transmitting file data .
        Committed revision 35449.
        

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

        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-676]Added a case to test the default autocommit value" Adding _13_issues/bug_apis_676 Adding _13_issues/bug_apis_676/cases Adding _13_issues/bug_apis_676/cases/bug_apis_676.rb Transmitting file data . Committed revision 35449. Link: http://svn.bds.nhncorp.com/xdbms/cubridqa/branches/RB-8.4.4/interface/Ruby/qa_test/ruby/_13_issues/bug_apis_676/
        Hide
        ryin005 Ray Yin added a comment - - edited
        • Test OS: Linux 64, Windows 32
        • CUBRID: 8.4.4.0227
        • Ruby: 1.8.7
        • Driver: cubrid-ruby 8.4.4.0002 (2013-10-17)

        Test Result: Pass

        Close the issue

        Show
        ryin005 Ray Yin added a comment - - edited Test OS: Linux 64, Windows 32 CUBRID: 8.4.4.0227 Ruby: 1.8.7 Driver: cubrid-ruby 8.4.4.0002 (2013-10-17) 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: