diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2015-10-11 16:44:49 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2015-10-15 13:18:21 +0900 |
commit | d39b6f77fc75790b1b2b3c5201bb037645d01483 (patch) | |
tree | 07175c2ed7f653672f7d6215a9297d68625fbc49 /activerecord/test/schema | |
parent | d9e74ace9f0d0bba39c3b836b3d79b059d516eb0 (diff) | |
download | rails-d39b6f77fc75790b1b2b3c5201bb037645d01483.tar.gz rails-d39b6f77fc75790b1b2b3c5201bb037645d01483.tar.bz2 rails-d39b6f77fc75790b1b2b3c5201bb037645d01483.zip |
Add stored procedure test in mysql2
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r-- | activerecord/test/schema/mysql2_specific_schema.rb | 11 | ||||
-rw-r--r-- | activerecord/test/schema/mysql_specific_schema.rb | 4 |
2 files changed, 13 insertions, 2 deletions
diff --git a/activerecord/test/schema/mysql2_specific_schema.rb b/activerecord/test/schema/mysql2_specific_schema.rb index 52d3290c84..5e310b0e06 100644 --- a/activerecord/test/schema/mysql2_specific_schema.rb +++ b/activerecord/test/schema/mysql2_specific_schema.rb @@ -40,6 +40,17 @@ BEGIN END SQL + ActiveRecord::Base.connection.execute <<-SQL +DROP PROCEDURE IF EXISTS topics; +SQL + + ActiveRecord::Base.connection.execute <<-SQL +CREATE PROCEDURE topics(IN num INT) SQL SECURITY INVOKER +BEGIN + select * from topics limit num; +END +SQL + ActiveRecord::Base.connection.drop_table "enum_tests", if_exists: true ActiveRecord::Base.connection.execute <<-SQL diff --git a/activerecord/test/schema/mysql_specific_schema.rb b/activerecord/test/schema/mysql_specific_schema.rb index 90f5a60d7b..66e9baecc7 100644 --- a/activerecord/test/schema/mysql_specific_schema.rb +++ b/activerecord/test/schema/mysql_specific_schema.rb @@ -45,9 +45,9 @@ DROP PROCEDURE IF EXISTS topics; SQL ActiveRecord::Base.connection.execute <<-SQL -CREATE PROCEDURE topics() SQL SECURITY INVOKER +CREATE PROCEDURE topics(IN num INT) SQL SECURITY INVOKER BEGIN - select * from topics limit 1; + select * from topics limit num; END SQL |