fix foreign key table error, RT#26018, RT#13971