fix bug #3966, only display 'table has no unique column' when table is defined