diff options
author | Matt Jones <al2o3cr@gmail.com> | 2015-02-08 18:36:11 -0500 |
---|---|---|
committer | Matt Jones <al2o3cr@gmail.com> | 2015-02-08 19:06:52 -0500 |
commit | 1a836b21b93acd6851bcb4f83c8b2678282d9122 (patch) | |
tree | d8c5a57a97b9e53b22d67dafebe3690ce2017541 /activerecord/test/cases/adapters/mysql2 | |
parent | 6f8d9bd6da6349d3d179f2e72db5bc7044a8e5c1 (diff) | |
download | rails-1a836b21b93acd6851bcb4f83c8b2678282d9122.tar.gz rails-1a836b21b93acd6851bcb4f83c8b2678282d9122.tar.bz2 rails-1a836b21b93acd6851bcb4f83c8b2678282d9122.zip |
Match table names exactly on MySQL
The `SHOW TABLES LIKE` command accepts metacharacters `%` and `_` in
potentially unexpected ways. This can be avoided by querying `information_schema.tables`
directly.
Fixes #17897
Diffstat (limited to 'activerecord/test/cases/adapters/mysql2')
-rw-r--r-- | activerecord/test/cases/adapters/mysql2/schema_test.rb | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/activerecord/test/cases/adapters/mysql2/schema_test.rb b/activerecord/test/cases/adapters/mysql2/schema_test.rb index 47707b7d4f..cbabe1592f 100644 --- a/activerecord/test/cases/adapters/mysql2/schema_test.rb +++ b/activerecord/test/cases/adapters/mysql2/schema_test.rb @@ -36,14 +36,6 @@ module ActiveRecord assert(!@connection.table_exists?("#{@db_name}.zomg"), "table should not exist") end - def test_tables_quoting - @connection.tables(nil, "foo-bar", nil) - flunk - rescue => e - # assertion for *quoted* database properly - assert_match(/database 'foo-bar'/, e.inspect) - end - def test_dump_indexes index_a_name = 'index_key_tests_on_snack' index_b_name = 'index_key_tests_on_pizza' |