New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
General error: 1105 unknown error: syntax error at position 5 near 'with' #9459
Comments
The images that you are using correspond to release 12. The parsing support for Also the query is incorrect, mysql [localhost:8026] {msandbox} (test) > select concat(`id1`,., `t1`.`id2`) from `t1`;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '., `t1`.`id2`) from `t1`' at line 1 but works correctly when the mysql [localhost:8026] {msandbox} (test) > select concat(`id1`,'.', `t1`.`id2`) from `t1`;
+-------------------------------+
| concat(`id1`,'.', `t1`.`id2`) |
+-------------------------------+
| 1.2 |
| 2.3 |
+-------------------------------+
2 rows in set (0.00 sec) I checked on main and the corrected query is parsed correctly with recursive `laravel_cte` as ((select *, 1 as `depth`, cast(`id` as char(65535)) as `path` from `bonuses` where `bonuses`.`parent_id` in (413, 414)) union all (select `bonuses`.*, `depth` + 1 as `depth`, concat(`path`, '.', `bonuses`.`id`) from `bonuses` inner join `laravel_cte` on `laravel_cte`.`id` = `bonuses`.`parent_id`)) select * from `laravel_cte` |
@GuptaManan100 Thanks for the response. I will try to use the v13 images. Also, the query can't be wrong because it is being generated by (laravel) eloquent and not manually. |
I am not sure how that occurred, but the query throws a SQL error on vanilla MySQL. Could you try and let me know on which version of MySQL is it working? |
It should be MySQL8+ |
@droslean hi 👋🏼 , were you able to resolve this issue? I'm facing the same thing with laravel-adjacency-list package and PlanetscaleDB which uses vitess under the hood. |
@ahmadmmughal There is no solution. My team stopped using vitess because of this. |
Related to #4099
The text was updated successfully, but these errors were encountered: