use test; set @var_x= 'ABC'; set @var_x= NULL; prepare __stmt_ph_ from "select 'blabla' as my_column from (select 1) as t1 where ? IS NULL" ; # I miss here a result containing one row with 'blabla' !!! execute __stmt_ph_ using @var_x ; # statements for comparison select 'blabla' as my_column from (select 1) as t1 where NULL IS NULL ; select 'blabla' as my_column from (select 1) as t1 where @var_x IS NULL ; prepare __stmt_uv_ from "select 'blabla' as my_column from (select 1) as t1 where @var_x IS NULL" ; execute __stmt_uv_ ;