Commit Graph

78 Commits

Author SHA1 Message Date
dan
1acb539f4c Add the "colUsed" field to the sqlite3_index_info structure passed to virtual table xBestIndex methods. To indicate the subset of the virtual table columns that may be required by the current scan.
FossilOrigin-Name: 116b206494eb8ba963c7c5acfbf9e7b6db11c79c
2015-11-26 19:33:41 +00:00
dan
07bdba86d5 Add experimental support for LIKE, GLOB and REGEXP to the virtual table interface.
FossilOrigin-Name: 277a5b4027d4c2caba8143228a4f7d6df899dbb4
2015-11-23 21:09:54 +00:00
mistachkin
eeb31ff59b More test output refinements.
FossilOrigin-Name: e64a5681793238fa04fe3636f48d34b2dd36cdfa
2015-06-10 23:02:38 +00:00
drh
4a00b33c02 More test cases. Remove some invalid testcase() macros. Rearrange some code
for improved testability.

FossilOrigin-Name: b3676377b257bd8bb7fefe9c365d76cdc9e44856
2015-05-14 13:41:22 +00:00
dan
ea8562edce Ensure that if a "ROLLBACK TO" statement is used to rollback (but not close) theoutermost transaction, the xRollbackTo() method of any virtual tables involved in the transaction is invoked.
FossilOrigin-Name: e98d481d84ef31b6ed154f14deae9b261f722616
2015-04-18 16:25:54 +00:00
dan
428630cfcf Add tests to check that attempting to DROP a virtual table while it is use does not cause problems.
FossilOrigin-Name: 5ee625b1980f9fab6294d308349dfd9ba960b60b
2015-03-24 14:57:21 +00:00
dan
d89b834f54 Fix a buffer overread during compilation of CREATE VIRTUAL TABLE statements that featured an explicit database name but no virtual table arguments. For example, "CREATE VIRTUAL TABLE main.ft USING fts4".
FossilOrigin-Name: f095cde579e7417306e11b5c1d2dd90b6bb547d5
2014-11-27 11:36:36 +00:00
dan
a4ff825095 In where.c, do not allocate space in sqlite3_index_info structures for the internal WHERE clause "terms" generated to record column equivalencies.
FossilOrigin-Name: 7d9e22187daaa3160b875a1df17b924969bf718e
2014-01-20 19:55:33 +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
4fe425ad79 "make test" now passing.
FossilOrigin-Name: addd7f466d6ff55f82d907286650c26b06e9397b
2013-06-12 17:08:06 +00:00
drh
03597ef6e2 Merge in all the trunk changes that have occurred since this branch was
opened.

FossilOrigin-Name: 6d507e4de924e2f4556ea4a03ee0fa7d647bf8bb
2012-12-14 15:54:05 +00:00
dan
ec6b07b27b Add a test to ensure that the fix in [b0c1ba655d] has worked.
FossilOrigin-Name: 41806de5c88e924e306ca737192755c011517426
2012-12-04 05:24:21 +00:00
drh
281bbe2a95 Enable optimization of IN operators on constraints to virtual tables.
FossilOrigin-Name: aa650746b19e4a6a373f7e47effff3ab2f48e78c
2012-10-16 23:17:14 +00:00
dan
b6a69a66e5 Fix a problem in vtab1.test causing it to fail when run with any permutation that executes SQL within the tcl "sqlite3" command.
FossilOrigin-Name: 006db555260273209933371d17afb33d557baa68
2012-06-08 11:48:40 +00:00
dan
ca8b9bac3b Return SQLITE_MISUSE if an application attempts to register a virtual table module with the same name as an existing module.
FossilOrigin-Name: ea2cd55e098b21cd8997fd6c1978131d3ef2fab4
2012-05-16 14:29:11 +00:00
dan
c68939ef3e Disable the LIKE optimization if the column on the left-hand-side of the LIKE operator belongs to a virtual table.
FossilOrigin-Name: 0bacb879e18026f2a8e22fe3e4bc8d27de5c4416
2012-03-29 14:29:07 +00:00
drh
b421b894e0 Add support for IF NOT EXISTS on CREATE VIRTUAL TABLE.
FossilOrigin-Name: 230983e86a897caa91a487ef2d4c1c7fb7c79f10
2012-01-28 19:41:53 +00:00
dan
3b504df151 Add a test for [48f29963] that does not depend on FTS.
FossilOrigin-Name: fb15f5458eb3e17ce9795c09bffe1224fea0eecd
2011-10-29 15:29:43 +00:00
mistachkin
fda06befd5 Add retry logic for AV defense to winOpen. Also, refactor test suite to allow the key Tcl file operations (e.g. copy and delete) to be retried.
FossilOrigin-Name: 9007586fdabed8dbcc78581ea9821cfd1f9a4c8c
2011-08-02 00:57:34 +00:00
dan
06b5db0e39 Fix some segfaults that could occur in obscure circumstances where error messages contained characters that could be mistaken for printf format specifiers.
FossilOrigin-Name: f91471e7234db490f97298b1ccb8d6c7fc45b089
2010-10-21 15:12:44 +00:00
dan
856ef1a5f9 Various fixes so that "make test" works with OMIT_FOREIGN_KEY, OMIT_TRIGGER and OMIT_ALTER_TABLE.
FossilOrigin-Name: e4eb227b14e4bfcb9f7f284692a391b7355f0204
2009-09-29 06:33:23 +00:00
danielk1977
987a00e8b5 Also test that setting sqlite3_vtab.zErrMsg works from within the xRename method. (CVS 5520)
FossilOrigin-Name: 4f4a9ccae7d25b9856d1203f6b289d552c2b425e
2008-08-01 17:51:47 +00:00
danielk1977
3e3a84d32a Test that virtual table methods xBestIndex, xOpen, xFilter, xNext, xColumn, xRowid, xUpdate, xSync and xBegin can all return error messages using the sqlite3_vtab.zErrMsg variable. (CVS 5519)
FossilOrigin-Name: 007359b770f225877880b11f4c5d97bb548e38ca
2008-08-01 17:37:40 +00:00
drh
80cc85b3c2 Error messages from virtual tables store on the sqlite3_vtab->zErrMsg field
are reported back up to the application interface and memory is reclaimed. (CVS 5466)

