1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-04 04:22:36 +03:00

19158 Commits

Author SHA1 Message Date
drh
294fb92b50 Fix an uninitialized variable that could cause problems when comparing
two NULLs. (CVS 757)

FossilOrigin-Name: 015425001813971f6d4c97c18d64c7f14fa1955f
2002-09-30 01:31:21 +00:00
drh
a226d05408 Bug fix: When multiple SQL statements were passed into a single sqlite_exec() call, execution speed would decrease for each statement executed because VDBE cursors were not being reused. Now the cursors are reused and execution time is linear. (CVS 754)
FossilOrigin-Name: b0d27a377a9f6134f81108fe45c8c868ab4d4411
2002-09-25 19:04:07 +00:00
drh
df68f6b768 Make sure memory malloced() for structures is aligned on an even byte boundry.
Solaris segfaults otherwise. (CVS 753)

FossilOrigin-Name: 14ebe30bf5937effdc388e23e998ba1a34fb0a29
2002-09-21 15:57:57 +00:00
drh
3e56c04c4e Fix a bug in the OP_MemStore operator of the VDBE. A realloc() might
occur but pointer to the old buffer were not being moved over to
the new buffer. (CVS 752)

FossilOrigin-Name: 29145746f34438bd830c763872c5e82572150357
2002-09-17 03:20:46 +00:00
drh
995d71b715 Modify the sqlite_encode_binary() routine to return the strlen() of the
encoded string.  Also fix a bug that occurs when attempting to encode
a zero-length buffer. (CVS 751)

FossilOrigin-Name: f12c3a25ba5408c2a7c846a9f160416fd188cd26
2002-09-16 11:44:05 +00:00
drh
cabb081971 Do not put a write lock on the main database file when writing to a temporary
table. (CVS 750)

FossilOrigin-Name: 3f253afe15d4f7392555f340a41d780d1248087f
2002-09-14 13:47:32 +00:00
drh
ac82fcf5f0 Fix for ticket #147: Honor the ORDER BY and LIMIT clauses in a SELECT even
if the destination of that SELECT is a subroutine call. (CVS 747)

FossilOrigin-Name: 23fe36c7e88282f6d1b7547ab892ea88f0e65262
2002-09-08 17:23:41 +00:00
drh
8f619ccd3c Modify the build process so that the VDBE opcode numbers and the table
that contains the opcode names are both automatically generated. This makes
it much easier to create new VDBE opcodes. (CVS 746)

FossilOrigin-Name: eb54d455b0325d3be96daf6c220c4ee3e0da1a85
2002-09-08 00:04:50 +00:00
drh
8c90ebb0e2 Fix a memory leak that occurred when sqlite_open() failed. (CVS 745)
FossilOrigin-Name: a876021304a5de7ede1bf835971da7e328d1af07
2002-09-05 23:21:37 +00:00
drh
96ddd6db58 Rewind the checkpoint journal after each statement to avoid allowing
the file to become too large. (CVS 744)

FossilOrigin-Name: f4288520dfd1587446e50fa7ef23f75f6f63a7cf
2002-09-05 19:10:33 +00:00
drh
4e371ee41c Fix for ticket #146: Correctly handle reads of unused disk blocks at the
end of the file. (CVS 743)

FossilOrigin-Name: f5c2654768a6201fc554b59f1b2f56bcce738bc4
2002-09-05 16:08:27 +00:00
drh
b798fa6481 Always fill in the 5th parameter to sqlite_exec if there is an error. (CVS 742)
FossilOrigin-Name: 7f8fd5c75d614f81ef87f0fc952c341cbc5076d0
2002-09-03 19:43:23 +00:00
drh
f74b8d9b89 Relax the locking requirements on BTree cursors. Any number of read and
write cursors can be open at the same time now, but a write cannot occur
as long as one or more read cursors are open.

Before this change, one or more read cursors could be open on a table,
or a single write cursor, but not both.  Both policies have the same
desirable effect: they prevent writes to a table while a sequential scan
of that table is underway.  But the new policy is a little less restrictive.
Both policies prevent an UPDATE from occurring inside a SELECT (which is
what we want) but the new policy allows a SELECT to occur inside an
UPDATE. (CVS 739)

FossilOrigin-Name: 8c2a0836980341faa479cfe6c716409e6057367d
2002-09-01 23:20:45 +00:00
drh
c2eef3b32b Parse foreign key constraints and populate internal data structures
appropriately.  Constraints are still not enforced. (CVS 738)

FossilOrigin-Name: 170711ca65dc894d0486b9d575edb8f1708250fb
2002-08-31 18:53:06 +00:00
drh
1e0ccab9f0 If the database is locked when sqlite_open() is called, sqlite_exec() should
still honor the busy callback and should return an error message together
with the SQLITE_BUSY result code. (CVS 733)

FossilOrigin-Name: 78a0229a7e5e33fe642847381f5514e6ec30f29f
2002-08-29 23:59:47 +00:00
drh
142e30df99 Slightly faster INSERTs from a SELECT by avoiding an intermediate table.
But it didn't make nearly as much difference as I had hoped. (CVS 732)

