drh
e58b2b4a80
Fix a bad assert in RENAME COLUMN.
...
dbsqlfuzz 3f0a7245b69cd08617d7d7781ebaedb0fe765a93.
FossilOrigin-Name: f13e0d12f137cd6b4e83e92bd36652431d8416e6eed4797313e061f2e390d39b
2021-03-08 17:17:38 +00:00
drh
9e5fdc41c1
Release some restrictions on columns added by ALTER TABLE so that they
...
only apply if the table contains one or more rows.
FossilOrigin-Name: 3a16c0ce4d8851f79f670d94786032c8007619154ece44647dc9cc5b1f9654ff
2020-05-08 19:02:21 +00:00
drh
171c50ec38
New test-only SQL functions: implies_nonnull_row(), expr_compare(), and
...
expr_implies_expr(). The SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test-control
is modified to toggle internal function access on and off for a single
database connection.
FossilOrigin-Name: 473892a8eceacf24d57fd0c72ff2a0b8be4e0d75e0af7a30bdb24fbc3b453601
2020-01-01 15:43:30 +00:00
drh
175b8f06f7
Remove support for STAT3. The sqlite_stat3 tables are ignored, if they
...
exist. STAT4 continues to work as it always has, and as it is a superset of
STAT3 is the recommended replacement.
FossilOrigin-Name: 1e17ea2fd1df4ad49138c787c8fe3207dd0c25c93f9001d52a9b69f8c12e841c
2019-08-08 15:24:17 +00:00
drh
eea8eb6d04
Do not allow direct access to internal-use SQL functions such as
...
sqlite_rename_column() and sqlite3_rename_table() except when the
new SQLITE_TESTCTRL_INTERNAL_FUNCTIONS flag is set.
FossilOrigin-Name: 6e1330545e7b74fe5f1f20751a3425e2788441485fc07fcb7626e448c72027ce
2018-11-26 18:09:15 +00:00
drh
95f78d98b9
First proposed fix for the ALTER TABLE problem described by ticket
...
[b41031ea2b5372378cb3d2d]
FossilOrigin-Name: 05a9d129254e01a5f6b5e4033c105190eae386575a94b020ef3e0cbd30bbf056
2018-09-16 23:27:37 +00:00
dan
65372fa963
Improve the error messages emitted by RENAME TABLE.
...
FossilOrigin-Name: 6805b5900df5e6d3329cbad2660875ebe4069efe37b19575f527d153dc0882a1
2018-09-03 20:05:15 +00:00
dan
b87a9a8a5e
Fix a problem with renaming a column in a table that has a temp trigger that
...
references another attached database.
FossilOrigin-Name: 336b8a0923bf65b7a2c35811cb6dec0e262a0b31e534d2a6ab093d2afdb05c1f
2018-09-01 20:23:28 +00:00
dan
141e119a17
Ensure b-tree mutexes are always held when sqlite3FindTable() is called. Do
...
not invoke the authorizer callback when parsing schema items as part of ALTER
TABLE commands. Fix test script issues.
FossilOrigin-Name: eac2aa7dce577f1998cc2078dd8ac384070f8acf1ceb565999a5cf719092024e
2018-08-31 18:23:53 +00:00
dan
c9461ecc28
Extend RENAME TABLE to edit triggers and views. Still buggy.
...
FossilOrigin-Name: 01308bae3acf33f78b5bb90892085eab340df093aafc17e6ccf6a7d6cf324897
2018-08-29 21:00:16 +00:00
drh
e0a04a36a6
All temp.sqlite_master to be used as an alias for sqlite_temp_master.
...
FossilOrigin-Name: 8d646905b830d5bb29092e103ac5cb499b3c7e5a
2016-12-16 01:00:21 +00:00
dan
d68d1f4863
Fix an assert() failure that could occur if the internal sqlite3_rename_parent() SQL scalar function was invoked directly.
...
FossilOrigin-Name: 36e515261825be60ffdc73d13340d77cf377e8e1
2015-04-28 14:07:02 +00:00
drh
65b9ac5224
Make sure the undocumented sqlite_rename_parent() function does not
...
crash even if it is invoked with NULL arguments.
Ticket [264b970c4379fd4b94]
FossilOrigin-Name: c6fa8d0d82805be230f672eabccdfa5680d4ddfd
2014-04-14 19:48:25 +00:00
drh
ad124329ab
Some inserts and queries working for multi-column primary keys
...
and WITHOUT ROWID.
FossilOrigin-Name: b21d831b2aa55507dd9def2acb02cdbffddf10d1
2013-10-23 13:30:58 +00:00
drh
ec95c44175
Some simple inserts and queries working on WITHOUT ROWID tables.
...
FossilOrigin-Name: 3f8016dee24213ec83a02d71ad2698789cc3a818
2013-10-23 01:57:32 +00:00
drh
5969da4a2c
Simplification of the syntax: Merely append "WITHOUT rowid" to the end of
...
the table definition.
FossilOrigin-Name: 131cc6e152abe1a2d48e6d8d40d2c2f8dbe723e7
2013-10-21 02:14:45 +00:00
drh
81eba73ebf
Experimental changes toward "index only" tables. Add the ability to specify
...
options on CREATE TABLE statements using the WITH clause modeled after
PostgreSQL and SQL Server. Only the "omit_rowid" option is currently
recognized and that option is currently a no-op.
FossilOrigin-Name: 0248ec5e6e3797575388f046d8c27f7445fe2a39
2013-10-19 23:31:56 +00:00
dan
3fa2a82b8b
Reenable a test accidentally disabled when the stat4 branch was merged.
...
FossilOrigin-Name: d9fadc8fa6ef02d516678d57896d93e0a5f52cfe
2013-08-31 14:56:30 +00:00
dan
f52bb8d385
Begin adding experimental sqlite_stat4 table. This commit is buggy.
...
FossilOrigin-Name: 2beea303a1d609cd2ff252412c50b966b9e5e8f1
2013-08-03 20:24:58 +00:00
drh
0152268793
Fix ALTER TABLE RENAME so that it correctly handles triggers that attach
...
to the table using the name in a different case.
Ticket [ae6794effd404].
FossilOrigin-Name: 0d78ebb8e41ba08b446b44694d9433e1e90e0a7e
2012-02-01 01:13:10 +00:00
drh
74e7c8f51f
Purge lingering references to SQLITE_STAT2 from the code and test scripts.
...
FossilOrigin-Name: aed2bf7a3c828a7191389b3f8235a9387977b476
2011-10-21 19:06:32 +00:00
drh
50a1c56a2e
Update some test cases to work with sqlite_stat3 instead of sqlite_stat2.
...
FossilOrigin-Name: 2504bcfb0cf14b5ce51db0af1269ac28384714e0
2011-08-15 12:58:23 +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
33f5379c43
Changes to various test scripts so that they pass on windows.
...
FossilOrigin-Name: 1586244b6d86d5a98af8c6f7a8324672e02df9c3
2011-05-05 19:44:22 +00:00
dan
be53500356
Ensure that it is not possible to add a column to a system table using ALTER TABLE.
...
FossilOrigin-Name: d9707ef8dcd29667b6d366897f6ad02c87aa0041
2011-04-01 15:15:58 +00:00
drh
545f587fc8
When commands such as ALTER TABLE and VACUUM use SQL internally, make sure
...
they use only the built-in functions and not application-defined overrides
for those functions.
FossilOrigin-Name: 0291ed974d5bf1e344e2c38422530cc961b897da
2010-04-24 14:02:59 +00:00
drh
d9da78a2c8
Changes to insure that lookaside memory allocations are never used to hold
...
schema content.
Ticket #3743 . (CVS 6377)
FossilOrigin-Name: ea74d8dc62f5784089aa8ef098e97c505a79b176
2009-03-24 15:08:09 +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
7382945199
Fix the ALTER TABLE RENAME algorithm so that it is not confused
...
by comments in the CREATE TABLE statement. Ticket #3102 . (CVS 5110)
FossilOrigin-Name: ab18b4e75916b05863b31bc63625aa64a104a42c
2008-05-09 14:17:51 +00:00
drh
8e5b5f8e54
ALTER TABLE uses double-quotes for quoting table names. (CVS 4781)
...
FossilOrigin-Name: 607247c27b80520b8c25c489757288b8ea186f9e
2008-02-09 14:30:29 +00:00
danielk1977
61116ae1ca
Return an error if the user attempts to rename a view. Related to (but not a fix for) #2831 . (CVS 4623)
...
FossilOrigin-Name: 19d56d997f50be81ac2baace16b7e7a1b674301a
2007-12-13 08:15:30 +00:00
drh
598f134020
Floating point and 64-bit integer constants store in the virtual
...
machine opcodes in binary, not as text. Performance improvement.
Ticket #2733 . (CVS 4507)
FossilOrigin-Name: 7e30fd6a09899842c922b044714dc66796e545d4
2007-10-23 15:39:45 +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
7e326c09c2
Make sure pParse->rc gets set whenever sqlite3ErrorMsg() is called. This is
...
added insurance that parsing will stop quickly after an error. This change
did make the parser stop faster in some cases, which required some revisions
to tests. (CVS 4010)
FossilOrigin-Name: f84d9dab110c4415d9b772f8043397640162b6b2
2007-05-15 16:51:37 +00:00
drh
9a087a99e5
Relax the restriction on using bytes 0x80 through 0xbf as the first
...
character of an identifier. Enhancements to ALTER TABLE tests for
tables with strange names or stange column names. (CVS 4008)
FossilOrigin-Name: 262a3e6339b31f269f8f07e43d295b90827e2779
2007-05-15 14:34:32 +00:00
drh
eab7f3fe8d
Do not allow bytes 0x80 through 0xBF to be the first character of an
...
identifer because no valid UTF-8 character can begin with those bytes.
If we allowed an identifier to begin with one of those bytes, then the
substr() function in ALTER TABLE will not work correctly. (CVS 4003)
FossilOrigin-Name: 252810424d8c4dcd19b369d62027094df7cf0bcc
2007-05-15 09:00:14 +00:00
drh
4e5dd85135
Fix problems in ALTER TABLE that occur when column or table names are
...
invalid UTF encodings. (CVS 4000)
FossilOrigin-Name: 9ff382f4584ff685a78b39f24424319709efb382
2007-05-15 03:56:49 +00:00
drh
2a9abf61c7
Make sure the parser aborts quickly following a syntax error. (CVS 3996)
...
FossilOrigin-Name: d07cdd3c096c120d104ae13f7932c0a955324517
2007-05-15 00:09:13 +00:00
danielk1977
dce872b94e
Do not crash in the internal functions sqlite_rename_table() or sqlite_rename_trigger() if they are somehow passed unexpected input. (CVS 3944)
...
FossilOrigin-Name: c2f90b465e37ea49c9e44415f6461e4f636bb64f
2007-05-08 12:37:45 +00:00
drh
05f7c19a6e
Test coverage improvements. Over 90% of branches are now executed in
...
both directions. (CVS 3820)
FossilOrigin-Name: a776d93ccae3bfa6e992cdd1387571dd21561f98
2007-04-06 02:32:33 +00:00
drh
945498f3f2
Make sure that integer values are converted to real when pulled from
...
a REAL table column by GROUP BY. Ticket #2251 . Also make sure default
values are correctly expanded. There may be other places in the code
where this issue comes up - we need to look further. (CVS 3659)
FossilOrigin-Name: e11bbf174c5a2fa75e3d1dd450c8b2a18f40e4da
2007-02-24 11:52:52 +00:00
drh
ff22e18b3c
Correctly handle COLLATE clauses in tables being modified by an
...
ALTER TABLE ADD COLUMN command. Ticket #1665 . (CVS 3060)
FossilOrigin-Name: baef2f66be164910881278ea527d2be75ac2e944
2006-02-09 02:56:02 +00:00
danielk1977
3bdca9c9a5
Test suite fixes for builds that define OMIT symbols. (CVS 2962)
...
FossilOrigin-Name: 3a54a33dcb7e765ee3773397407e8929a8cfe1a9
2006-01-17 09:35:01 +00:00
danielk1977
819d7f4735
Correctly set the length of the string in bytes when transforming an OP_String8 to OP_String in a utf-16 vdbe program. (CVS 2949)
...
FossilOrigin-Name: 69f996e0fac1dc50b8c43d5fa132f79776843819
2006-01-15 14:11:48 +00:00
danielk1977
1576cd9251
Fixes for OMIT_SUBQUERY builds: Disable where clause OR->IN optimization. Include EXISTS keyword (for new CREATE TABLE syntax). Test file fixes. (CVS 2943)
...
FossilOrigin-Name: 8e79a0c24a03ccf960d6ccfb7c6b9b0f7c614e9b
2006-01-14 08:02:28 +00:00
danielk1977
79f27df664
Account for multi-byte characters in ALTER TABLE code. Fix for #1609 . (CVS 2942)
...
FossilOrigin-Name: d634f8b28abd7af4565c644bd7972b067caa0133
2006-01-13 18:06:40 +00:00
drh
dddca28608
The sqlite TCL command no longer returns the hex address of the sqlite3*
...
structure. Instead there is a new command in testfixture to find that
information. (CVS 2852)
FossilOrigin-Name: 70b228575e045bc56013aab945334203ceb31d8b
2006-01-03 00:33:50 +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
2b6d46b975
Tighten up the CREATE INDEX syntax accepted by the parser. (CVS 2329)
...
FossilOrigin-Name: 41d2214b83dd52acdda64a50d0c1ef16009d06d0
2005-02-14 06:38:40 +00:00
danielk1977
81e9674ba6
Test that it is ok to execute ALTER TABLE immediately after opening a database connection. (CVS 2281)
...
FossilOrigin-Name: 1d5ebb1146cc6e59d8b419b3fa4796552111606d
2005-01-27 00:30:52 +00:00