$result = db_query("SELECT COUNT(*) as rows FROM {redirect_404}")->fetchField();

This statement causes an SQL error on some platforms (tested on MariaDB 10.2.7 with InnoDB 5.7.10). Per https://www.drupal.org/docs/develop/coding-standards/list-of-sql-reserve..., "rows" should not be used as an identifier.

Comments

cburschka created an issue. See original summary.

cburschka’s picture

Status: Active » Needs review
StatusFileSize
new2.31 KB

(Opportunistically removing an unused import from the class as well; feel free to split out or skip.)

  • Berdir committed e576bd2 on 8.x-1.x authored by cburschka
    Issue #2900985 by cburschka: ROWS is a reserved SQL keyword in...
berdir’s picture

Status: Needs review » Fixed

Thanks.

Status: Fixed » Closed (fixed)

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