############################################### # # # Prepared Statements # # re-testing bug DB entries # # # ############################################### use test; # bug#1180: optimized away part of WHERE clause cause incorect prepared satatement results drop table if exists test_select; CREATE TABLE test_select(session_id char(9) NOT NULL); INSERT INTO test_select VALUES ("abc"); SELECT * FROM test_select; prepare st_1180 from 'SELECT * FROM test_select WHERE ?="1111" and session_id = "abc"'; # Must not find a row set @arg1= 'abc'; execute st_1180 using @arg1; # Now, it should find one row set @arg1= '1111'; execute st_1180 using @arg1; # Back to non-matching set @arg1= 'abc'; execute st_1180 using @arg1; drop table test_select;