Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11
Description
Test:
CREATE TABLE t1 (i INT); |
create view v1 as SELECT 1 FROM t1 |
UNION
|
SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1 |
FOR UPDATE; |
select * from v1; |
drop view v1; |
Expected result:
1
|
1
|
Actual result:
query 'select * from v1' failed: ER_PARSE_ERROR (1064): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'order by 1' at line 1 |
Attachments
Issue Links
- is part of
-
MDEV-27691 make working view-protocol
-
- Closed
-
- relates to
-
MDEV-23203 SELECT FOR UPDATE with UNION should not need parenthesis
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue is part of |
Description |
*Test:*
{code:sql} create view v1 as SELECT 1 FROM t1 UNION SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1 FOR UPDATE; select * from v1; drop view v1; {code} *Expected result:* {code:sql} 1 1 {code} *Actual result:* {code:sql} query 'select * from v1' failed: ER_PARSE_ERROR (1064): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'order by 1' at line 1 {code} |
*Test:*
{code:sql} CREATE TABLE t1 (i INT); create view v1 as SELECT 1 FROM t1 UNION SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1 FOR UPDATE; select * from v1; drop view v1; {code} *Expected result:* {code:sql} 1 1 {code} *Actual result:* {code:sql} query 'select * from v1' failed: ER_PARSE_ERROR (1064): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'order by 1' at line 1 {code} |
Labels | view-protocol |
Assignee | Lena Startseva [ JIRAUSER50478 ] | Oleksandr Byelkin [ sanja ] |
Priority | Major [ 3 ] | Minor [ 4 ] |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Fix Version/s | 10.7 [ 24805 ] | |
Fix Version/s | 10.8 [ 26121 ] | |
Fix Version/s | 10.9 [ 26905 ] | |
Fix Version/s | 10.10 [ 27530 ] | |
Fix Version/s | 10.11 [ 27614 ] |
Fix Version/s | 10.7 [ 24805 ] |
Fix Version/s | 10.8 [ 26121 ] |
Fix Version/s | 10.9 [ 26905 ] |
Fix Version/s | 10.10 [ 27530 ] |
Link |
This issue relates to |
Fix Version/s | 10.4 [ 22408 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Priority | Minor [ 4 ] | Major [ 3 ] |
Assignee | Oleksandr Byelkin [ sanja ] | Alexander Barkov [ bar ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Alexander Barkov [ bar ] | Nikita Malyavin [ nikitamalyavin ] |
Component/s | Views [ 10111 ] | |
Fix Version/s | 10.5.27 [ 29902 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Fix Version/s | 10.11 [ 27614 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Review [ 10002 ] | Closed [ 6 ] |
Fix Version/s | 10.6.20 [ 29903 ] | |
Fix Version/s | 10.11.10 [ 29904 ] | |
Fix Version/s | 11.2.6 [ 29906 ] | |
Fix Version/s | 11.4.4 [ 29907 ] |
Is it a good idea to allow locking reads in a view, or in joins whose execution order might not be deterministic, depending on the query plan? Note: there is also LOCK IN SHARE MODE.