]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Update the NULL-handling chart with new information about Firebird. (CVS 1072)
authordrh <drh@noemail.net>
Wed, 13 Aug 2003 11:29:23 +0000 (11:29 +0000)
committerdrh <drh@noemail.net>
Wed, 13 Aug 2003 11:29:23 +0000 (11:29 +0000)
FossilOrigin-Name: 17bdfeb284880d82cd546e6c191c3a37121ec861

manifest
manifest.uuid
www/nulls.tcl

index 23e421eaf4a382a6b034e0d072fe353636fbcaf9..6cd51e8dddce69136dbbea456a973f7d9df3b8a7 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Make\sthe\ssqliteOsCurrentTime()\sfunction\swork\sfor\sWindows.\s\sCode\scontributed\nby\s"e4liberty"\son\sthe\smailing\slist.\s(CVS\s1071)
-D 2003-08-10T16:16:22
+C Update\sthe\sNULL-handling\schart\swith\snew\sinformation\sabout\sFirebird.\s(CVS\s1072)
+D 2003-08-13T11:29:24
 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 64f867e40c1c4a8a0ffe560ec372df737ceeaec5
 F www/lang.tcl 5f39bbda1ba38a28f18f97bd98c81f40355393b2
 F www/mingw.tcl d96b451568c5d28545fefe0c80bee3431c73f69c
-F www/nulls.tcl 4ac1c9bbb8a20a76500d18d63b383f51bb7d8be7
+F www/nulls.tcl 9cb56d98c0c623074cda4360a415f3f0a7074c90
 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 94243edac14b90ef898093b85e1959c20fa23ae9
-R d06ee94e7e293f14bb7a17592af45795
+P 02fac304c9ec9012f3cc4f04d2c4cac5e37b0024
+R c5c60d7816b69e7ad636fa582dc70cef
 U drh
-Z c133f327a7247010c46dbc5ed1b64175
+Z 5cc44053e6e9f069f799212980612ed0
index af25ccb45f665bb6b5bbfc41a0a74ffef57e3200..1f397b7b4873afe61a02f8f442cb2f6e83723933 100644 (file)
@@ -1 +1 @@
-02fac304c9ec9012f3cc4f04d2c4cac5e37b0024
\ No newline at end of file
+17bdfeb284880d82cd546e6c191c3a37121ec861
\ No newline at end of file
index 699830b63258e527daf0af6a78c2ec918bc86f3e..ef933ae12094a5f914c658f019f9ee081efc045a 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Run this script to generated a nulls.html output file
 #
-set rcsid {$Id: nulls.tcl,v 1.3 2003/07/07 00:10:40 drh Exp $}
+set rcsid {$Id: nulls.tcl,v 1.4 2003/08/13 11:29:24 drh Exp $}
 
 puts {<html>
 <head>
@@ -33,6 +33,7 @@ was to make SQLite work like all the other engines.
 A SQL test script was developed and run by volunteers on various
 SQL RDBMSes and the results of those tests were used to deduce
 how each engine processed NULL values.
+The original tests were run in May of 2002.
 A copy of the test script is found at the end of this document.
 </p>
 
@@ -55,6 +56,29 @@ change the value of the NULL_ALWAYS_DISTINCT #define in the
 <tt>sqliteInt.h</tt> source file and recompile.
 </p>
 
+<blockquote>
+<p>
+<i>Update 2003-07-13:</i>
+Since this document was originally written some of the database engines
+tested have been updated and users have been kind enough to send in
+corrections to the chart below.  The original data showed a wide variety
+of behaviors, but over time the range of behaviors has converged toward
+the PostgreSQL/Oracle model.  The only significant difference 
+is that Informix and MS-SQL both threat NULLs as
+indistinct in a UNIQUE column.
+</p>
+
+<p>
+The fact that NULLs are distinct for UNIQUE columns but are indistinct for
+SELECT DISTINCT and UNION continues to be puzzling.  It seems that NULLs
+should be either distinct everywhere or nowhere.  And the SQL standards
+documents suggest that NULLs should be distinct everywhere.  Yet as of
+this writing, no SQL engine tested treats NULLs as distinct in a SELECT
+DISTINCT statement or in a UNION.
+</p>
+</blockquote>
+
+
 <p>
 The following table shows the results of the NULL handling experiments.
 </p>
@@ -172,19 +196,19 @@ The following table shows the results of the NULL handling experiments.
 </tr>
 <tr><td>nulls are distinct in SELECT DISTINCT</td>
 <td valign="center" align="center" bgcolor="#c7a9a9">No</td>
-<td valign="center" align="center" bgcolor="#aaaad2">(Note 1)</td>
+<td valign="center" align="center" bgcolor="#c7a9a9">No (Note 1)</td>
 <td valign="center" align="center" bgcolor="#c7a9a9">No</td>
 <td valign="center" align="center" bgcolor="#c7a9a9">No</td>
 </tr>
 <tr><td>nulls are distinct in a UNION</td>
 <td valign="center" align="center" bgcolor="#aaaad2">(Note 3)</td>
-<td valign="center" align="center" bgcolor="#aaaad2">(Note 1)</td>
+<td valign="center" align="center" bgcolor="#c7a9a9">No (Note 1)</td>
 <td valign="center" align="center" bgcolor="#c7a9a9">No</td>
 <td valign="center" align="center" bgcolor="#c7a9a9">No</td>
 </tr>
 <tr><td>"CASE WHEN null THEN 1 ELSE 0 END" is 0?</td>
 <td valign="center" align="center" bgcolor="#a9c7a9">Yes</td>
-<td valign="center" align="center" bgcolor="#aaaad2">(Note 2)</td>
+<td valign="center" align="center" bgcolor="#a9c7a9">Yes</td>
 <td valign="center" align="center" bgcolor="#a9c7a9">Yes</td>
 <td valign="center" align="center" bgcolor="#aaaad2">(Note 5)</td>
 </tr>
@@ -206,7 +230,8 @@ The following table shows the results of the NULL handling experiments.
 <tr>
 <td valign="top" rowspan=5>Notes:&nbsp;&nbsp;</td>
 <td>1.&nbsp;</td>
-<td>Firebird omits all NULLs from SELECT DISTINCT and from UNION.</td>
+<td>Older versions of firebird omits all NULLs from SELECT DISTINCT
+and from UNION.</td>
 </tr>
 <tr><td>2.&nbsp;</td>
 <td>Test data unavailable.</td>