FossilOrigin-Name: 723362e74f79c784314d042e3a8c8a9bf07cbd5e
2002-08-28 03:00:58 +00:00
drh
66105a8ea0 Change the tokenizer to ignore C-style comments /*...*/ in accordance with
SQL99. (CVS 731)

FossilOrigin-Name: f1534489484afdb835ad8e6f97909fbe76dbe414
2002-08-27 14:28:29 +00:00
drh
da30d3696b Fix for ticket #142: Make sure we get the correct sort order even when the
columns being sorted contain NULLs. (CVS 730)

FossilOrigin-Name: 45847390d007718a4b7a4e9fa445136d013113f8
2002-08-26 19:55:07 +00:00
drh
8c74a8ca5b Fix for ticket #136: Added the OP_RenameCursor VDBE instruction and used it
to make cursor numbers right on nested subqueries.  Also added OP_Gosub and
OP_Return but have not actually used them for anything yet. (CVS 727)

FossilOrigin-Name: c602603e7cd8dc5c8bb9db2748eacab650de5bf0
2002-08-25 19:20:40 +00:00
drh
d94a669894 Fix the memory leak introduced by check-in (725). (CVS 726)
FossilOrigin-Name: b957dafc26383af514795df18bc7b8f367c9bd21
2002-08-25 18:29:11 +00:00
drh
4b59ab5e64 Change the way token memory is allocated in an effort to fix ticket #136.
There is now a memory leak when using views of views. (CVS 725)

FossilOrigin-Name: 22d8726e61eec0e53893f492cb2163824b87a23e
2002-08-24 18:24:51 +00:00
drh
bd842babb5 Fix for ticket #137: Use getpwuid() instead of getpwent(). (CVS 723)
FossilOrigin-Name: ea011990c552a7a6019b63f9b4341ad6c8663479
2002-08-21 11:26:41 +00:00
drh
f04d5081a7 This COLLATE keyword was not being parsed correctly inside CREATE TABLE
statements - it was being included as part of the datatype.  This fixes
the problem. (CVS 722)

FossilOrigin-Name: 39bd52d33029233d4b22df08975e9ef3c74c260f
2002-08-18 22:41:22 +00:00
drh
6b8b8749d4 Fix for ticket #110: return an error if trying to start a transaction within a
transaction or when attempting to commit or rollback outside of a transaction. (CVS 721)

FossilOrigin-Name: df51cb166bf7c5b8b0530cc86df8d2d68de81a40
2002-08-18 20:28:06 +00:00
drh
cb48588297 Fix for ticket #135: Remove unused variables from three files. (CVS 719)
FossilOrigin-Name: 8cf17f2a24ee9bd5d1ea66484922819626c412dd
2002-08-15 13:50:48 +00:00
drh
3d037a91a5 Fixes and test improvements resulting from code coverage testing. (CVS 716)
FossilOrigin-Name: 66a0f6a8e25e3eeed78eba4b63b097f921c79d99
2002-08-15 01:26:09 +00:00
drh
d1efac52d5 Implement probabilistic reader/writer locks under windows so that windows
can have multiple simultaneous readers. (CVS 714)

FossilOrigin-Name: 2127de3f03537ef2f18120e773f7603e0984ff81
2002-08-14 12:56:54 +00:00
drh
c330af1dca Disable sorting by indices if there is a COLLATE subclause in the
ORDER BY clause. (CVS 713)

FossilOrigin-Name: 2438da791afb53b4f1c7a9ff9705d393c86f3cbd
2002-08-14 03:03:57 +00:00
drh
0c44e2edf3 Fix for ticket #132: make the working directory the last choice for where
to write temporary files, not the first choice. (CVS 712)

FossilOrigin-Name: 26a4e7e7a3eee62c170ce264cb964a92bc7f52c9
2002-08-14 00:10:44 +00:00
drh
a9e99aee95 Make the distinction between text and numeric data. (CVS 710)
FossilOrigin-Name: 310ac4fbaf0ed63f98bfacb55259960be03b0c8b
2002-08-13 23:02:57 +00:00
drh
76800328b2 Documentation and makefile updates. (CVS 709)
FossilOrigin-Name: 92c403f485390bbd83a5be472e61c974f76d46b1
2002-08-13 20:45:39 +00:00
drh
7f09b3e36b Bug fix to the left outer join logic. (CVS 1726)
FossilOrigin-Name: 957d908e6b84cd599b5cfd82af80c8fac79c1dbd
2002-08-13 13:15:49 +00:00
drh
74587e5567 Updates prior to release 2.6.3. (CVS 706)
FossilOrigin-Name: 34c4149eea7a48927e36867f4e25ff7fac40c66e
2002-08-13 00:01:16 +00:00
drh
94f3331a0b Fix for ticket #9 (again). The rollback journal files should now also be
byte-order independent. (CVS 705)

