From e29f02e1bd4d424f7b0294958251aa49e88d688e Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 20 Sep 2015 14:15:27 +0900 Subject: Refactor `table_exists?` in AbstractMysqlAdapter `table_exists?` calls `tables` twice when passed `'dbname.tblname'` arg. This change is that `table_exists?` execute only once query always and extra args of `tables` is removed. --- activerecord/test/cases/adapters/mysql2/schema_test.rb | 8 -------- 1 file changed, 8 deletions(-) (limited to 'activerecord/test/cases/adapters') diff --git a/activerecord/test/cases/adapters/mysql2/schema_test.rb b/activerecord/test/cases/adapters/mysql2/schema_test.rb index 880a2123d2..faf2acb9cb 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' -- cgit v1.2.3