dolt
dolt copied to clipboard
support for `:=` operator in SELECT
We have queries like select @id := id from table limit 1. This is basically query some data into a variable. It is fully supported in MySQL, but for this project, when I run the query, I got ERROR 1105 (HY000): syntax error at position 13 near ':' which means the content := is not supported.
Is there any plan to support such query?
We would like to support this and it's on our roadmap, but we don't have an ETA for when it will become available.
In the meantime, you can use this syntax, which does the same thing:
set @id = (select id from table limit 1);
Is it like the two PRs I posted in vitess project which only need add some rules in sql.y or there is more work to do in this project? Could you share some instructions to me for achieving this and we can see if I can make it happen.
It's harder. It's not just syntax, it's got query planner logic too.
Support for := for variable assignment is added here. This PR does not include := operator usage in SELECT as it is deprecated in MySQL.