From ac8eb11375458631836e42f43164e88c3f569df5 Mon Sep 17 00:00:00 2001 From: drh Date: Thu, 17 Mar 2011 01:58:21 +0000 Subject: [PATCH] Comment enhancement to better explain the logic in the "x IS NULL" optimization. FossilOrigin-Name: 869f894798a65f8bc0e0b083866a784fa0189f68 --- manifest | 18 +++++++++--------- manifest.uuid | 2 +- src/where.c | 3 ++- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/manifest b/manifest index b04b624d6b..a9110cb28d 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,8 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -C Enhances\sto\sthe\squery\splanner\ssuch\sthat\s"x\sIS\sNULL"\sconstraints\stake\sthe\nSTAT2\sstatistics\sinto\saccount,\sjust\slike\s"x=VALUE"\sconstraints. -D 2011-03-17T01:34:26.570 +C Comment\senhancement\sto\sbetter\sexplain\sthe\slogic\sin\sthe\s"x\sIS\sNULL"\s\noptimization. +D 2011-03-17T01:58:21.662 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 27701a1653595a1f2187dc61c8117e00a6c1d50f F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -246,7 +246,7 @@ F src/vtab.c b297e8fa656ab5e66244ab15680d68db0adbec30 F src/wal.c 7334009b396285b658a95a3b6bc6d2b016a1f794 F src/wal.h 7a5fbb00114b7f2cd40c7e1003d4c41ce9d26840 F src/walker.c 3112bb3afe1d85dc52317cb1d752055e9a781f8f -F src/where.c a41a1c64aceb4138a865e6dc939f781f53401d68 +F src/where.c a6e89fe7e56ab7e633be6fdebdddd857e9e5bc99 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2 F test/alias.test 4529fbc152f190268a15f9384a5651bbbabc9d87 F test/all.test 51756962d522e474338e9b2ebb26e7364d4aa125 @@ -917,14 +917,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P 3e984195f1f6d28734456dd726d226cedf207da2 -R 291ccee36a06fddbdbf66dee9d0c5dc8 +P 2353176811f752a16c1f2351a3d3431919b062a9 +R ceaf122e76347e0b045461abe9cbfd0f U drh -Z 44243678e5ac002f859d95b6693267ff +Z 6e216a7f32c457388fcc438c6cd929ce -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) -iD8DBQFNgWUmoxKgR168RlERArUBAJ9O6MIvLSm72rE66pJVBmPTs+4oyACdHack -G7nsgBYo5KQjyDA5i3CGse8= -=owlC +iD8DBQFNgWrBoxKgR168RlERAg4rAJ0ZbgbEbrWUz8iIL7EI7v8AcMLRpQCfZka3 +v7cQP/zk4VcNw9IakEHnWtw= +=fknb -----END PGP SIGNATURE----- diff --git a/manifest.uuid b/manifest.uuid index 86fa92432e..9f597732d4 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -2353176811f752a16c1f2351a3d3431919b062a9 \ No newline at end of file +869f894798a65f8bc0e0b083866a784fa0189f68 \ No newline at end of file diff --git a/src/where.c b/src/where.c index 0cda03f451..cdcaa98c01 100644 --- a/src/where.c +++ b/src/where.c @@ -2520,7 +2520,8 @@ range_est_fallback: ** an equality constraint x=VALUE and where that VALUE occurs in ** the histogram data. This only works when x is the left-most ** column of an index and sqlite_stat2 histogram data is available -** for that index. +** for that index. When pExpr==NULL that means the constraint is +** "x IS NULL" instead of "x=VALUE". ** ** Write the estimated row count into *pnRow and return SQLITE_OK. ** If unable to make an estimate, leave *pnRow unchanged and return -- 2.47.2