~drizzle-trunk/drizzle/development

  • Committer: Stewart Smith
  • Date: 2010-08-12 16:48:46 UTC
  • Revision ID: stewart@flamingspork.com-20100812164846-s9bhy47g60bvqs41
bug lp:611379 Equivalent queries with Impossible where return different results

The following two equivalent queries return different results in maria 5.2 and 5.3 (and identical results in mysql 5.5.5) :

SELECT SUM( DISTINCT table1 .`pk` ) FROM B table1 STRAIGHT_JOIN ( BB table2 JOIN CC ON table2 .`col_varchar_key` ) ON table2 .`pk` ;

SELECT * FROM ( SELECT SUM( DISTINCT table1 .`pk` ) FROM B table1 STRAIGHT_JOIN ( BB table2 JOIN CC ON table2 .`col_varchar_key` ) ON table2 .`pk` );

MariaDB returns 0 on the second query and NULL on the first, whereas MySQL returns NULL on both. In MariaDB, both EXPLAIN plans agree that "Impossible WHERE noticed after reading const tables"



We have some slightly different output in drizzle:

main.bug_lp611379 [ fail ]
drizzletest: At line 9: query 'explain select * from (select sum(distinct t1.a) from t1,t2 where t1.a=t2.a)
as t' failed: 1048: Column 'sum(distinct t1.a)' cannot be null

but the fix gets us the correct query results, although with slightly different execution plans.



This fix is directly ported from MariaDB.
Filename Latest Rev Last Changed Committer Comment Size
..
client 1 16 years ago brian clean slate Diff
config 1 16 years ago brian clean slate Diff
drizzled 214 16 years ago Brian Aker Rename of fields (fix issue with string and decima Diff
extra 1022.2.34 15 years ago Monty Taylor Merged Monty from lp:~mordred/drizzle/kill-malloc Diff
gnulib 815.1.1 16 years ago Monty Taylor Add timegm which is missing on Solaris. Diff
m4 202.3.14 16 years ago Monty Taylor Moved m4 macros to top-level m4 dir, per GNU stand Diff
plugin 1 16 years ago brian clean slate Diff
po 202.3.1 16 years ago Monty Taylor Added very initial gettextize stuff. Diff
support-files 1 16 years ago brian clean slate Diff
tests 77.1.47 16 years ago Monty Taylor Moved test to tests... Diff
unittests 1377.8.1 15 years ago pawel primitive integration of the testing framework wit Diff
.bzrignore 1667.4.1 14 years ago Monty Taylor Removed gettext - replaced with intltool. Dear god 5.7 KB Diff Download File
.quickly 1677.1.2 14 years ago Monty Taylor updated to latest pandora-build - contains win32 f 111 bytes Diff Download File
AUTHORS 1546 14 years ago Brian Aker Merge of Joe's patch (and I updated the author fil 387 bytes Diff Download File
configure.ac 1644.1.1 14 years ago Monty Taylor Added a configure summary entry for pandora-build 5.3 KB Diff Download File
COPYING 1 16 years ago brian clean slate 18.6 KB Diff Download File
Doxyfile 264.3.1 16 years ago Jay Pipes * Added Doxyfile configuration for doxygen builds 55.2 KB Diff Download File
DRIZZLE.FAQ 665.1.4 16 years ago Eric Herman Added pointer to online version of the FAQ 5.8 KB Diff Download File
EXCEPTIONS-CLIENT 1 16 years ago brian clean slate 5 KB Diff Download File
Makefile.am 1667.4.1 14 years ago Monty Taylor Removed gettext - replaced with intltool. Dear god 4.3 KB Diff Download File
NEWS 194 16 years ago Brian Aker Documentation cleanup 41 bytes Diff Download File
README 992.1.3 16 years ago Monty Taylor Clarified instructions in README. 821 bytes Diff Download File