Hello,
I'm currently debugging a segfault in the presence module, which is caused by it recursively calling srdb1 functions on the same db handle, which at least under db_mysql doesn't work and causes segfault. I was wondering what the preferred fix would be: Fix presence module so it doesn't do that, or fix db_mysql so that recursive queries are possible. Personally I'd prefer the second option, but AFAICS it would require some changes to srdb1 itself. Any other options I'm not seeing?
cheers
On 03/25/13 14:16, Richard Fuchs wrote:
Hello,
I'm currently debugging a segfault in the presence module, which is caused by it recursively calling srdb1 functions on the same db handle, which at least under db_mysql doesn't work and causes segfault. I was wondering what the preferred fix would be: Fix presence module so it doesn't do that, or fix db_mysql so that recursive queries are possible. Personally I'd prefer the second option, but AFAICS it would require some changes to srdb1 itself. Any other options I'm not seeing?
cheers
Any comments on this? Or should I just go ahead and fix up srdb1 and db_mysql?
cheers
Am Mittwoch, 27. März 2013, 15:15:58 schrieb Richard Fuchs:
I'm currently debugging a segfault in the presence module, which is caused by it recursively calling srdb1 functions on the same db handle, which at least under db_mysql doesn't work and causes segfault. I was wondering what the preferred fix would be: Fix presence module so it doesn't do that, or fix db_mysql so that recursive queries are possible. Personally I'd prefer the second option, but AFAICS it would require some changes to srdb1 itself. Any other options I'm not seeing?
cheers
Any comments on this? Or should I just go ahead and fix up srdb1 and db_mysql?
Hello Richard,
I'd suggest as well to fix it in the core DB layer instead of the module. The only reason to fix it in the module instead would be if the core fix is really expensive in terms of CPU and/or memory usage.
Best regards,
Henning Westerholt
Hi,
On 03/27/13 10:20, Henning Westerholt wrote:
I'd suggest as well to fix it in the core DB layer instead of the module. The only reason to fix it in the module instead would be if the core fix is really expensive in terms of CPU and/or memory usage.
The change to srdb1 was rather tiny (8366a26f) while the bulk of the fix still had to be done in db_mysql (94ce2b1d). Which means that other db_ modules also need to be fixed. The required changes are pretty straight-forward and I'll fix the ones that I can, but I don't have much experience with certain other drivers (e.g. the postgres one).
cheers