This seems to be multiple statements per exec related. pragma foreign_key_list(keywords); pragma foreign_key_list(keyword_usage); produces gbx3: warning: 20 allocation(s) non freed. Yet, individually they work fine.