PhpStorm 2023.3 Help

Code Inspections in MySQL

This topic lists all PhpStorm code inspections available in MySQL.

You can toggle specific inspections or change their severity level on the Editor | Inspections page of the IDE settingsĀ  Ctrl+Alt+S.

Inspection

Description

Default Severity

LOAD statement path

Reports paths that start with the tilde character in LOAD statements.

Example (MySQL):

CREATE TABLE table_name (id int); LOAD DATA LOCAL INFILE '~/Documents/some_file.txt' INTO TABLE table_name FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' IGNORE 1 LINES;

Instead of the tilde character, use a full path to the file.

Warning Warning

Unsupported syntax in pre-8.0 versions

Reports invalid usages of UNION in queries.

The inspection works in MySQL versions that are earlier than 8.0.

Example (MySQL):

SELECT * FROM (SELECT 1 UNION (SELECT 1 UNION SELECT 2)) a;

Warning Warning

Whitespace between the function name and the open parenthesis

Reports any whitespace in a function call between the function name and the open parenthesis, which is not supported by default.

Example (MySQL):

SELECT MAX (qty) FROM orders;

Error Error

Last modified: 25 March 2024