{"task": {"agent_timeout": 3000, "task": "codegen__gogs__gogs-6142", "verifier_timeout": 3000, "instruction": "This is a code generation task. You are expected to write working code that solves the described problem.\n<issue>\n      - Gogs version (or commit ref):  0.11.79\n- Git version: Not applicable\n- Operating system: Debian 9 (Arm)\n- Database (replace `[ ]` with `[x]`):\n  - [ ] PostgreSQL\n  - [X] MySQL\n  - [ ] MSSQL\n  - [ ] SQLite\n- Can you reproduce the bug at https://try.gogs.io:\n  - [ ] Yes: provide example URL\n  - [ ] No: explain why\n- Log gist (usually found in `log/gogs.log`):\n\nI'm trying to restore my gogs database and repositories from my old system using a SQLite database to my new system using an MySQL 8.0.14 database.\nDuring restore i get the following error:\n\n```\n2019/01/27 15:39:31 [ERROR] [...ogs/models/models.go:371 ImportDatabase()] Failed to reset 'created_unix': Error 1064: 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 'release SET created_unix=? WHERE id=?' at line 1\n```\n\nI've been searching for the reason for this error and i have found it, in the lines 372 and 379 of the file 'models/models.go' back tics are missing around the table name.\nDuring restore the script tries to update fields in the table with the name 'restore', but as the term 'restore' also seems to be a reserved command this fails if you just state: ``` UPDATE restore WHERE ....```\nIf you change this to ```UPDATE `restore` WHERE ....``` it is solved and the restore executes normally.\n\nSo change line 372 from:\n```\nif _, err = x.Exec(\"UPDATE \"+rawTableName+\" SET created_unix=? WHERE id=?\", meta[\"CreatedUnix\"], meta[\"ID\"]); err != nil {\n```\nto\n```\nif _, err = x.Exec(\"UPDATE `\"+rawTableName+\"` SET created_unix=? WHERE id=?\", meta[\"CreatedUnix\"], meta[\"ID\"]); err != nil {\n```\nAnd also the same for line 379.\n\nThanks for the great product!\n\nKlaas Eenkhoorn\n\n</issue>\nFocus on implementing the required functionality correctly and efficiently. Treat this as a programming challenge.\nYou are not allowed to read git history.\n", "memory": "8192m", "runnable": false, "difficulty": "hard", "language": "", "cpus": "", "instruction_truncated": false, "category": "code-generation", "compose": false, "has_solution": true, "oracle": null, "docker_image": "", "taskset": "devopsgym", "tags": ["code-generation", "devops-bench"]}, "runs": []}