diff options
author | unknown <joerg@mysql.com> | 2004-10-12 16:00:50 +0200 |
---|---|---|
committer | unknown <joerg@mysql.com> | 2004-10-12 16:00:50 +0200 |
commit | 4855ff515267f32070504023d527feb807882aa1 (patch) | |
tree | caea98ac4596cc77479de7ef5a225328eee4cc9f /mysql-test/t/ps_11bugs.test | |
parent | 9ed05da49d26385cdf92144ed09278bcf9fbb6cb (diff) | |
download | mariadb-git-4855ff515267f32070504023d527feb807882aa1.tar.gz |
New tests for prepared statements:
- 'ps_10nestset' uses a "nested set" approach for an employee
hierarchy, then does arithmetic on the "salary" field;
(soon) to be extended by inserts / deletes which imply
mass updates on the "l"/"r" fields showing the set inclusion,
- 'ps_11bugs' will get (some of ?) those bug DB entries which
refer to prepared statements, but whose number does not appear
in a test file comment - so it will also be extended.
Diffstat (limited to 'mysql-test/t/ps_11bugs.test')
-rw-r--r-- | mysql-test/t/ps_11bugs.test | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/t/ps_11bugs.test b/mysql-test/t/ps_11bugs.test new file mode 100644 index 00000000000..53afc8b5a78 --- /dev/null +++ b/mysql-test/t/ps_11bugs.test @@ -0,0 +1,32 @@ +############################################### +# # +# 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; |