FossilOrigin-Name: 4a9dd5e782a363e93d4705fa3671bc6cf0bb5a33
2008-07-23 21:07:25 +00:00
danielk1977
bb50e7ad76 Fix for explicitly inserting a NULL value into the rowid column of a virtual table. (CVS 5343)
FossilOrigin-Name: a7f3b431669f7392a6acba8cd8f3fa5297a916b5
2008-07-04 10:56:07 +00:00
danielk1977
fce96308b1 Add a test to verify that IN(...) WHERE clause terms are not handled by virtual table implemetations. (CVS 5221)
FossilOrigin-Name: 85483c8fb3b45281ce07e84349841fc80e560b1f
2008-06-16 06:31:34 +00:00
drh
19bba916f9 Make sure check-in (4976) also fixes ticket #2935. (CVS 4981)
FossilOrigin-Name: e3f798b1cafc3458941cf86ac4f9d4269fdf5b7e
2008-04-10 16:42:58 +00:00
drh
b5df14486d Make sure changes to virtual tables are counted the same as real tables.
Ticket #3038. (CVS 4976)

FossilOrigin-Name: 55591fc49c8ab8146c1f3eff733e637501bff627
2008-04-10 14:00:09 +00:00
drh
85b623f2f9 Change all instances of "it's" in comments to either "its" or "it is",
as appropriate, in case the comments are ever again read by a pedantic
grammarian.  Ticket #2840. (CVS 4629)

FossilOrigin-Name: 4e91a267febda572e7239f0f1cc66b3102558c36
2007-12-13 21:54:09 +00:00
danielk1977
284f4aca32 Fix compilation/testing with OMIT_SUBQUERY defined. Ticket #2828. (CVS 4603)
FossilOrigin-Name: 0b34a18651764e650faba983be8593992ab2f4a9
2007-12-10 05:03:46 +00:00
danielk1977
6d64307b03 Handle "IS NULL" constraints on virtual table scans. IS NULL constraints are not passed to the virtual table layer. Ticket #2759. (CVS 4523)
FossilOrigin-Name: 7027368c15b3270a139bea5612d7c03c2288dcc4
2007-11-05 05:12:53 +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
cd2543b6ae Fix a problem in hash.c when replacing entries in tables configured with copyKey==0. (CVS 4375)
FossilOrigin-Name: a19d3a73a91f2040ec35d913f11743ff4913ffb7
2007-09-03 15:03:20 +00:00
drh
1f12f9aa30 Remove a debugging btree_breakpoint from vtab1.test. (CVS 4267)
FossilOrigin-Name: 6cc8641ed2fbfc32d418ce153f2819052f230be2
2007-08-22 02:57:16 +00:00
drh
27641703cc A complete run of quick.test with mutex debugging enabled. (CVS 4266)
FossilOrigin-Name: 783e07d561d1f5509de9475f3b9f38315f247002
2007-08-22 02:56:42 +00:00
danielk1977
182c4ba979 Allow ALTER TABLE on virtual tables. (CVS 4142)
FossilOrigin-Name: 37d1f9f37ea9d2e8a4dbe0ec67c0d6eb7fcc5f3f
2007-06-27 15:53:34 +00:00
danielk1977
780b1d9416 Coverage improvements for where.c. (CVS 3764)
FossilOrigin-Name: 7e0aa964129612e2bad6fa45139d124f19cacd48
2007-03-30 14:56:34 +00:00
danielk1977
8efe541f24 Handle the case where the estimated cost of a virtual table scan is larger than SQLITE_BIG_DBL. Ticket #2253. (CVS 3670)
FossilOrigin-Name: 52885ed8b76a06588acf202a38b4feabfca1cfd1
2007-03-02 08:12:22 +00:00
danielk1977
b77ff0139e Fix for an UPDATE on a virtual table when the WHERE clause matches zero rows.
Ticket #2244. (CVS 3652)

