Comment 2 for bug 622458

Revision history for this message
Hartmut Holzgraefe (hartmut-php) wrote :

added the test case to my linked branch lp:~hartmut-php/drizzle/drizzle-bug622458

test can be run with

  cd tests; ./test-run --suite=broken wrong-plan-with-IN-bug-lp622458

current result is

  broken.wrong-plan-with-IN-bug-lp622458 [ fail ]
  --- /home/hartmut/projects/drizzle/bzr/drizzle-bug622458/tests/suite/broken/r/wrong-plan-with-IN-bug-lp622458.result 2010-08-23 20:10:59.000000000 +0300
  +++ /home/hartmut/projects/drizzle/bzr/drizzle-bug622458/tests/suite/broken/r/wrong-plan-with-IN-bug-lp622458.reject 2010-08-23 20:13:11.000000000 +0300
  @@ -17,4 +17,4 @@
   1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using where
   EXPLAIN SELECT * FROM t1 WHERE id IN (1,'2');
   id select_type table type possible_keys key key_len ref rows Extra
  -1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using where
  +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16 Using where

  drizzletest: Result length mismatch

as the query variant with mixed integer and string expressions in the IN() argument list leads to a suboptimal query plan (full table scan instead of primary key range scan)