[MDEV-26878] Query failing with syntax error sets ROW_NUMBER to non-zero Created: 2021-10-21  Updated: 2022-01-26  Resolved: 2022-01-26

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 10.7
Fix Version/s: 10.7.2

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Rucha Deodhar
Resolution: Not a Bug Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-10075 Provide index of error causing error ... Closed

 Description   

--error ER_PARSE_ERROR
insert into t values XXX (1),(2);
get diagnostics condition 1 @n = row_number;
select @n;

bb-10.7-row_number d555ae38

select @n;
+------+
| @n   |
+------+
|    1 |
+------+
1 row in set (0.000 sec)

It appears in some cases it can even be greater than 1, although I don't have a test case for this.



 Comments   
Comment by Rucha Deodhar [ 2022-01-05 ]

Patch: https://github.com/MariaDB/server/commit/7a746072a5ede3e5693809dbb98867cef4231693

Comment by Rucha Deodhar [ 2022-01-26 ]

After discussing with serg came to conclusion that it is not a bug because rows stars after VALUES. So ROW_NUMBER =1 is ok here

Generated at Thu Feb 08 09:48:38 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.