drh
d742bb78f8
Fix a bug in the GROUP BY alias name resolution. The bug was by
...
check-in (6305). Discovered by regression test on 64-bit linux.
Test cases added so that the problems is detected on 32-bit systems. (CVS 6332)
FossilOrigin-Name: fa0008502ec4f891bfed4a11f01650d274f95c44
2009-03-02 01:22:40 +00:00
danielk1977
2f886d1d53
Instead of linking temporary triggers on non-temporary tables into the Table.pTrigger list, search the temp schema for them on demand. Fix for #3688 . (CVS 6329)
...
FossilOrigin-Name: 3befe1ef7e6ebddedfa69579553a1b85b411ee98
2009-02-28 10:47:41 +00:00
danielk1977
02b4e3b34e
In sqlite3_table_column_metadata(), hold the mutex on all attached BtShared objects while accessing schema objects. Fix for #3679 . (CVS 6328)
...
FossilOrigin-Name: d197afd658eecfc0e24913e5a779c8f1e2a138a6
2009-02-26 07:15:59 +00:00
danielk1977
02f33725d2
Minor changes and coverge tests for "SELECT count(*)" optimization. (CVS 6324)
...
FossilOrigin-Name: a3695b98f63fb776c3b7f77f0553e8a38bcc6f78
2009-02-25 08:56:47 +00:00
danielk1977
7a895a8048
Fixes and some extra test cases for count(*) optimization. (CVS 6320)
...
FossilOrigin-Name: 3f0baa1b63df31f7dc885fd39290ca12ad2be6df
2009-02-24 18:33:15 +00:00
danielk1977
4d9c1dd262
Add test file test/count.test for testing "SELECT count(*)" statements. It is not properly populated yet. (CVS 6318)
...
FossilOrigin-Name: a195d74ff9ce836447dba4da7edcc6f1cdae5574
2009-02-24 10:48:27 +00:00
danielk1977
a55331620e
Optimize queries of the form "SELECT count(*) FROM <tbl>" by adding a sqlite3BtreeCount() interface to the btree layer. (CVS 6316)
...
FossilOrigin-Name: d4aa6593183224b6868a322511511c0bbf63b598
2009-02-24 10:01:51 +00:00
danielk1977
e2d7b24d08
Scan an index instead of a table for "SELECT count(*) FROM <tbl>" queries. Because an index is usually smaller than a table on disk, this saves some IO. (CVS 6315)
...
FossilOrigin-Name: 294ba6f743c9132dce0e73da480bd3c2071e7239
2009-02-23 17:33:49 +00:00
drh
699b3d4f89
Add the reverse_unordered_selects pragma. (CVS 6314)
...
FossilOrigin-Name: bc078e0007b6c3dc07722820bb53798b643212b3
2009-02-23 16:52:07 +00:00
drh
08de14908d
Add a count parameter to the OP_Variable opcode and use it to simplify
...
prepared statements that copy consecutive unnamed parameters into
consecutive registers (a common case). (CVS 6309)
FossilOrigin-Name: 48b77b04935d8942eb22f0c061f3bc5e99bbd7db
2009-02-20 03:55:05 +00:00
danielk1977
6ab3a2ec8a
Changes to reduce the heap space consumed by triggers, views and tables in the in-memory representation of the schema. Also to reduce the space used by prepared statements slightly. (CVS 6305)
...
FossilOrigin-Name: d9f6ffbc5ea090ba0daac571fc9a6c68b9c864e4
2009-02-19 14:39:25 +00:00
drh
076d4661a6
Make sure the auto_vacuum=INCREMENTAL setting is preserved across a VACUUM.
...
Ticket #3663 . (CVS 6304)
FossilOrigin-Name: ded04f12f41504e4a3ecd5164f0d4cbbde5e16f7
2009-02-18 20:31:18 +00:00
drh
0388123f07
Correctly handle attempts to add a UNIQUE or PRIMARY KEY column using
...
the ALTER TABLE statement. Ticket #3651 . (CVS 6291)
FossilOrigin-Name: dd179ff2986bc2a86d70bbe927fd0e123e17d398
2009-02-13 03:43:31 +00:00
drh
a32e0d05ff
Update thread tests to clear the sqlite_open_file_count counter at the
...
end. This counter is not threadsafe and can end up with an invalid value
at the end of the thread tests. (CVS 6289)
FossilOrigin-Name: 8c4d71a169e529964d2d0cfba82bbad66a0bcd12
2009-02-12 17:06:41 +00:00
danielk1977
f2a79f2248
Fix some edge cases with backing up databases that are exactly PENDING_BYTE bytes in size, or just slightly larger. (CVS 6288)
...
FossilOrigin-Name: 2fc450e8e60248d6111d0b0d2b8f2344f5b89bca
2009-02-12 17:01:49 +00:00
danielk1977
1435ccd52b
Modify lock.test to account for "PRAGMA lock_status" returning "unknown" for in-memory databases. (CVS 6287)
...
FossilOrigin-Name: 9a6e558ba6fe0b38376a85a6c1e2cea5570ea283
2009-02-12 09:36:15 +00:00
danielk1977
f7f33fb08a
Fix a case where during a rollback triggered by an IO or malloc error an unjournalled region of the database could be written to (with it's original data). This was causing an assert in test_journal.c to fail. Add a test case in ioerr2.test to trigger this case. (CVS 6286)
...
FossilOrigin-Name: 315a6692f9a03a470871cce4f74567683546f343
2009-02-12 09:11:56 +00:00
shane
ce14f6245e
Updated for Windows compatibility. Test scripts only. (CVS 6285)
...
FossilOrigin-Name: 2522ad1df3599fa71cd1d929142adaefaf3a4d67
2009-02-11 16:06:18 +00:00
danielk1977
3d781c2176
Fix the backup.test script so that it works regardless of the value of SQLITE_TEMP_STORE and the initial contents of the file-system. (CVS 6283)
...
FossilOrigin-Name: da660ea73ac6627b4e71706b8cd464646ea66550
2009-02-11 15:11:00 +00:00
danielk1977
b8f12c1201
Reduce the number of iterations in one of the savepoint4.test crash tests. (CVS 6277)
...
FossilOrigin-Name: fafb07b83721d67f6c6f3126c8de94b9b7efa519
2009-02-10 14:45:12 +00:00
danielk1977
cd503d6a3b
Reenable triggering vdbe tracing by creating file-system entries. Add a (redundant) test that modifying the temp schema expires all prepared statements. (CVS 6274)
...
FossilOrigin-Name: f6590dac4612d0d05105fa820e8fcb80b5907a40
2009-02-10 11:17:43 +00:00
danielk1977
8e3e881a24
Fix a bug in test file misc7.test. No code changes. (CVS 6272)
...
FossilOrigin-Name: d919d2a14c8cbbda3fbd6fb2ddae174fa709177b
2009-02-10 05:45:41 +00:00
danielk1977
3d0cbc3362
Fix a problem in backup.c causing OsTruncate() to be called with an argument larger than the current file-size. (CVS 6271)
...
FossilOrigin-Name: b34bde80c7e2028baf7ba2ff26e587a63a170f3d
2009-02-09 18:55:45 +00:00
drh
0daa002c7c
Better error message when DISTINCT is used on an aggregate function that
...
takes two or more arguments. Ticket #3641 . (CVS 6269)
FossilOrigin-Name: e20bf384668bcde7c2f2152ca88e28cf65a02679
2009-02-09 13:19:28 +00:00
danielk1977
53b6028b9c
Attempt to reproduce ticket #3643 . No luck yet. (CVS 6267)
...
FossilOrigin-Name: 8f2f98d247b04ae6bda34621e9ccdba904f34ad7
2009-02-09 05:18:33 +00:00
danielk1977
03ab035796
Changes to the backup API: (1) if a negative number is passed as the second argument to backup_step(), this is interpreted as "copy all remaining pages" and (2) if backup_finish() is called after backup_step() fails with a BUSY or LOCKED error, then this error is also returned by backup_finish() (same handling as for other errors encountered by backup_step()). (CVS 6266)
...
FossilOrigin-Name: 9b8c8b18cf6b7d44d5fd64760537bc030097756b
2009-02-06 05:59:44 +00:00
drh
f4883888ca
Fix a test case that was still using the old pending_byte mechanism. (CVS 6265)
...
FossilOrigin-Name: 08ec4f2c394ec834c20bfce0d98bbe6b4ce2be65
2009-02-05 17:00:54 +00:00
drh
c7a3bb94c2
Make the pending byte adjustable via sqlite3_test_control() on all builds,
...
not just on test builds. (CVS 6263)
FossilOrigin-Name: e8f192e2a93350a136d86bd9caceff65f52f3513
2009-02-05 16:31:45 +00:00
drh
dc2c491525
Add "backup" and "restore" methods to the TCL interfaces and test cases
...
to exercise those methods. (CVS 6260)
FossilOrigin-Name: e420a3cedc7ee086a77cd719f6b9fb85415eb5f3
2009-02-04 22:46:47 +00:00
drh
b309becded
Simplify wording of backup API error message. Decapitalize some other
...
error messages. (CVS 6256)
FossilOrigin-Name: f92405afb649b698b735b423cd9195d4f8f137c9
2009-02-04 17:40:57 +00:00
danielk1977
8a569e2936
Ensure that thread001.test and thread002.test reset the global shared-cache-enabled setting before they finish. (CVS 6253)
...
FossilOrigin-Name: 416288a9fa39c7c4d9d414de18edc0423ed83794
2009-02-04 11:57:46 +00:00
danielk1977
651a52fac2
Do not attempt to use the sub-journal file descriptor if it is not opened (as in journal_mode=off mode). Ticket #3636 . (CVS 6252)
...
FossilOrigin-Name: 20bd76055463c85f62a450e368f4bcf7d2215f94
2009-02-04 10:09:04 +00:00
danielk1977
de06e9f230
Fix a bug in malloc.test causing the exclusive permutation to fail. Changes to test code only. (CVS 6251)
...
FossilOrigin-Name: 72745bde90a9b4ffae1496f1668e4bb0678bd400
2009-02-04 08:17:57 +00:00
shane
fbd60f826d
Changes to completely remove all floating point ops if SQLITE_OMIT_FLOATING_POINT defined. Note that w/o fp, date/time, round, nan, etc. are all gone or limited in functionality. Updated some of the test scripts to support missing fp and 64-bit functionality. Ticket #3029 . (CVS 6250)
...
FossilOrigin-Name: 5cef400023205b55152b91441acc78f9cd8d58a9
2009-02-04 03:59:25 +00:00
danielk1977
0410302e58
Commit first version of the 'backup' feature. (CVS 6241)
...
FossilOrigin-Name: 663479b417fc06ba1790a544f28694f8797cee57
2009-02-03 16:51:24 +00:00
drh
478000cf5c
Check-in (6230) introduced a bugs in SUBSTR() which was caught by the fuzz
...
tester. Fixed by this check-in. Related to ticket #3628 . (CVS 6234)
FossilOrigin-Name: cd2e7f6c0fe4c0c648f8ca21388ab0769164f5ef
2009-02-03 13:10:54 +00:00
drh
07d3117aed
Make group_concat() a 1- or 2-value function, as the documentation says it
...
should be. Use the md5sum() function to verify ticket #3179 , not
group_concat(). This undoes the ill-advised group_concat() change of
check-in (5233). (CVS 6233)
FossilOrigin-Name: f2ae82c4d46c2eca30fc60a50ab5064728f20739
2009-02-02 21:57:05 +00:00
drh
bdb339ff73
Omit the TEMP keyword from the schema of TEMP tables created using
...
CREATE TEMP TABLE AS SELECT ..... Ticket #3630 . (CVS 6232)
FossilOrigin-Name: 3b0a25548c4c15c86aadcd9a6c3af0adafb85c17
2009-02-02 18:03:21 +00:00
drh
65595cd60b
Update the SUBSTR function so that works consistently when the
...
2nd parameter is 0. Ticket #3628 . (CVS 6230)
FossilOrigin-Name: 5fc125d362df4b8525c7e1ab34a14f505756af24
2009-02-02 16:32:55 +00:00
drh
9373b01882
Restrict the RANDOM() function to have zero arguments. Ticket #3627 . (CVS 6229)
...
FossilOrigin-Name: b8b546b6ed799dc1621ef7b06273249af1042fb2
2009-02-02 01:50:39 +00:00
drh
8198d25442
Fix SUBSTR() so that it returns NULL if any argument is NULL.
...
Ticket #3626 . (CVS 6228)
FossilOrigin-Name: 779fce82b7a89b972da488ce8bd35e23ca120c04
2009-02-01 19:42:37 +00:00
drh
4e79c59454
Fix the SUBSTR() function so that when the 3rd argument is negative,
...
it counts backwards from the selected start point. Ticket #3625 . (CVS 6227)
FossilOrigin-Name: 2217339badf1e84edbed1309c39b9f8dfd7646ff
2009-02-01 19:23:32 +00:00
drh
a605fe8d8b
Change the replace() function to return a copy of its first argument when
...
the 2nd argument is an empty string. Ticket #3624 . (CVS 6226)
FossilOrigin-Name: ffebf10f6fb2c7f3083992e2c712682b4cdcc6f0
2009-02-01 18:08:40 +00:00
drh
c5cad1e350
Add a new test command, sqlite3_mprintf_long, for testing the behavior
...
of "long integer" printf formatting. Ticket #3621 . (CVS 6224)
FossilOrigin-Name: 3ba1a17b1306bc61b9861ec8d3b239e16a3081ba
2009-02-01 00:21:09 +00:00
drh
dfbc3a8a3b
Better error message when coalesce() has too few arguments. Ticket #3623 . (CVS 6222)
...
FossilOrigin-Name: 9cd43c82a3c123829806aa7bf14efdd29f4424d8
2009-01-31 22:28:48 +00:00
danielk1977
64beba4338
Avoid a segfault when running vacuum on an in-memory database. Ticket #3620 . (CVS 6221)
...
FossilOrigin-Name: 407830c6839a81fa0a1010940740df3011713a88
2009-01-31 14:54:06 +00:00
drh
c531a22377
Fix a round-off error when moving dates by negative modifier amounts.
...
Ticket #3618 . Enhance the "NNN years" modifier to accept fractional
years. (CVS 6220)
FossilOrigin-Name: 86be908c5e77ba2b9ac98e394fa987b443d790f8
2009-01-30 17:27:44 +00:00
shane
6a91ca06b8
In test case incrvacuum-15.1 close both db handles (db and db2) before attempting to delete test.db. Ticket #3614 . (CVS 6216)
...
FossilOrigin-Name: e764a7c5d369e2ff736d662b1209b3d54d778caf
2009-01-30 05:47:15 +00:00
drh
db15bcd550
Add test cases to make sure that keywords that we say can be used as
...
identifiers really can be used as identifiers. These tests were
inspired by ticket #3612 , but they do not directly address ticket #3612 . (CVS 6214)
FossilOrigin-Name: 6041ca87a16858f047727bc01f10b0bbc83609ed
2009-01-29 19:27:46 +00:00
danielk1977
25f42fe7a1
Remove incorrect ALWAYS macro associated with empty IN() sets. Ticket #3602 . (CVS 6202)
...
FossilOrigin-Name: f3c09a0cb8bfc1a112c31b556d8921d5c75c5eef
2009-01-24 09:56:15 +00:00