Skip to content

[Query] Attempt to read property "keyword" on null #609

Open
@faissaloux

Description

@faissaloux

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions