Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions