Follow up for anyone needing this in the future: It looks like you can safely change ~line 159 of pilerexport.c (in the run_query function) from: char s[SMALLBUFSIZE]; to char s[MAXBUFSIZE]; to get a longer SQL query with pilerexport (from 512 to 8192 characters)
But there should still probably be a more prominent error on the existing mechanism when the query length exceeds the buffer length, as it currently only fails in mail.log, and pilerexport itself appears to have just come back with 0 matches. On Mon, May 3, 2021 at 6:13 PM Ryan Blenis <ryan.ble...@gmail.com> wrote: > Hi Janos, > > Running some queries with pilerexport -w and it seems I'm running up > against a wall with longer queries (the newly logged "pilerexport" sphinx > query in the mail.log cuts off the query at about ~510 characters) which > causes the query to fail and the following SQL just starts spewing > mysql_stmt errors because the SQL is "incomplete". Assuming that's actually > 512 characters with a null termination and another I can't determine just > yet, but looking to hopefully bump up this limit and thought it would also > be a quick bug fix on your end (and make it so I don't have to dig through > too much code to see what needs to be done to make that happen =D ) > > Thank you! >