Download & Extend

DatabaseSchema_sqlite::findTables() shouldn't find indexes

Project:Drupal core
Version:8.x-dev
Component:sqlite database
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)
Issue tags:needs backport to D7

Issue Summary

After #851168: db_find_tables() expects tables to be prefixed, inconsistent implementation and documentation, DatabaseSchema_sqlite::findTables() needs to be modified to support schemas (ie. the schema.table form for a table expression).

This is a requirement for #850852: Fix transaction failure and allow concurrent testing on SQLite.

Comments

#1

Status:active» needs review
AttachmentSizeStatusTest resultOperations
897650-sqlite-find-table-schema.patch874 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 897650-sqlite-find-table-schema.patch.View details

#2

Status:needs review» needs work

The last submitted patch, 897650-sqlite-find-table-schema.patch, failed testing.

#3

Title:DatabaseSchema_sqlite::findTables() doesn't support schemas» DatabaseSchema_sqlite::findTables() shouldn't find indexes
Status:needs work» needs review

It appears that the meat of this issue, that of supporting a schema prefix, has been fixed elsewhere. However, another part of the patch, that of limiting the query to only finding tables, still needs to be put into place, because otherwise, it may return indexes:

sqlite> SELECT name, type FROM sqlite_master limit 10;
variable|table
sqlite_autoindex_variable_1|index
actions|table
sqlite_autoindex_actions_1|index
batch|table
batch_token|index
blocked_ips|table
sqlite_sequence|table
blocked_ips_blocked_ip|index
cache|table

Reroll which addresses this, as well as clarifies a comment.

AttachmentSizeStatusTest resultOperations
897650-limit-findtables-query.patch1.02 KBIdlePASSED: [[SimpleTest]]: [MySQL] 31,849 pass(es).View details

#4

D'oh. Another reroll to address confusion in my updated comment.

AttachmentSizeStatusTest resultOperations
897650-limit-findtables-query-typo.patch1.02 KBIdlePASSED: [[SimpleTest]]: [MySQL] 31,898 pass(es).View details

#5

Version:7.x-dev» 8.x-dev
Status:needs review» reviewed & tested by the community

Yep. Sorry about the breakage.

Please commit to D7 and D8.

#6

Status:reviewed & tested by the community» fixed

Committed to 7.x and 8.x.

#7

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here