Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug Fix -- clean up connection after stored procedure [#3151 state:re…
…solved]
- Loading branch information
1 parent
137e4e7
commit 7ce1539
Showing
4 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
require "cases/helper" | ||
require 'models/topic' | ||
|
||
class StoredProcedureTest < ActiveRecord::TestCase | ||
fixtures :topics | ||
|
||
# Test that MySQL allows multiple results for stored procedures | ||
if Mysql.const_defined?(:CLIENT_MULTI_RESULTS) | ||
def test_multi_results_from_find_by_sql | ||
topics = Topic.find_by_sql 'CALL topics();' | ||
assert_equal 1, topics.size | ||
assert ActiveRecord::Base.connection.active?, "Bad connection use by 'MysqlAdapter.select'" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters