Skip to content
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

mysql syntax error : failed to prepare SQL statement #23

Closed
viba1 opened this issue Jul 11, 2023 · 2 comments
Closed

mysql syntax error : failed to prepare SQL statement #23

viba1 opened this issue Jul 11, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@viba1
Copy link

viba1 commented Jul 11, 2023

Hi here,

I encounter the following error using a mysql instance:

[sqlpage::webserver::database::sql]
Failed to prepare SQL statement: 'WITH RECURSIVE cnt (x, y) AS (VALUES (0, 15) UNION ALL SELECT x + 1, CASE y % 2 WHEN 0 THEN y / 2 ELSE 3 * y + 1 END FROM cnt WHERE x < 12) SELECT 'syracuse' AS series, x, y FROM cnt': error returned from database: 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 '(0, 15) UNION ALL SELECT x + 1, CASE y % 2 WHEN 0 THEN y / 2 ELSE 3 * y + 1 END ' at line 1: 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 '(0, 15) UNION ALL SELECT x + 1, CASE y % 2 WHEN 0 THEN y / 2 ELSE 3 * y + 1 END ' at line 1

sqlpage::webserver::database] Not applying database migrations because 'sqlpage/migrations' does not exist

Configuration: sqlpage docker version latest (ac8bf8902c3e) with latest mysql docker version (8.0-slim)

@lovasoa
Copy link
Collaborator

lovasoa commented Jul 11, 2023

Hi ! This looks like the default index.sql file. I'll update it for the next version to work in all databases.

But in the mean time, that should not prevent you from creating your own sites.

It should work if you create your own index.sql with contents like

SELECT 'shell' as component, 'SQLPage documentation' as title;

@lovasoa lovasoa added the bug Something isn't working label Jul 11, 2023
@lovasoa
Copy link
Collaborator

lovasoa commented Jul 11, 2023

Thanks for reporting that. I pushed the fix, it will be included in the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants