You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] JSQLParser 5.4-SNAPSHOT : MySQL : PROCEDURE ANALYSE() not supported in SELECT statements #2428
MySQL PROCEDURE ANALYSE() clause used in SELECT statements.
MySQL (notably in older versions such as 5.5) supports PROCEDURE ANALYSE() as a query modifier that analyzes a result set and suggests optimal column types and sizes. It is appended directly to a SELECT statement and returns metadata instead of modifying data.
Although seems to be deprecated and removed in modern MySQL versions, it is still valid syntax in legacy mysql databases and may appear in migration scenarios or older production systems.
SQL Example
CREATETABLEheavy_table (
id INT AUTO_INCREMENT PRIMARY KEY,
col1 INT,
col2 VARCHAR(50)
);
INSERT INTO heavy_table (col1, col2) VALUES
(10, 'alpha'),
(20, 'beta'),
(10, 'gamma');
SELECT col1, col2
FROM heavy_table
PROCEDURE ANALYSE(10, 256);
Parsing error
ParseException: Encountered: <S_IDENTIFIER> / "ANALYSE", at line 1, column 46, in lexical state DEFAULT.
Activity