Misleaing info for select for share, select for update, and select tbname from tbname
*Issue migrated from trac ticket # 49 www.kunlunbase.com *
component: computing nodes | priority: major
2021-04-22 15:06:22: [email protected] created the issue
we do not support the following cases: select ... for share select ... for update select table_name from table_name
But the information is misleading, we need to change the info, to say 'unsupported' directly.
tdb1=# create table ts1(id int, info text); CREATE TABLE tdb1=# select * from ts1 for share; ERROR: MySQL storage node (1, 1) returned error: 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the rig from tdb1_$$pub' at line 1. tdb1=# select * from ts1 for update; ERROR: MySQL storage node (1, 1) returned error: 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the rig from tdb1$$pub' at line 1. tdb1=# select ts1 from ts1; ERROR: MySQL storage node (1, 1) returned error: 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the rig from tdb1$$_public.ts1' at line 1.
2021-04-26 14:57:42: [email protected] commented
Likewise, the following is used to call another function using the table as a type:
CREATE TABLE INT8_TBL(q1 int8, q2 int8);
create function extractq2(t int8_tbl) returns int8 as $$ select t.q2 $$ language sql immutable;
create function extractq2_2(t int8_tbl) returns table(ret1 int8) as $$ select extractq2(t) offset 0 $$ language sql immutable;
select x from int8_tbl, extractq2_2(int8_tbl) f(x);
2021-05-31 18:21:17: [email protected] commented
the case in comment:1 is working now, as well as the 'select ts1 from ts1;' query.
we don't support locking clauses of SELECT stmts currently, it's tracked as a feature to do in future in this ticket.
2021-05-31 18:21:17: [email protected]
2021-05-31 18:21:17: [email protected] changed owner from kunlun to david
2021-05-31 18:21:17: [email protected] changed status from assigned to accepted
2021-05-31 18:21:17: [email protected] changed type from defect to feature
2022-04-18 18:31:47: [email protected]
2022-07-04 10:12:11: [email protected]
2022-07-04 10:12:11: [email protected] changed owner from david to smith
2022-07-04 10:12:11: [email protected] changed status from accepted to assigned
2022-07-04 10:12:11: [email protected] changed type from feature to enhancement