- πΊπΈUnited States mile23 Seattle, WA
Even though it's fair to say these should be two separate issues, these are both bugs, because hyphen is legal in table names and should not be a special case.
In fact, the reason I'm commenting here is because our project (DKAN) can create and delete a table with a hyphen in the name, but it can't be used in a DBAL query. See here: https://github.com/GetDKAN/dkan/blob/2.x/modules/common/src/Storage/Abst...
We see errors like this, against a table name with a hyphen:
drush dkan:harvest:run hospital-summary In ExceptionHandler.php line 46: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.harvest_hospi talsummary_runs' doesn't exist: SELECT "t"."id" AS "id" FROM "harvest_hospitalsummary_runs" "t"; Array ( ) In StatementWrapperIterator.php line 110: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.harvest_hospi talsummary_runs' doesn't exist drush dkan:harvest:run hospital-summary In ExceptionHandler.php line 46: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.harvest_hospi talsummary_runs' doesn't exist: SELECT "t"."id" AS "id" FROM "harvest_hospitalsummary_runs" "t"; Array ( )
But querying the DB we see this:
mysql> show tables like 'harvest%'; +---------------------------------+ |Tables_in_db (harvest%) | +---------------------------------+ |harvest_hospital-summary_hashes| |harvest_hospital-summary_runs | |harvest_plans | +---------------------------------+ 3 rows in set (0.01 sec)
This means that Drupal's DBAL created the table, but the table name is somehow modified during the query.
This is using Drupal 10.0.11.
- last update
about 1 year ago Patch Failed to Apply