drh
6ab91a7a7a
Add the SQLITE_DEFAULT_DEFENSIVE compile-time option. Fix up test cases
...
so that they work with DEFENSIVE enabled.
FossilOrigin-Name: 3212733cb6d1a59516d67a86df7c7b1d2456a1b2e5d7080c26b0e87b2609c65d
2018-11-07 02:17:01 +00:00
drh
3c03afd3f5
When running a CREATE TABLE AS, make the initial temporary sqlite_master entry
...
for the new table a real record rather than a NULL, in case the query after
the AS actually tries to read the sqlite_master table.
Fix for ticket [acd12990885d9276].
FossilOrigin-Name: 4a18d8bd4cc66eb08c6198cdf6e14f1bce0ec05a
2015-09-09 13:28:06 +00:00
drh
0dd5cdaea5
Ensure that the CREATE TABLE AS statement correctly undoes partial changes
...
to the sqlite_master table if the SELECT on the right-hand side aborts with
an error. Fix for ticket [873cae2b6e25b]
FossilOrigin-Name: 400e025e7c61efab71b891743c07a0862e5bb934
2015-06-16 16:39:01 +00:00
drh
97ab32bcd3
Remove unnecessary parser error count increments. Let the sqlite3ErrorMsg()
...
take care of doing that.
FossilOrigin-Name: 3f3b0f683af2fbee83811536f6bef770ff919385
2015-04-17 18:22:53 +00:00
drh
6b5631e02f
Make sure that NULL results from OP_Column are fully and completely NULL
...
and do not have the MEM_Ephem bit set. Fix for ticket [094d39a4c95ee4].
FossilOrigin-Name: 42705fd7d892c4fdfb95fbbb468c99569beece25
2014-11-05 15:57:39 +00:00
drh
0c4de2d96d
A simpler fix for ticket [3a88d85f36704eebe1] - one that uses less code.
...
The error message is not quite as good, but as this error has apparently
not previously occurred in over 8 years of heavy use, that is not seen as
a serious problem.
FossilOrigin-Name: 0ad1ed8ef0b5fb5d8db44479373b2b93d8fcfd66
2014-08-06 00:29:06 +00:00
drh
1cfc9aa993
Ensure that aggregate functions are not used when evaluating a default
...
value for a table column.
Candidate fix for ticket [3a88d85f36704eebe134f7].
FossilOrigin-Name: 29ba812825bf06ef230f2480bba0579653f0a52d
2014-08-05 21:31:08 +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
dan
8ad169abb4
If ENABLE_STAT3 is defined but ENABLE_STAT4 is not, have ANALYZE create and populate the sqlite_stat3 table instead of sqlite_stat4.
...
FossilOrigin-Name: cca8bf4372ab7a0258aa5c9397818415c6cf0abf
2013-08-12 20:14:04 +00:00
dan
c55521a60b
Fix a couple of problems in code related to sqlite_stat4.
...
FossilOrigin-Name: badd24d987240db5528b37d1c177431617079f9b
2013-08-05 05:34:30 +00:00
drh
08ccfaa1b1
Change the ANALYZE command so that it no longer tried to delete unused
...
sqlite_stat2 and sqlite_stat3 tables. Change the DROP TABLE command so
that it is able to drop those tables.
FossilOrigin-Name: 589f3f5652e3674d3203f8bd32784a46b5ed530c
2011-10-07 23:52:25 +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
drh
d0b2677b78
Unset some global TCL variables prior to use in test where prior tests can
...
have those same variables set to an array value.
FossilOrigin-Name: 49bef00e5cda600ceb964148bf745de4aff1ab62
2010-05-03 19:20:46 +00:00
drh
dda70fe38e
Remove leftover "breakpoint" commands from test scripts. Also remove blank
...
lines at the end of scripts. (CVS 6721)
FossilOrigin-Name: 1fef16ec2b89981770cf44f606a420fbe031a7a4
2009-06-05 17:09:11 +00:00
drh
c4a64facce
Rework the logic that generates a schema for tables created using
...
"CREATE TABLE ... AS SELECT ...". Instead of trying to copy the raw
datatype string from the right-hand side, just make the type one
of TEXT, INT, REAL, NUM, or nothing. This is much simpler than
trying to parse and quote datatype strings. Other minor
implifications to build.c are bundled with this change. (CVS 6626)
FossilOrigin-Name: 33cf83591e6e13875ef6ada5b8ac8ab07619d8bc
2009-05-11 20:53:28 +00:00
drh
8a1e594c9f
Simplifications to the symbol table implementation in hash.c. For very small
...
symbol tables (less than 10 entries) a simple linked list is used instead
of a hash table. Number of hash table buckets is limited to prevent large
allocations. (CVS 6559)
FossilOrigin-Name: 5c737835dec9e6038b304c198aa14337a6f23c1c
2009-04-28 15:43:45 +00:00
danielk1977
1b870de6b0
Fix for #3719 . When synthesizing a CREATE TABLE statement as as result of a "CREATE TABLE AS", quote the column type names unless they are simple identifiers or simple identifiers followed by one or two dimensions (e.g. "VARCHAR(10)"). (CVS 6345)
...
FossilOrigin-Name: 7c6437efe0a0e935cfa8041bd6b94070c8654fa4
2009-03-14 08:37:23 +00:00
danielk1977
78c2e6d837
Allow recently added keywords 'savepoint' and 'release' to be used as database object names. Just as they could be prior to 3.6.8. Ticket #3590 . (CVS 6186)
...
FossilOrigin-Name: 54ab8326a1ea574b183f84c8465315e989a23ca4
2009-01-16 11:04:58 +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
drh
b7af4452d9
Allow CREATE TABLE to occur while other queries are running. DROP TABLE is
...
still prohibited, however, since we do not want to delete a table out
from under an running query. (CVS 3902)
FossilOrigin-Name: 5b4bf1fce4d589337cfb1b46d75c751bbdc607d5
2007-05-02 17:54:55 +00:00
drh
9645d8d4b3
Remove use of the "clock" command in the test suite so that the tests
...
will run in Tcl8.5. Ticket #1445 . (CVS 3380)
FossilOrigin-Name: bedbac54db173ceb74bd78acd021209f28aa30a8
2006-09-01 15:49:05 +00:00
drh
e4df0e7497
Properly record the names of triggers even if the name is quoted.
...
Ticket #1737 . (CVS 3158)
FossilOrigin-Name: 4ba280ddd66d5cbf617263d6300b7582f65d47a9
2006-03-29 00:24:06 +00:00
drh
a6370df1e1
Bug fix in the IF NOT EXISTS logic. (CVS 2858)
...
FossilOrigin-Name: cb9095ac52e76926f274678ef55ebb9df4b9fcac
2006-01-04 21:40:06 +00:00
drh
faa59554c3
Add support for CREATE TABLE IF NOT EXISTS. (CVS 2847)
...
FossilOrigin-Name: 0bd9e35fd22946640f4fb1c1874922ae096916f7
2005-12-29 23:33:54 +00:00
drh
a073384f08
Add support for DROP TABLE IF EXISTS. (CVS 2843)
...
FossilOrigin-Name: a4c547de83d8b27f06a58f9e530a7c983ec1dc3a
2005-12-29 01:11:36 +00:00
drh
d891967052
Avoid a memory leak and/or assertion failure when parsing a table
...
declaration that contains a duplicate column name.
Ticket #1418 . (CVS 2684)
FossilOrigin-Name: f43427742b1c086f2621c900f4ede1a34a8b44ee
2005-09-10 15:35:06 +00:00
drh
42b9d7c561
Fix a memory leak that occurs when a CREATE TABLE that contains a
...
DEFAULT VALUE fails due to a name conflict. Tickets #1356 and #1357 . (CVS 2584)
FossilOrigin-Name: 25cfe9390dda79bb2a7740b3d7380f517a4e8d1b
2005-08-13 00:56:27 +00:00
danielk1977
53c0f7480b
Add the SQLITE_OMIT_TEMPDB compile time macro. (CVS 2427)
...
FossilOrigin-Name: c41d55443c2dd532147962b87f542fb7d37075fd
2005-03-29 03:10:59 +00:00
danielk1977
a21c6b6fe0
Modifications and bugfixes so that the test suite passes with the TCL statement cache turned on. (CVS 2271)
...
FossilOrigin-Name: d5233e0747789dea04d35a8350b408321d23a64d
2005-01-24 10:25:59 +00:00
danielk1977
32554c10d0
Test script changes: Bug fix and cleanup on ioerr tests. Also, don't use TCL "file copy" command on windows. (CVS 2264)
...
FossilOrigin-Name: 764b55adb5dff944db36d0d19ce5e7cc758b3a9e
2005-01-22 03:39:39 +00:00
danielk1977
3e8c37e7f8
Modify test scripts to work when SQLITE_OMIT_SUBQUERY (along with other OMIT macros) is defined. (CVS 2251)
...
FossilOrigin-Name: bb0254ab14417f0ab40f10f37cb63a60507f070a
2005-01-21 03:12:14 +00:00
drh
251b067ccd
fulltest runs now, but still finds a memory leak. (CVS 2150)
...
FossilOrigin-Name: 5944d51e6c164270301b57e4351add4cb6137be6
2004-11-23 22:16:39 +00:00
danielk1977
ae82558bd0
Fix a bug involving balance_shallow() and the sqlite_master table. (CVS 2143)
...
FossilOrigin-Name: 557be3ff5b1c46a3f3836ea3a9d9dede5dc46998
2004-11-23 09:06:55 +00:00
danielk1977
e6efa74b9f
Ensure tables cannot be created/dropped when btree cursors are open. (CVS 2085)
...
FossilOrigin-Name: 8e5c2e5df8b824f7efb27e776240f005c6f1f0ff
2004-11-10 11:55:10 +00:00
danielk1977
752e679a1e
Have "DEFAULT CURRENT_TIME" & co. work even if SQLITE_OMIT_DATETIME_FUNCS is defined. (CVS 2083)
...
FossilOrigin-Name: f81b9c1c022772378aad32ec45d0027beeb36574
2004-11-09 16:13:33 +00:00
danielk1977
7977a17f06
Port the "DEFAULT CURRENT_TIME" etc. functionality from an earlier fork of sqlite. (CVS 2082)
...
FossilOrigin-Name: 0d27c8ff48f327ad82dd5b5b3b47b8d221f119b7
2004-11-09 12:44:37 +00:00
drh
6bf895708c
Update tests to work even if some features of the library are disabled. (CVS 2050)
...
FossilOrigin-Name: b11fc9b3f3a2711f98e7e45724aa1d30081197f3
2004-11-03 16:27:01 +00:00
drh
234c39dff7
Progress towards getting prepared statements and CREATE and DROP to play
...
nicely together. Work is incomplete. Some tests are known to fail. (CVS 1864)
FossilOrigin-Name: 49b991492496e104f5eca620a5d465a742b7ff3a
2004-07-24 03:30:47 +00:00
danielk1977
00e279d9f7
Update sqlite3_column_decltype() to return NULL as the declartion type for
...
an expression that is not a column reference. (CVS 1646)
FossilOrigin-Name: ee9dffd986621490af7bd45c7fe070bb7da8c357
2004-06-21 07:36:32 +00:00
drh
ef4ac8f9df
Change the name of the TCL command from "sqlite" to "sqlite3" so that both
...
SQLite version 2 and SQLite version 3 can be used by Tcl at the same time. (CVS 1626)
FossilOrigin-Name: d705d051bed2b92b6c3bbcc75fe5b056633b9c31
2004-06-19 00:16:31 +00:00
danielk1977
d8123366c4
(1) Modifications to the user-function interface and (2) Internal changes
...
to automatically created indices. (CVS 1575)
FossilOrigin-Name: 5903f53828b5d282b33e27813417e4317c9ecf0b
2004-06-12 09:25:12 +00:00
danielk1977
517eb64616
Tables created with the CREATE TABLE <tbl> AS SELECT ... syntax now inherit
...
column declaration types from the SELECT statement. (CVS 1538)
FossilOrigin-Name: 31c1668dbc2b84438a5b78b0270f58b37b03791d
2004-06-07 10:00:31 +00:00
danielk1977
35bb9d026e
Update the typeof() operator to respect manifest types. (CVS 1450)
...
FossilOrigin-Name: 162cf42e33691f4c9ec3a25abcaa2bdcdca2b5e0
2004-05-24 12:55:54 +00:00
drh
a34a84fe1a
Get more tests running. (CVS 1409)
...
FossilOrigin-Name: 7eb3f29e305d0f455f6544560c567fa6b6e24986
2004-05-19 21:09:31 +00:00
drh
483750ba8a
Better error messages on constraint violations. Additional tests and bug fixes
...
for the callback-free API. (CVS 854)
FossilOrigin-Name: ccc82f1ab4539a60ee5cc2625743c5389f9ccd8e
2003-01-29 18:46:51 +00:00
drh
428ae8cb41
Optimizations to the BTree module for a modest speed improvement. (CVS 810)
...
FossilOrigin-Name: 39902a70417475225956704a037493515e9b08b9
2003-01-04 16:48:09 +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
a9e99aee95
Make the distinction between text and numeric data. (CVS 710)
...
FossilOrigin-Name: 310ac4fbaf0ed63f98bfacb55259960be03b0c8b
2002-08-13 23:02:57 +00:00
drh
38640e15af
All the code is now in place for SQLite to distinguish between NUMERIC and
...
TEXT datatypes. Still need to turn on the new code and test it. (CVS 659)
FossilOrigin-Name: b4737a16c997a6c139d616211fb6bc4b0fae181c
2002-07-05 21:42:36 +00:00
drh
04738cb9ff
Add the ability to parse FOREIGN KEYs. Foreign keys are still ignored,
...
but at least they now do not cause a syntax error. (CVS 603)
FossilOrigin-Name: 6fdcee3c99e994ef3ab83a0cc57344cdb16210df
2002-06-02 18:19:00 +00:00