Deleting a course consumes all the memory available for PHP while seraching for non deleted tables in signle database mode.
This is due to the fact that the while loop check for the next result in the database resultset to be false to exit the loop. But since we have moved to mysqli, ths empty result in a resultset is NULL and not FALSE, causing the loop to never stop and to consume all the memory available.
Solution : use claro_sql_fetch_all_rows !
Fix on the trunk in rev14902