Remove support for the non-standard ON CONFLICT clause on CREATE INDEX.

Ticket #1486.  The ON CONFLICT clause has never worked on CREATE INDEX so
removing it should not break anything. (CVS 3042)

FossilOrigin-Name: 669bcf5ab694359485ab30913d8d9e4926f41789
This commit is contained in:
drh 2006-01-30 23:04:51 +00:00
parent 3caf58ea65
commit 77e96d142a
4 changed files with 17 additions and 30 deletions

View File

@ -1,5 +1,5 @@
C Memory\sDB\sworks\swith\sautovacuum.\s(CVS\s3041)
D 2006-01-30T22:48:44
C Remove\ssupport\sfor\sthe\snon-standard\sON\sCONFLICT\sclause\son\sCREATE\sINDEX.\nTicket\s#1486.\s\sThe\sON\sCONFLICT\sclause\shas\snever\sworked\son\sCREATE\sINDEX\sso\nremoving\sit\sshould\snot\sbreak\sanything.\s(CVS\s3042)
D 2006-01-30T23:04:51
F Makefile.in e936c6fc3134838318aa0335a85041e6da31f6ee
F Makefile.linux-gcc 74ba0eadf88748a9ce3fd03d2a3ede2e6715baec
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@ -61,7 +61,7 @@ F src/os_win.c 566bf7b41b72556fd7dca390bceaa2769dc395e9
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
F src/pager.c b5b380ea7a36f84e50c3adc1a414820a0eb3baa6
F src/pager.h e0acb095b3ad0bca48f2ab00c87346665643f64f
F src/parse.y 4285cd2d0f31a8db4c4d54325f88e500452fa029
F src/parse.y ce7182bfd47b7e5921bc55dcc399cda5cb879f19
F src/pragma.c 4496cc77dc35824e1c978c3d1413b8a5a4c777d3
F src/prepare.c 40ae23c8aeb641dc7b9bb271eb5e295b815154a7
F src/printf.c c7d6ad9efb71c466305297a448308f467b6e2b6e
@ -327,7 +327,7 @@ F www/fullscanb.gif f7c94cb227f060511f8909e10f570157263e9a25
F www/index-ex1-x-b.gif f9b1d85c3fa2435cf38b15970c7e3aa1edae23a3
F www/index.tcl 9335abd68250ebf55e8b6be2d4c53cbc503fdb81
F www/indirect1b1.gif adfca361d2df59e34f9c5cac52a670c2bfc303a1
F www/lang.tcl ce9de23a6693469c5bfdafc1fd50d7b18752e7d7
F www/lang.tcl 3f7472e77a8257fb7c61a14e7607de3005b3fa2d
F www/lockingv3.tcl f59b19d6c8920a931f096699d6faaf61c05db55f
F www/mingw.tcl d96b451568c5d28545fefe0c80bee3431c73f69c
F www/nulls.tcl ec35193f92485b87b90a994a01d0171b58823fcf
@ -349,7 +349,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
P 9d53cc880fd2aa3bd4b4a59f666b57b0b7864e8f
R a00b5e878885404ba1ff7012291e506f
P 34dff874a2bf8331be87310809ba11d813fadb7d
R 84abbe4f77fbc0f3fa4d51788062882f
U drh
Z 3c9e0a653cb5ce6429201a9bb17db65f
Z 6f1708d289c33d1a9960e6ad7dfc0be1

View File

@ -1 +1 @@
34dff874a2bf8331be87310809ba11d813fadb7d
669bcf5ab694359485ab30913d8d9e4926f41789

View File

@ -14,7 +14,7 @@
** the parser. Lemon will also generate a header file containing
** numeric codes for all of the tokens.
**
** @(#) $Id: parse.y,v 1.193 2006/01/23 13:22:09 drh Exp $
** @(#) $Id: parse.y,v 1.194 2006/01/30 23:04:51 drh Exp $
*/
// All token codes are small integers with #defines that begin with "TK_"
@ -840,9 +840,7 @@ expritem(A) ::= . {A = 0;}
///////////////////////////// The CREATE INDEX command ///////////////////////
//
cmd ::= CREATE(S) uniqueflag(U) INDEX ifnotexists(NE) nm(X) dbnm(D)
ON nm(Y) LP idxlist(Z) RP(E) onconf(R). {
if( U!=OE_None ) U = R;
if( U==OE_Default) U = OE_Abort;
ON nm(Y) LP idxlist(Z) RP(E). {
sqlite3CreateIndex(pParse, &X, &D, sqlite3SrcListAppend(0,&Y,0), Z, U,
&S, &E, SQLITE_SO_ASC, NE);
}

View File

@ -1,7 +1,7 @@
#
# Run this Tcl script to generate the lang-*.html files.
#
set rcsid {$Id: lang.tcl,v 1.106 2006/01/23 18:14:22 drh Exp $}
set rcsid {$Id: lang.tcl,v 1.107 2006/01/30 23:04:52 drh Exp $}
source common.tcl
if {[llength $argv]>0} {
@ -442,7 +442,6 @@ Section {CREATE INDEX} createindex
Syntax {sql-statement} {
CREATE [UNIQUE] INDEX [IF NOT EXISTS] [<database-name> .] <index-name>
ON <table-name> ( <column-name> [, <column-name>]* )
[ ON CONFLICT <conflict-algorithm> ]
} {column-name} {
<name> [ COLLATE <collation-name>] [ ASC | DESC ]
}
@ -469,16 +468,6 @@ attached to a single table, nor on the number of columns in an index.</p>
index entries are not allowed. Any attempt to insert a duplicate entry
will result in an error.</p>
<p>The optional conflict-clause allows the specification of an alternative
default constraint conflict resolution algorithm for this index.
This only makes sense if the UNIQUE keyword is used since otherwise
there are not constraints on the index. The default algorithm is
ABORT. If a COPY, INSERT, or UPDATE statement specifies a particular
conflict resolution algorithm, that algorithm is used in place of
the default algorithm specified here.
See the section titled
<a href="#conflict">ON CONFLICT</a> for additional information.</p>
<p>The exact text
of each CREATE INDEX statement is stored in the <b>sqlite_master</b>
or <b>sqlite_temp_master</b> table, depending on whether the table
@ -1468,9 +1457,11 @@ It is given its own section in this document because it is not
part of standard SQL and therefore might not be familiar.</p>
<p>The syntax for the ON CONFLICT clause is as shown above for
the CREATE TABLE and CREATE INDEX commands. For the COPY, INSERT, and
the CREATE TABLE command. For the INSERT and
UPDATE commands, the keywords "ON CONFLICT" are replaced by "OR", to make
the syntax seem more natural. But the meaning of the clause is the same
the syntax seem more natural. For example, instead of
"INSERT ON CONFLICT IGNORE" we have "INSERT OR IGNORE".
The keywords change but the meaning of the clause is the same
either way.</p>
<p>The ON CONFLICT clause specifies an algorithm used to resolve
@ -1523,12 +1514,10 @@ satisfy a constraint, it does not invoke delete triggers on those
rows. But that may change in a future release.</p>
</dl>
<p>The algorithm specified in the OR clause of a COPY, INSERT, or UPDATE
overrides any algorithm specified in a CREATE TABLE or CREATE INDEX.
<p>The algorithm specified in the OR clause of a INSERT or UPDATE
overrides any algorithm specified in a CREATE TABLE.
If no algorithm is specified anywhere, the ABORT algorithm is used.</p>
}
# <p>For additional information, see
# <a href="conflict.html">conflict.html</a>.</p>
Section REINDEX reindex