--disable_warnings drop table if exists t3 ; --enable_warnings set @arg00=1; # non prepared statement for comparison create table t3 (m int) as select @arg00 as m ; select m from t3; drop table t3 ; # prepared statement with constant for comparison prepare stmt3 from ' create table t3 (m int) as select 1 as m ' ; execute stmt3 ; select m from t3; drop table t3; # The problem # prepared statement with parameter prepare stmt3 from ' create table t3 (m int) as select ? as m ' ; # here comes the bug execute stmt3 using @arg00; select m from t3; drop table t3;