QUOTE (sbeelis @ July 02, 2013 07:36 pm) |
Note that $_sql is cut off in the middle of a GC code, causing the error. |
No, it is just the string in the error message this is cut off.
We only list the first 512 characters or so (same as in debug) because this string could be potentially very large (2gb from memory).
I just tested this with 50,000 codes and it ran without error.
I suspect you have a problem with the string that you generated. The Sqlite error does refer to the closing ")", so I suspect your string might end in a comma when it shouldn't (just a guess) Regardless, the problem would appear to be that you have generated an invalid sql query, rather than hitting any length limit with $_sql.
If this string is very large, you may need to write it out to a file so you can take a look and see what the actual problem might be.