FossilOrigin-Name: 43bf797842f00a104f5c5619ad3215edddfc641b
2007-02-21 16:52:12 +00:00
drh
3c23a88562 When an automatic re-prepare occurs, take care not to reset the internal
schema symbol table.  Ticket #2156.  This change also includes some debugging
enhancements. (CVS 3578)

FossilOrigin-Name: 43fe7fc1c38f8d9b3c1346cb1d890c2e25cefe15
2007-01-09 14:01:13 +00:00
drh
b7481e70c5 Add the sqlite3_overload_function() API - part of the virtual table
interface. (CVS 3426)

FossilOrigin-Name: aa7728f9f5b80dbb1b3db124f84b9166bf72bdd3
2006-09-16 21:45:14 +00:00
drh
f80ad49f72 Fix bugs in test scripts so that fulltest will pass. (CVS 3390)
FossilOrigin-Name: 367bd8376f323beb3148eab86ada1a3cb379ba3b
2006-09-02 22:14:59 +00:00
drh
73bdf07713 Tighten an assert (ticket #1920). Change to "sqlite3.h" from <sqlite3.h>
on the sqlite3ext.h header (ticket #1916).  Fix a bug in the test scripts. (CVS 3354)

FossilOrigin-Name: 3ebedbb6f90ec0f9d3bed181f8fb5366f91fc48c
2006-08-15 14:21:16 +00:00
drh
6a03a1c5f7 For infix functions (LIKE, GLOB, REGEXP, and MATCH) treat the left
operand as the first argument for the purposes of virtual table
function overloading, even though the left operand is really the
the second argument. (CVS 3324)

FossilOrigin-Name: 6e98373ca11c9d476f4c6b1841c6e006b7a49f29
2006-07-08 18:34:59 +00:00
drh
e94b0c3920 Add tests and minor fixes to the xFindFunction method of virtual tables. (CVS 3323)
FossilOrigin-Name: 3c4233e074cb016e2422b2e8f867c99217e9b10e
2006-07-08 18:09:15 +00:00
danielk1977
65fd59f731 A few more test cases to improve coverage of virtual table module related code. (CVS 3292)
FossilOrigin-Name: 255aa9121a2ef4fec7fa5523e52969acc96f4b40
2006-06-24 11:51:33 +00:00
danielk1977
5017dc387d Add tests to improve coverage of vtab.c. (CVS 3291)
FossilOrigin-Name: 0c5f4ee39cb76747cf01398867fed2c7ae3edc84
2006-06-24 09:34:22 +00:00
danielk1977
33b3933c15 Ensure whitespace specified as part of a virtual table constructor argument is correctly passed to the constructor function. (CVS 3290)
FossilOrigin-Name: 4630e11d9a697a7fa29a0a1bbca91da4ad2bde7b
2006-06-24 08:51:05 +00:00
danielk1977
212b218c88 Allow xDestroy methods to execute "DROP TABLE" statements. (CVS 3287)
FossilOrigin-Name: a56bfa560425a5dc9273229f8838471dfc402024
2006-06-23 14:32:08 +00:00
danielk1977
a298e90d50 Test the handling of errors in virtual table methods. (CVS 3284)
FossilOrigin-Name: 51b729d9d9f8a60cdfb552809e4aa10012f4eb68
2006-06-22 09:53:48 +00:00