More fixes around sql-dump and listTables().