Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0(EOL), 10.1(EOL), 10.2(EOL)
-
None
Description
If I set sql_mode=IGNORE_SPACE, messages about syntax errors report wrong line numbers:
SET sql_mode=IGNORE_SPACE; |
DROP PROCEDURE IF EXISTS p1; |
DELIMITER $$
|
CREATE PROCEDURE p1() |
BEGIN
|
SELECT 1+1; |
syntax error;
|
END; |
$$
|
DELIMITER ;
|
ERROR 1064 (42000): You have an error in your SQL syntax ... near 'error...' at line 3
|
Notice, the line number 3 is wrong. The syntax error is actually on the line 4.
If I change to sql_mode=DEFAULT, it correctly reports 'at line 4':
SET sql_mode=DEFAULT; |
DROP PROCEDURE IF EXISTS p1; |
DELIMITER $$
|
CREATE PROCEDURE p1() |
BEGIN
|
SELECT 1+1; |
syntax error;
|
END; |
$$
|
DELIMITER ;
|
ERROR 1064 (42000): You have an error in your SQL syntax ... near 'error...' at line 4
|
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Status | Open [ 1 ] | In Progress [ 3 ] |
Affects Version/s | 10.0 [ 16000 ] | |
Affects Version/s | 10.1 [ 16100 ] |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
Fix Version/s | 10.2.4 [ 22116 ] | |
Fix Version/s | 10.2 [ 14601 ] |
Fix Version/s | 10.2.5 [ 22117 ] | |
Fix Version/s | 10.2.4 [ 22116 ] |
issue.field.resolutiondate | 2018-06-21 07:45:38.0 | 2018-06-21 07:45:38.341 |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 80163 ] | MariaDB v4 [ 151879 ] |