-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
- Gitea version (or commit ref): 1.12.0+dev-222-gd26aee383
- Git version: 2.24.3
- Operating system: Ubuntu 18.04
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Not relevant
- Log gist: https://gist.github.com/PeterSurda/ee7291b12c7d98f8902e353d0c9cf2dc#file-gitea-log
Description
Trying to migrate a repository from github failed when migrating pull requests is requested. I am in the process of creating a new repo to demonstrate how to reproduce the issue. I'll post an update once it's available. The error I get is
Migrate repository from xxxxxxxxx failed: too many SQL variables
I think it happens if a PR review has too many comments. SQLite has a compile time limit of arguments, defaulting to 999. I don't think the value can be increased without recompiling the library.
I tried to find the location in the code that could be causing this, and my best guess is that it's here:
Line 461 in 1f0b797
if _, err := sess.NoAutoTime().Insert(review.Comments); err != nil { |
As far as I can see, there is no check for the number of arguments. One row appears to have 31 columns in my case, so doing the insert in chunks of int(999/31) = 32 would fix it.
I'd try to create a PR myself but I'm not familiar with go (language, build system, tests, ...).
...