FossilOrigin-Name: 2fb3fdcdf06c1206bf14da640c2f9e599455f0eb
2002-08-12 12:29:56 +00:00
drh
0d316a40cc Fix for ticket #9: Add the ability to read little-endian database files
from a big-endian machine and vice versa. (CVS 704)

FossilOrigin-Name: ce4b943bf68c160445a58ffccfbabbbd30d9829b
2002-08-11 20:10:47 +00:00
drh
68d2e5918a Fix for ticket #131: When a SELECT contains a GROUP BY clause it cannot
use an index for sorting.  It has to sort as a separate operation after
the GROUP BY is complete. (CVS 702)

FossilOrigin-Name: 18745c67acdf7ebec378f5538174117970e9f5cc
2002-08-04 00:52:38 +00:00
drh
e0e5ef1471 Remove the restriction that a transaction cannot be started by one linuxthread
and continued by another.  Leave in the documentation the warning about not
carrying a database connection across fork() but do not test for it any more.
Ticket #130. (CVS 701)

FossilOrigin-Name: bdbdb866f2e76abd1f8f545adadc9a900ed0cd1a
2002-08-02 10:36:09 +00:00
drh
f1351b6759 Fix for ticket #124: Fix a stack VDBE overflow problem on joins on an
INTEGER PRIMARY KEY. (CVS 700)

FossilOrigin-Name: fe329e078fa209faf62e08599a00c7efa75b8501
2002-07-31 19:50:26 +00:00
drh
f573c99ba7 Fix for ticket #104: Make triggers on views work properly even after closing
and reopening the database.  Also fixed an unrelated bug in the version
2.6.0 database format upgrade logic.  The upgrade logic bug was found while
testing the trigger fixes. (CVS 697)

FossilOrigin-Name: 04973fc2a6a0c93877de7e564618e0e9fcffc06c
2002-07-31 00:32:50 +00:00
drh
92ed08a9d7 Fix for ticket #114: Correctly handle SQLITE_BUSY if it occurs during
database initialization. (CVS 696)

FossilOrigin-Name: 5b814b5df667ccc91d85fbb7f96e523483e9219b
2002-07-30 18:43:40 +00:00
drh
62160e798c Fix for ticket #71: Correctly handle CR and CRLF line terminators in the
input files for the COPY command. (CVS 694)

FossilOrigin-Name: be1315755ef801b5ec07f469134e0d33a3ece990
2002-07-30 17:20:40 +00:00
368c7f6df1 UPDATE triggers on TEMP tables were broken. (CVS 693)
FossilOrigin-Name: c080ed01ea51628b86050762f097e702e3aeafdf
2002-07-21 23:09:55 +00:00
drh
096c497eb3 Rig the ident string so that it is not changed by RCS on checkin. (CVS 692)
FossilOrigin-Name: 773d36c8d94bdcd0c78401282e48432ddd9b61d6
2002-07-19 19:03:41 +00:00
drh
26b3e1bc06 Fix an assertion failure that occurs when attempting to delete all rows of
a table while the "count_changes" pragma is turned on.  Up the version number
to 2.6.1. (CVS 690)

FossilOrigin-Name: 612df004017b241651074ee859096dd0ee5062b8
2002-07-19 18:52:40 +00:00
drh
426cc56a6b Add static ident strings (such as picked up by the RCS "ident" command)
containing the library version number. (CVS 689)

FossilOrigin-Name: 712ee3914e988f0077e9a3d6170ff8db496a9600
2002-07-19 18:13:35 +00:00
drh
c231172f3f Better detection and reporting of errors when initializing from the
sqlite_master table. (CVS 688)

FossilOrigin-Name: c8a7b725b7cec792d2148455a4cecbce9dfebe80
2002-07-19 17:46:38 +00:00
drh
199e3cf1b6 Change the name of variable "near" to "nearby" since MSVC mistakenly belieaves
that "near" is a keyword. (CVS 685)

FossilOrigin-Name: 9761a2a0fbfd3e98f719a813bcc544950968aef2
2002-07-18 11:01:47 +00:00
drh
8e5ba84643 Make the automatic database upgrade work even if there are triggers. Add
tests for automatic upgrade and for failing if reading a more advanced version
of the database.  Ticket #107. (CVS 682)

FossilOrigin-Name: 0493e39c1cbbe4a38e990a2370181a79606af222
2002-07-18 01:27:17 +00:00
drh
491791a827 Fix for ticket #107: Fix a design defect in indices that was causing queries
to fail when using an index on a column containing an empty string.  This
fix is an incompatible file-format change. (CVS 681)

FossilOrigin-Name: 20d152fcddb4fa53556a9c93c7a869600a7c5183
2002-07-18 00:34:09 +00:00
drh
53e3fc70bf Fix for ticket #105: Fix the UPDATE command so that it works properly with
indexed tables when there is a subquery in the WHERE clause.  Add tests
to verify correct operation. (CVS 680)

FossilOrigin-Name: bbca16f88d00cd33ac7229edf3ee4623eff6e62f
2002-07-16 17:22:50 +00:00