Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stored procedure test in mysql2 #21932

Merged
merged 2 commits into from
Oct 20, 2015

Conversation

kamipo
Copy link
Member

@kamipo kamipo commented Oct 11, 2015

No description provided.

@rails-bot
Copy link

r? @sgrif

(@rails-bot has picked a reviewer for you, use r? to override)

#
# In MySQL 5.6, CLIENT_MULTI_RESULTS is enabled by default.
# http://dev.mysql.com/doc/refman/5.6/en/call.html
if current_adapter?(:MysqlAdapter) &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to check the current adapter here.

@sgrif
Copy link
Contributor

sgrif commented Oct 14, 2015

Can you add a test for a procedure that returns more than one row?

@kamipo kamipo force-pushed the add_stored_procedure_test_in_mysql2 branch from 928f737 to 0ce9cfa Compare October 14, 2015 22:19
@kamipo
Copy link
Member Author

kamipo commented Oct 14, 2015

Thank you for your review. I added a test for a procedure that returns more than one row!

DROP PROCEDURE IF EXISTS topics;
SQL

ActiveRecord::Base.connection.execute <<-SQL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could these be merged into a single command?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to enable CLIENT_MULTI_STATEMENTS for multiple statements into a single command.
https://dev.mysql.com/doc/refman/5.6/en/c-api-multiple-queries.html

Should we enable the option for these queries?

@sgrif
Copy link
Contributor

sgrif commented Oct 14, 2015

A few more nitpicks. You can squash after they're addressed.

@kamipo kamipo force-pushed the add_stored_procedure_test_in_mysql2 branch from 0ce9cfa to 049cd1a Compare October 15, 2015 03:46
@kamipo kamipo force-pushed the add_stored_procedure_test_in_mysql2 branch from 049cd1a to d39b6f7 Compare October 15, 2015 04:18
sgrif added a commit that referenced this pull request Oct 20, 2015
…sql2

Add stored procedure test in mysql2
@sgrif sgrif merged commit 72fba7d into rails:master Oct 20, 2015
@kamipo kamipo deleted the add_stored_procedure_test_in_mysql2 branch October 20, 2015 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants