Tests for multidb_binds() and fix for the bug it cought