Commit Graph

19 Commits

Author SHA1 Message Date
dan
75f9558808 Fix a problem causing "PRAGMA integrity_check" to disable the xfer
optimization for subsequent VACUUM operations on tables with one or more CHECK
constraints. This could result in VACUUM producing slightly larger database
files.

FossilOrigin-Name: e5bb7db51cdfd8124c60329782798cea398733545594dab55cb892b2a08c4d29
2017-04-04 19:58:54 +00:00
drh
992590be1c Fix a broken assert() and comparison for INSERT INTO ... SELECT when the
SELECT uses an unknown collating sequence.

FossilOrigin-Name: e73ac0cbac257d2d2b28e51423e30d7449b6c7b5
2015-04-19 22:41:22 +00:00
drh
05a86c5c0f Enhance the code generator for INSERT INTO ... SELECT so that the SELECT
generates output directly in the registers that INSERT INTO will be using,
in many cases, and OP_SCopy operations can thus be avoided.

FossilOrigin-Name: aa2d8b0e8154dd2f5e2c837dc11ab362b083495b
2014-02-16 01:55:49 +00:00
drh
f9c8ce3ced Standardize the error messages generated by constraint failures to a format
of "$TYPE constraint failed: $DETAIL".  This involves many changes to the
expected output of test cases.

FossilOrigin-Name: 54b221929744b1bcdbcc2030fef2e510618afd41
2013-11-05 13:33:55 +00:00
drh
ccdf1baebf Update the xfer optimization code so that the xfer optimization can be used
with INTEGER PRIMARY KEY ON CONFLICT ... as long as the destination table
is initially empty.  Improvements to the comments on the xfer optimization.
New test cases added.

FossilOrigin-Name: e3f368cd5ef66a56fd4bd05a77276039e26b9e0e
2011-11-04 14:36:02 +00:00
drh
e7224a011b Make sure the INSERT INTO ... SELECT statement works correctly even when
the destination table contains an INTEGER PRIMARY KEY ON CONFLICT... column.
Ticket [676bc02b87176125].

FossilOrigin-Name: 6f9898db7ff0730cc03f561f9c32ef3dee7e5d81
2011-11-04 00:23:53 +00:00
dan
38cc40c216 Experimental changes to improve optimization of DISTINCT queries.
FossilOrigin-Name: f7ba0219ef2f235543c258be736955d91ca5ecce
2011-06-30 20:17:15 +00:00
drh
713de341a7 Disable the transfer optimization if the destination table contains
any foreign key constraint and foreign key constraints are enabled.
Ticket [6284df89debdf].

FossilOrigin-Name: ddeea5ab5f6c0c4a86cdfbbb9f24d9d54bf8d301
2011-04-24 22:56:07 +00:00
drh
1d9da70ad7 Fix the expression comparison logic to take the COLLATE operator into account.
Ticket [360c6073e197]

FossilOrigin-Name: 44bb1bfe5dedd8054ddd933941ee4112ed8d3b68
2010-01-07 15:17:02 +00:00
drh
60a713c66b Miscellaneous test coverage improvements. (CVS 4734)
FossilOrigin-Name: 720bc20a11275ffe139df9203f23e0683b9b4db1
2008-01-21 16:22:45 +00:00
danielk1977
3c4809a201 Where possible, transform the DISTINCT qualifier to a GROUP BY clause. GROUP BY clauses may be optimized by indices, DISTINCT qualifiers cannot. (CVS 4538)
FossilOrigin-Name: e56331234791cf3d830a30e4cfa66682bdf2eed1
2007-11-12 15:29:18 +00:00
danielk1977
5a8f9374ab Fixes to the test suite (no code changes) so that quick.test runs with OMIT_ATTACH builds. #2706. (CVS 4480)
FossilOrigin-Name: 07c00fffe50e8380748f7ae02328531a75d64610
2007-10-09 08:29:32 +00:00
danielk1977
4152e677b8 Fixes for compilation/testing when the various OMIT macros are defined. (CVS 4423)
FossilOrigin-Name: c8405b15c074c94dab5e33272cf1471f458d11df
2007-09-12 17:01:45 +00:00
danielk1977
5ce240a618 Remove an unreachable case from xferOptimization(). Also other minor test coverage improvements. (CVS 4383)
FossilOrigin-Name: 75af7189c0ed1b24a32cff6960af7f17326cbc17
2007-09-03 17:30:06 +00:00
drh
994c80af27 Changes toward fixes for tickets #2296 and #2291. (CVS 3838)
FossilOrigin-Name: 0dd3e2e47b09156838edfa4dea0d82f9cf22d94d
2007-04-12 21:25:01 +00:00
drh
f33c9fad35 Preliminary fix for ticket #2291. This fixes the immediate problem. But
we really need to write more tests for the xfer optimization in order to
look for other related problems before closing this ticket. (CVS 3835)

FossilOrigin-Name: 34fec312fd1aeabb04e07d6aa061991775c7b8a1
2007-04-10 18:17:55 +00:00
drh
fb658dedce Additional test cases added. Improvements to the INSERT transfer
optimization. (CVS 3662)

FossilOrigin-Name: 2bf5475bde763f73f7f4dd9cac7d13a631a7d2aa
2007-02-24 15:18:49 +00:00
drh
dd73521bc2 Additional tests and some improvements to the INSERT transfer
optimization.  More testing is needed. (CVS 3661)

FossilOrigin-Name: 830985814345f71ba2def3c206e36aabe9e1ee7c
2007-02-24 13:53:05 +00:00
drh
8103b7d2b7 Make sure the INSERT xfer optimization does not trigger if the CHECK
constraints on the two tables are not identical.  Ticket #2252. (CVS 3660)

FossilOrigin-Name: 6fc18275230563437f2985eac3795e4dfe8eb9de
2007-02-24 13:23:51 +00:00