table.a is innodb has fields id,post_id,auther,add_date
table.b is myisam has fields post_id,title,content, fulltext key(title,content)
select * from b
where match (title,content)
against ('+words' in boolean mode)
this could return 12 records. when run a explain, I could see the fulltext key. But
select * from a
inner join b
on a.post_id = 'b.post_id'
where match (b.title,b.content)
against ('+words' in boolean mode)
and a.auther = 'someone'
order by a.id asc
this retrun 0 result. I have checked
select id,auther,post_id from a where auther = 'someone'
the return post_id put in mysql
select post_id from b where post_id = 'post_id from table a'
this result is exist. So where is the problem? (BTW, 2 tables post_id are all saved as varchar)
I suspect that you didn’t intend for the join condition to be
but rather
(The difference being that your version will join every row of
bto any row ofawherea.post_idis the string"b.post_id", whereas my version will join rows ofato rows ofbwhere their respectivepost_idcolumns are equal).