I have a multisite setup where I've organised each site into a separate database with a shared database for all shared tables. Using a $db_prefix of for instance 'common.' for these tables seems to work for almost everything except this one call which generates the wrong SQL.

SHOW TABLES LIKE 'common.test'

Attached is a patch which should cover this case for mysql and mysqli atleast. I'm not sure about and unable to test the pgsql case.

Comments

mscharley’s picture

StatusFileSize
new1.41 KB

Take 2 on the diff, this one should apply.

mscharley’s picture

StatusFileSize
new1.28 KB

Take 3...

mscharley’s picture

StatusFileSize
new1.19 KB

Last attempt at the patch, then someone will have to tell me why it won't apply if it still won't.

Status: Needs review » Needs work

The last submitted patch, db_prefix.patch, failed testing.

Juan C’s picture

Subscribe. I have a multisite setup with WSOD upon upgrading from 6.19 to 6.20.
I have to reuse old 'includes' folder to make it works.

mscharley’s picture

StatusFileSize
new1.17 KB

Another attempt at a working patch. This one works locally, so I'm stumped if it doesn't work.

To #5, Juan, this shouldn't cause WSOD's, just weird behavior in a few modules.

mscharley’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, db_prefix.patch, failed testing.

mscharley’s picture

Can someone please look at the patch and tell me why it's not working? It applies locally, and I'm new to the Drupal patch system.

mscharley’s picture

Status: Needs work » Needs review
StatusFileSize
new1.43 KB

Attempting to use a patch generated by git rather than mercurial as a last ditch effort.

Status: Needs review » Needs work

The last submitted patch, db_prefix_git.patch, failed testing.

mscharley’s picture

Status: Needs work » Needs review

This is up to the review stage, I just can't figure out how to get my patch in a state that the Drupal bot can patch against 6.20. It works locally though against a fresh copy of the tarball.

mscharley’s picture

This is up to the review stage, I just can't get my patch to a state where the Drupal bot will apply it. It works locally though against a fresh copy of the tarball for 6.20.

mscharley’s picture

Status: Needs review » Closed (duplicate)

Duplicate of #286986: MySQL: SHOW TABLES LIKE database.tablename doesn't work.

Like my patch better, but lets not pollute things more than they need to be.