Page MenuHomePhabricator

Clean up quoted component handling in code using isQuotedIdentifier() and qualifiedTableComponents()
Open, Needs TriagePublic

Description

The isQuotedIdentifier() check is too incomplete to handle things like a.b.c or a.b.c, or a.b.c.d, and such. Ideally, we'd avoiding passing table names with dots to wrapper methods, by:
a) If possible, switching the DB domain if we want to do something to another table
b) Avoid db/table/prefixes with "." in them. That way, if we need to do JOIN tables on different domains, then explode(...,'.',3) works.

The documentation for DBname, DBmwschema, DBprefix mention being alphanumeric and without spaces nor hyphens. That sounds a bit redundant and doesn't emphasis certain things it should, so I'll clarify those.

In any case, if we are going to supported already quoted components of a table reference in tableName(), it should actually work.

Event Timeline

Change 979442 had a related patch set uploaded (by Aaron Schulz; author: Aaron Schulz):

[mediawiki/core@master] rdbms: clean up tableName() handling of pre-quoted names

https://gerrit.wikimedia.org/r/979442

Change 979442 merged by jenkins-bot:

[mediawiki/core@master] rdbms: clean up tableName() handling of pre-quoted names

https://gerrit.wikimedia.org/r/979442