From: drh Date: Mon, 7 Jul 2003 00:10:39 +0000 (+0000) Subject: Update the NULL-handling document to show current behavior of OCELOT. (CVS 1046) X-Git-Tag: version-3.6.10~5022 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d0cc954fa18ce6cab150693ef3baecd0231055d5;p=thirdparty%2Fsqlite.git Update the NULL-handling document to show current behavior of OCELOT. (CVS 1046) FossilOrigin-Name: 1d4c92c7325f69ee84b901a2de74a306ace134b6 --- diff --git a/manifest b/manifest index a9d6068b66..733180accd 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Correctly\shandle\scomparing\san\sINTEGER\sPRIMARY\sKEY\sagainst\sa\sfloating\spoint\nnumber.\s\sTicket\s#377.\s(CVS\s1045) -D 2003-07-06T17:22:25 +C Update\sthe\sNULL-handling\sdocument\sto\sshow\scurrent\sbehavior\sof\sOCELOT.\s(CVS\s1046) +D 2003-07-07T00:10:40 F Makefile.in 9ad23ed4ca97f9670c4496432e3fbd4b3760ebde F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd @@ -160,7 +160,7 @@ F www/formatchng.tcl ca6cc1cb1bef9bc36f0619049d3c95e749bc6983 F www/index.tcl a34315cada875af0b098b4c45981da8ab33fe7b6 F www/lang.tcl 2890eb85809c8fca20c1d81fa30fbdbceecc2a43 F www/mingw.tcl d96b451568c5d28545fefe0c80bee3431c73f69c -F www/nulls.tcl f0304bc4dbe344f4738e52ad45906c5ffd289fbb +F www/nulls.tcl 4ac1c9bbb8a20a76500d18d63b383f51bb7d8be7 F www/omitted.tcl fe59eaa9c1459cbf08fa7daa83421bfc814331bb F www/opcode.tcl b8d561f33597c62955796b797646f00144d97332 F www/quickstart.tcl 4e97bef825e6a4153c43afb9f97235fc4da278ab @@ -168,7 +168,7 @@ F www/speed.tcl 2f6b1155b99d39adb185f900456d1d592c4832b3 F www/sqlite.tcl 3c83b08cf9f18aa2d69453ff441a36c40e431604 F www/tclsqlite.tcl 1db15abeb446aad0caf0b95b8b9579720e4ea331 F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1 -P eb4582831d536cd26a1738f9ad197e40486d0958 -R 43de0a05995ade2e959437ae132085ed +P 982aa3356bcc217003cd9e6a829619219c334797 +R 5b70a86c3000b6c8ddc166ce19c2041e U drh -Z 1a72f69ccd161f8e14773ca5f56644c7 +Z 72ccf7d5146876d033c3e7ec8d5fed3c diff --git a/manifest.uuid b/manifest.uuid index b04cb4d7bb..68e43a7aae 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -982aa3356bcc217003cd9e6a829619219c334797 \ No newline at end of file +1d4c92c7325f69ee84b901a2de74a306ace134b6 \ No newline at end of file diff --git a/www/nulls.tcl b/www/nulls.tcl index 5873280a1f..699830b632 100644 --- a/www/nulls.tcl +++ b/www/nulls.tcl @@ -1,7 +1,7 @@ # # Run this script to generated a nulls.html output file # -set rcsid {$Id: nulls.tcl,v 1.2 2003/07/01 01:16:30 drh Exp $} +set rcsid {$Id: nulls.tcl,v 1.3 2003/07/07 00:10:40 drh Exp $} puts { @@ -44,7 +44,7 @@ worked this way. So SQLite was modified to work the same as Oracle, PostgreSQL, and DB2. This involved making NULLs indistinct for the purposes of the SELECT DISTINCT statement and for the UNION operator in a SELECT. NULLs are still distinct -in a UNIQUE index. This seems somewhat arbitrary, but the desire +in a UNIQUE column. This seems somewhat arbitrary, but the desire to be compatible with other engines outweighted that objection.

@@ -59,7 +59,7 @@ change the value of the NULL_ALWAYS_DISTINCT #define in the The following table shows the results of the NULL handling experiments.

- +
@@ -67,6 +67,7 @@ The following table shows the results of the NULL handling experiments. + @@ -76,6 +77,7 @@ The following table shows the results of the NULL handling experiments. + @@ -84,14 +86,16 @@ The following table shows the results of the NULL handling experiments. + - + + @@ -100,6 +104,7 @@ The following table shows the results of the NULL handling experiments. + @@ -108,6 +113,7 @@ The following table shows the results of the NULL handling experiments. + @@ -116,6 +122,7 @@ The following table shows the results of the NULL handling experiments. + @@ -124,6 +131,7 @@ The following table shows the results of the NULL handling experiments. + @@ -132,13 +140,13 @@ The following table shows the results of the NULL handling experiments. +
   SQLite PostgreSQLInformix DB2 MS-SQLOCELOT
Adding anything to null gives nullYes Yes YesYes
Multiplying null by zero gives null YesYes Yes YesYes
nulls are distinct in a UNIQUE index
nulls are distinct in a UNIQUE column Yes Yes Yes No Yes NoYes
nulls are distinct in SELECT DISTINCT NoNo No NoNo
nulls are distinct in a UNION NoNo No NoNo
"CASE WHEN null THEN 1 ELSE 0 END" is 0? YesYes Yes YesYes
"null OR true" is true YesYes Yes YesYes
"not (null AND false)" is true YesYes Yes YesYes
- +
- @@ -149,17 +157,14 @@ The following table shows the results of the NULL handling experiments. - - - - + @@ -167,35 +172,30 @@ The following table shows the results of the NULL handling experiments. - - - - -
   MySQLOCELOT Firebird SQL Anywhere Borland InterbaseYes Yes YesYes
Multiplying null by zero gives null Yes Yes Yes YesYes
nulls are distinct in a UNIQUE indexYes
nulls are distinct in a UNIQUE column Yes Yes (Note 4)
nulls are distinct in SELECT DISTINCT NoYes (Note 1) No No
nulls are distinct in a UNION (Note 3)Yes (Note 1) No No
"CASE WHEN null THEN 1 ELSE 0 END" is 0? YesYes (Note 2) Yes (Note 5)
"null OR true" is true YesNo Yes Yes Yes
"not (null AND false)" is true NoNo Yes Yes Yes