Update the NULL-handling document to show current behavior of OCELOT. (CVS 1046)

FossilOrigin-Name: 1d4c92c7325f69ee84b901a2de74a306ace134b6
This commit is contained in:
drh 2003-07-07 00:10:39 +00:00
parent 1dd59e0f94
commit d0cc954fa1
3 changed files with 22 additions and 22 deletions

View File

@ -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

View File

@ -1 +1 @@
982aa3356bcc217003cd9e6a829619219c334797
1d4c92c7325f69ee84b901a2de74a306ace134b6

View File

@ -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 {<html>
<head>
@ -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.
</p>
@ -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.
</p>
<table border=1 cellpadding=5 width="100%">
<table border=1 cellpadding=3 width="100%">
<tr><th>&nbsp&nbsp;</th>
<th>SQLite</th>
<th>PostgreSQL</th>
@ -67,6 +67,7 @@ The following table shows the results of the NULL handling experiments.
<th>Informix</th>
<th>DB2</th>
<th>MS-SQL</th>
<th>OCELOT</th>
</tr>
<tr><td>Adding anything to null gives null</td>
@ -76,6 +77,7 @@ The following table shows the results of the NULL handling experiments.
<td valign="center" align="center" bgcolor="#a9c7a9">Yes</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="#a9c7a9">Yes</td>
</tr>
<tr><td>Multiplying null by zero gives null</td>
<td valign="center" align="center" bgcolor="#a9c7a9">Yes</td>
@ -84,14 +86,16 @@ The following table shows the results of the NULL handling experiments.
<td valign="center" align="center" bgcolor="#a9c7a9">Yes</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="#a9c7a9">Yes</td>
</tr>
<tr><td>nulls are distinct in a UNIQUE index</td>
<tr><td>nulls are distinct in a UNIQUE column</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="#a9c7a9">Yes</td>
<td valign="center" align="center" bgcolor="#c7a9a9">No</td>
<td valign="center" align="center" bgcolor="#a9c7a9">Yes</td>
<td valign="center" align="center" bgcolor="#c7a9a9">No</td>
<td valign="center" align="center" bgcolor="#a9c7a9">Yes</td>
</tr>
<tr><td>nulls are distinct in SELECT DISTINCT</td>
<td valign="center" align="center" bgcolor="#c7a9a9">No</td>
@ -100,6 +104,7 @@ The following table shows the results of the NULL handling experiments.
<td valign="center" align="center" bgcolor="#c7a9a9">No</td>
<td valign="center" align="center" bgcolor="#c7a9a9">No</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="#c7a9a9">No</td>
@ -108,6 +113,7 @@ The following table shows the results of the NULL handling experiments.
<td valign="center" align="center" bgcolor="#c7a9a9">No</td>
<td valign="center" align="center" bgcolor="#c7a9a9">No</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>
@ -116,6 +122,7 @@ The following table shows the results of the NULL handling experiments.
<td valign="center" align="center" bgcolor="#a9c7a9">Yes</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="#a9c7a9">Yes</td>
</tr>
<tr><td>"null OR true" is true</td>
<td valign="center" align="center" bgcolor="#a9c7a9">Yes</td>
@ -124,6 +131,7 @@ The following table shows the results of the NULL handling experiments.
<td valign="center" align="center" bgcolor="#a9c7a9">Yes</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="#a9c7a9">Yes</td>
</tr>
<tr><td>"not (null AND false)" is true</td>
<td valign="center" align="center" bgcolor="#a9c7a9">Yes</td>
@ -132,13 +140,13 @@ The following table shows the results of the NULL handling experiments.
<td valign="center" align="center" bgcolor="#a9c7a9">Yes</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="#a9c7a9">Yes</td>
</tr>
</table>
<table border=1 cellpadding=5 width="100%">
<table border=1 cellpadding=3 width="100%">
<tr><th>&nbsp&nbsp;</th>
<th>MySQL</th>
<th>OCELOT</th>
<th>Firebird</th>
<th>SQL Anywhere</th>
<th>Borland Interbase</th>
@ -149,17 +157,14 @@ The following table shows the results of the NULL handling experiments.
<td valign="center" align="center" bgcolor="#a9c7a9">Yes</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="#a9c7a9">Yes</td>
</tr>
<tr><td>Multiplying null by zero gives null</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="#a9c7a9">Yes</td>
<td valign="center" align="center" bgcolor="#a9c7a9">Yes</td>
<td valign="center" align="center" bgcolor="#a9c7a9">Yes</td>
</tr>
<tr><td>nulls are distinct in a UNIQUE index</td>
<td valign="center" align="center" bgcolor="#a9c7a9">Yes</td>
<tr><td>nulls are distinct in a UNIQUE column</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 4)</td>
@ -167,35 +172,30 @@ 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="#a9c7a9">Yes</td>
<td valign="center" align="center" bgcolor="#aaaad2">(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="#a9c7a9">Yes</td>
<td valign="center" align="center" bgcolor="#aaaad2">(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="#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="#aaaad2">(Note 5)</td>
</tr>
<tr><td>"null OR true" is true</td>
<td valign="center" align="center" bgcolor="#a9c7a9">Yes</td>
<td valign="center" align="center" bgcolor="#c7a9a9">No</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="#a9c7a9">Yes</td>
</tr>
<tr><td>"not (null AND false)" is true</td>
<td valign="center" align="center" bgcolor="#c7a9a9">No</td>
<td valign="center" align="center" bgcolor="#c7a9a9">No</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="#a9c7a9">Yes</td>