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

運行報錯,you have an error in your SQL syntax #846

Closed
jerryc127 opened this issue Apr 29, 2024 · 3 comments
Closed

運行報錯,you have an error in your SQL syntax #846

jerryc127 opened this issue Apr 29, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@jerryc127
Copy link

一直都是通過 watchtower 升級 artalk
今天發現 artalk 無法加載
查看發現 artalk 一運行就停止
運行 docker compose logs 出現

WARN[0000] /root/docker-compose/artalk/docker-compose.yml: `version` is obsolete 
artalk  | 2024/04/29 13:09:13.983 WARN [config/base.go:133] config `http.proxy_header` is not set, not it is: "X-Forwarded-For". If you are not using a reverse proxy or CDN, please set it to blank for preventing IP spoofing.
artalk  | 2024/04/29 13:09:13.990 INFO [dao/migrate.go:57] [DB Migrator] Generating Root IDs...
artalk  | 2024/04/29 13:09:14.229 WARN [mysql@v1.5.6/migrator.go:123] [DB] Time-consuming SQL {"elapsed": 0.239316582, "rows": 0, "sql": "ALTER TABLE `comments` ADD `root_id` bigint unsigned"}
artalk  | 2024/04/29 13:09:14.230 ERROR [dao/base.go:27] [DB] {"error": "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 'RECURSIVE CommentHierarchy AS (\n\t\tSELECT id, id AS root_id, rid\n\t\tFROM comments\n' at line 1", "elapsed": 0.000371561, "rows": -1, "sql": "WITH RECURSIVE CommentHierarchy AS (\n\t\tSELECT id, id AS root_id, rid\n\t\tFROM comments\n\t\tWHERE rid = 0\n\n\t\tUNION ALL\n\n\t\tSELECT c.id, ch.root_id, c.rid\n\t\tFROM comments c\n\t\tINNER JOIN CommentHierarchy ch ON c.rid = ch.id\n\t)\n\tUPDATE comments SET root_id = (\n\t\tSELECT root_id\n\t\tFROM CommentHierarchy\n\t\tWHERE comments.id = CommentHierarchy.id\n\t);\n\t"}
artalk  | 2024/04/29 13:09:14.455 WARN [dao/base.go:27] [DB] Time-consuming SQL {"elapsed": 0.225193475, "rows": 0, "sql": "ALTER TABLE `comments` DROP COLUMN `root_id`"}
artalk  | 2024/04/29 13:09:14.455 FATAL [dao/migrate.go:81] [DB Migrator] Failed to generate root IDs, please feedback this issue to the Artalk team.
artalk  | 2024/04/29 13:09:14.911 WARN [config/base.go:133] config `http.proxy_header` is not set, not it is: "X-Forwarded-For". If you are not using a reverse proxy or CDN, please set it to blank for preventing IP spoofing.
artalk  | 2024/04/29 13:09:14.915 INFO [dao/migrate.go:57] [DB Migrator] Generating Root IDs...
artalk  | 2024/04/29 13:09:15.147 WARN [mysql@v1.5.6/migrator.go:123] [DB] Time-consuming SQL {"elapsed": 0.232023348, "rows": 0, "sql": "ALTER TABLE `comments` ADD `root_id` bigint unsigned"}
artalk  | 2024/04/29 13:09:15.148 ERROR [dao/base.go:27] [DB] {"error": "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 'RECURSIVE CommentHierarchy AS (\n\t\tSELECT id, id AS root_id, rid\n\t\tFROM comments\n' at line 1", "elapsed": 0.000270521, "rows": -1, "sql": "WITH RECURSIVE CommentHierarchy AS (\n\t\tSELECT id, id AS root_id, rid\n\t\tFROM comments\n\t\tWHERE rid = 0\n\n\t\tUNION ALL\n\n\t\tSELECT c.id, ch.root_id, c.rid\n\t\tFROM comments c\n\t\tINNER JOIN CommentHierarchy ch ON c.rid = ch.id\n\t)\n\tUPDATE comments SET root_id = (\n\t\tSELECT root_id\n\t\tFROM CommentHierarchy\n\t\tWHERE comments.id = CommentHierarchy.id\n\t);\n\t"}
artalk  | 2024/04/29 13:09:15.382 WARN [dao/base.go:27] [DB] Time-consuming SQL {"elapsed": 0.233878996, "rows": 0, "sql": "ALTER TABLE `comments` DROP COLUMN `root_id`"}
artalk  | 2024/04/29 13:09:15.382 FATAL [dao/migrate.go:81] [DB Migrator] Failed to generate root IDs, please feedback this issue to the Artalk team.
artalk  | 2024/04/29 13:09:15.882 WARN [config/base.go:133] config `http.proxy_header` is not set, not it is: "X-Forwarded-For". If you are not using a reverse proxy or CDN, please set it to blank for preventing IP spoofing.
artalk  | 2024/04/29 13:09:15.886 INFO [dao/migrate.go:57] [DB Migrator] Generating Root IDs...
artalk  | 2024/04/29 13:09:16.137 WARN [mysql@v1.5.6/migrator.go:123] [DB] Time-consuming SQL {"elapsed": 0.250995638, "rows": 0, "sql": "ALTER TABLE `comments` ADD `root_id` bigint unsigned"}
artalk  | 2024/04/29 13:09:16.137 ERROR [dao/base.go:27] [DB] {"error": "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 'RECURSIVE CommentHierarchy AS (\n\t\tSELECT id, id AS root_id, rid\n\t\tFROM comments\n' at line 1", "elapsed": 0.000181361, "rows": -1, "sql": "WITH RECURSIVE CommentHierarchy AS (\n\t\tSELECT id, id AS root_id, rid\n\t\tFROM comments\n\t\tWHERE rid = 0\n\n\t\tUNION ALL\n\n\t\tSELECT c.id, ch.root_id, c.rid\n\t\tFROM comments c\n\t\tINNER JOIN CommentHierarchy ch ON c.rid = ch.id\n\t)\n\tUPDATE comments SET root_id = (\n\t\tSELECT root_id\n\t\tFROM CommentHierarchy\n\t\tWHERE comments.id = CommentHierarchy.id\n\t);\n\t"}
artalk  | 2024/04/29 13:09:16.385 WARN [dao/base.go:27] [DB] Time-consuming SQL {"elapsed": 0.247598382, "rows": 0, "sql": "ALTER TABLE `comments` DROP COLUMN `root_id`"}
artalk  | 2024/04/29 13:09:16.385 FATAL [dao/migrate.go:81] [DB Migrator] Failed to generate root IDs, please feedback this issue to the Artalk team.
artalk  | 2024/04/29 13:09:17.092 WARN [config/base.go:133] config `http.proxy_header` is not set, not it is: "X-Forwarded-For". If you are not using a reverse proxy or CDN, please set it to blank for preventing IP spoofing.
artalk  | 2024/04/29 13:09:17.096 INFO [dao/migrate.go:57] [DB Migrator] Generating Root IDs...
artalk  | 2024/04/29 13:09:17.329 WARN [mysql@v1.5.6/migrator.go:123] [DB] Time-consuming SQL {"elapsed": 0.232693231, "rows": 0, "sql": "ALTER TABLE `comments` ADD `root_id` bigint unsigned"}
artalk  | 2024/04/29 13:09:17.329 ERROR [dao/base.go:27] [DB] {"error": "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 'RECURSIVE CommentHierarchy AS (\n\t\tSELECT id, id AS root_id, rid\n\t\tFROM comments\n' at line 1", "elapsed": 0.000311441, "rows": -1, "sql": "WITH RECURSIVE CommentHierarchy AS (\n\t\tSELECT id, id AS root_id, rid\n\t\tFROM comments\n\t\tWHERE rid = 0\n\n\t\tUNION ALL\n\n\t\tSELECT c.id, ch.root_id, c.rid\n\t\tFROM comments c\n\t\tINNER JOIN CommentHierarchy ch ON c.rid = ch.id\n\t)\n\tUPDATE comments SET root_id = (\n\t\tSELECT root_id\n\t\tFROM CommentHierarchy\n\t\tWHERE comments.id = CommentHierarchy.id\n\t);\n\t"}
artalk  | 2024/04/29 13:09:17.566 WARN [dao/base.go:27] [DB] Time-consuming SQL {"elapsed": 0.23664913, "rows": 0, "sql": "ALTER TABLE `comments` DROP COLUMN `root_id`"}
artalk  | 2024/04/29 13:09:17.566 FATAL [dao/migrate.go:81] [DB Migrator] Failed to generate root IDs, please feedback this issue to the Artalk team.
artalk  | 2024/04/29 13:09:18.671 WARN [config/base.go:133] config `http.proxy_header` is not set, not it is: "X-Forwarded-For". If you are not using a reverse proxy or CDN, please set it to blank for preventing IP spoofing.
artalk  | 2024/04/29 13:09:18.675 INFO [dao/migrate.go:57] [DB Migrator] Generating Root IDs...
artalk  | 2024/04/29 13:09:18.902 WARN [mysql@v1.5.6/migrator.go:123] [DB] Time-consuming SQL {"elapsed": 0.226875803, "rows": 0, "sql": "ALTER TABLE `comments` ADD `root_id` bigint unsigned"}
artalk  | 2024/04/29 13:09:18.903 ERROR [dao/base.go:27] [DB] {"error": "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 'RECURSIVE CommentHierarchy AS (\n\t\tSELECT id, id AS root_id, rid\n\t\tFROM comments\n' at line 1", "elapsed": 0.000223321, "rows": -1, "sql": "WITH RECURSIVE CommentHierarchy AS (\n\t\tSELECT id, id AS root_id, rid\n\t\tFROM comments\n\t\tWHERE rid = 0\n\n\t\tUNION ALL\n\n\t\tSELECT c.id, ch.root_id, c.rid\n\t\tFROM comments c\n\t\tINNER JOIN CommentHierarchy ch ON c.rid = ch.id\n\t)\n\tUPDATE comments SET root_id = (\n\t\tSELECT root_id\n\t\tFROM CommentHierarchy\n\t\tWHERE comments.id = CommentHierarchy.id\n\t);\n\t"}
artalk  | 2024/04/29 13:09:19.143 WARN [dao/base.go:27] [DB] Time-consuming SQL {"elapsed": 0.240473548, "rows": 0, "sql": "ALTER TABLE `comments` DROP COLUMN `root_id`"}
artalk  | 2024/04/29 13:09:19.144 FATAL [dao/migrate.go:81] [DB Migrator] Failed to generate root IDs, please feedback this issue to the Artalk team.
qwqcode added a commit that referenced this issue Apr 30, 2024
@qwqcode qwqcode added the bug Something isn't working label Apr 30, 2024
@jerryc127
Copy link
Author

@qwqcode 你好 已經修復了,能更新下docker版本麽

@qwqcode
Copy link
Member

qwqcode commented May 9, 2024

你好,刚刚 v2.8.6 版本已发布,感谢反馈!

@jerryc127
Copy link
Author

完美运行
谢谢

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