diff --git a/django/db/backends/mysql/introspection.py b/django/db/backends/mysql/introspection.py
index 041fbee..ac93d68 100644
|
a
|
b
|
class DatabaseIntrospection(BaseDatabaseIntrospection):
|
| 32 | 32 | |
| 33 | 33 | def get_table_list(self, cursor): |
| 34 | 34 | "Returns a list of table names in the current database." |
| 35 | | cursor.execute("SHOW TABLES") |
| | 35 | cursor.execute("SHOW FULL TABLES WHERE TABLE_TYPE = 'BASE TABLE'") |
| 36 | 36 | return [row[0] for row in cursor.fetchall()] |
| 37 | 37 | |
| 38 | 38 | def get_table_description(self, cursor, table_name): |
diff --git a/tests/regressiontests/backends/tests.py b/tests/regressiontests/backends/tests.py
index dc92189..a695430 100644
|
a
|
b
|
class MySQLTests(TestCase):
|
| 110 | 110 | connection.mysql_version |
| 111 | 111 | self.assertTrue(connection.connection is None) |
| 112 | 112 | |
| | 113 | @unittest.skipUnless(connection.vendor == 'mysql', |
| | 114 | "Test valid only for MySQL") |
| | 115 | def test_inspect_tables_view(self): |
| | 116 | """ |
| | 117 | Check if a view is not returned as a table |
| | 118 | Refs #18782 |
| | 119 | """ |
| | 120 | cursor = connection.cursor() |
| | 121 | cursor.execute('create view my_view as select 1 f') |
| | 122 | tables = connection.introspection.get_table_list(cursor) |
| | 123 | self.assertFalse('my_view' in tables) |
| | 124 | cursor.close() |
| | 125 | |
| 113 | 126 | class DateQuotingTest(TestCase): |
| 114 | 127 | |
| 115 | 128 | def test_django_date_trunc(self): |