Skip to content

UNION or JOINS in views #37

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

Open
tomthemod opened this issue Nov 20, 2020 · 3 comments
Open

UNION or JOINS in views #37

tomthemod opened this issue Nov 20, 2020 · 3 comments

Comments

@tomthemod
Copy link

This library is very very helpfull for my projects.
But i need to create views with UNION, or LEFT JOIN.
When i create a view like "CREATE VIEW view1 AS SELECT id, data AS tbl1 UNION SELECT id, data AS tbl2;" directly from the sqlite3_console example with a database with 2 tables, i've this error :
SQL error: 1 parser stack overflow

I've the same error if i create the view in the database from my computer, succesfully test it, and try to use the database from the ESP (esp32)

Is there an option to activate, to do this ?

Thnaks.

@siara-cc
Copy link
Owner

You could try changing the stack settings in the config file of this library. But I don't this they would work seamlessly given the limited memory available to operate.

@tomthemod
Copy link
Author

tomthemod commented Nov 22, 2020

thanks for your support, you've really made a good job.
I've finally reloved my issue with increasing YYSTACKDEPTH in config_ext.h, from 20 to 50.
With this value, i can do UNION, LEFT JOINS, etc in my views, not only in a query

@MantaRayDeeJay
Copy link

I met the same issue.
I found the following link YYSTACKDEPTH — Maximum parser stack depth
It says that a value of 25 for the YYSTACKDEPTH param should be enough on common usages.
I have tested with a value of 25 and it seems being enough to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants