Open
@faissaloux

Description

This error appears when I want to access a table that has a column with a backtick on its name ( `col_one in my case ).

Note

The table must contain at least two records.

Internal error in .\vendor\phpmyadmin\sql-parser\src\Utils\Query.php#413
ErrorException: Attempt to read property "keyword" on null

Backtrace

$clauseType = $lexer->list->getNextOfType(TokenType::Keyword)->keyword;

Reproduce

  1. Run
CREATE TABLE `table` (
  `id` int NOT NULL PRIMARY KEY AUTO_INCREMENT,
  ```col_one` int NOT NULL
);

INSERT INTO `table` (```col_one`) VALUES(1), (2);
  1. Try to access the table.