1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00
Commit Graph

19257 Commits

Author SHA1 Message Date
drh
e98d4fafe4 Fix for ticket #21 (I think): Do not return an "out of memory" error if we
can not find the users home directory. Instead, just report that we could
not find the home directory. (CVS 540)

FossilOrigin-Name: 8a50c57cc3342de9c6eca6c2567d3aa42b407f10
2002-04-21 19:06:22 +00:00
drh
0ac6589202 Fix for ticket #1: Implement the GLOB and LIKE operators as functions that
can be overridden.  This way, a developer can change the LIKE operator to
be case sensitive, for example. (CVS 537)

FossilOrigin-Name: 51572bf71774d7631c7083be90b806e621bc9bee
2002-04-20 14:24:41 +00:00
drh
67505e78c6 Add support for saving the sqlite shell command-line history across sessions. (CVS 536)
FossilOrigin-Name: ca4abf3fe1f0e66802f9f98a20e0c8b82a6459aa
2002-04-19 12:34:06 +00:00
persicom
c8cacb3704 Added rights release for Matthew O. Persico (CVS 535)
FossilOrigin-Name: 6c32c07e8218caffebd4503e7d8a90226ac81cdc
2002-04-19 01:00:12 +00:00
drh
dd45df8a5b Change shell.c so that it will compile under windows. Shorten the help
command somewhat.  Add the state of ".header" to the output of ".show". (CVS 534)

FossilOrigin-Name: 0582168b8b853559b484f4a024d28c67192160c4
2002-04-18 12:39:03 +00:00
persicom
1d0b872d43 Mistake in help text. Spurious trailing whitespace removed. (CVS 532)
FossilOrigin-Name: 4bdd040e4810565c91bcbb5f065580520c5e3c45
2002-04-18 02:53:04 +00:00
persicom
7e2dfdd726 General:
o Added global static chars mainPrompt and continuePrompt.
o Moved Argv0 declaration to head of file. Needed in do_meta_command,
  previously found below that.
o Added struct previous_mode_data to support new .explain toggle
  functionality.
o Added nullvalue, explainPrev and outfile members to
  struct callback_data.
o Added modeDescr array for number/text translation ofdisplay modes.
o Modified zHelp to match new functionality.

callback():
o Added support for .nullvalue

do_meta_command():
o Output filename is now saved to callback struct. If using stdout,
  then the string "stdout" is saved.
o Explain is now a toggle. When it is turned on, the current values of
  mode, header and colWidth are saved if not already in explain mode.
  When turned off, those values are restored.
o Allow .mode plurals columns and lines and dot command plural
  .headers.
o Added processing for new keywords .quit, .nullvalue, .show, .prompt.

main():
o Added -init as an option to override .sqliterc.
o Added -nullvalue as a command line option.
o Processes .sqliterc.

main_init():
o Genesis. Moved some initialization code here from inside main() so
  that it can be called initially by main and again if -init is
  specified.

one_input_line():
o Now takes prompts from settable values.

process_sqliterc():
o Genesis. Read .sqliterc from user's home directory and pass it to
  process_input(). File should contain meta commands for setups. (CVS 531)

FossilOrigin-Name: e751338c468cdad79efcc5cd5b924eb2c1eb3c3a
2002-04-18 02:46:52 +00:00
drh
a168045f7d Fix for ticket #19: Do not call sqliteOsSync() if the only changes were
changes to TEMP tables. (CVS 530)

FossilOrigin-Name: 33da20b9c1a8eef16ad7ab5929bb8937c75090f2
2002-04-18 01:56:57 +00:00
drh
fc6cdfe9dc When doing a ".dump" command in the command-line shell, make sure VIEWs
are created after TABLEs. (CVS 529)

FossilOrigin-Name: 7edd13468e24d79939f0fa1e58f3b686422ca826
2002-04-13 23:42:24 +00:00
drh
c8d30ac109 Fix for bug #15: Add the sqlite_changes() API function for retrieving the
number of rows that changed in the previous operation. (CVS 526)

FossilOrigin-Name: 6e71493b9dc77d508c3ce90562766789e87e6d80
2002-04-12 10:08:59 +00:00
drh
b04a5d8768 Fix for bug #16: Check for invalid functions in the VALUES clause of an
INSERT statement. (CVS 525)

FossilOrigin-Name: 43a77f019d34e1a6b3f502ad0ec31a00c8fdbe6e
2002-04-12 03:55:15 +00:00
drh
feeb1394ee Fix for bug #11: Output the correct row count when and INSERT does an
IGNORE action. (CVS 524)

FossilOrigin-Name: bb83642e9a6c1c9ade861618496933c9f922a8f8
2002-04-09 03:28:01 +00:00
drh
fe1a1773a8 Fix for bug #10: Pop the stack by the right amount on an IGNORE so that the
stack does not grow without bound. (CVS 523)

FossilOrigin-Name: f46acfc3b828620e4e97b09f9aff119b9313e5d7
2002-04-09 03:15:06 +00:00
drh
8b32e17d26 Add a -column option to the sqlite command-line utility.
Patch from Matthew O. Persico. (CVS 522)

FossilOrigin-Name: 760bf568c882d7b28746b1e004309ef08d2ff4c0
2002-04-08 02:42:57 +00:00
drh
6ed41ad735 Added the last_insert_rowid() SQL function. (CVS 521)
FossilOrigin-Name: 6aca3f86bc08849e9d806fdd490f98e4daf71025
2002-04-06 14:10:47 +00:00
drh
bf3a4fa4cb Make the FROM clause on a SELECT optional. If omitted, the result of
the SELECT is a single row consisting of the values in the expression list. (CVS 520)

FossilOrigin-Name: 28ce42f7872e2660faa22e66b508db9b1f046af0
2002-04-06 13:57:42 +00:00
drh
41e941dda6 Add an fflush() call to shell.c to insure that all output has been written
before we prompt for a new line of input. (CVS 519)

FossilOrigin-Name: 932274187e045ce331177b1a640ed62da4a22d94
2002-04-04 15:10:12 +00:00
drh
5447322939 Fix for bug #2: Add support for TABLE.* in SELECT statements. (CVS 518)
FossilOrigin-Name: c2320eabfe44d6eb05c02b76547e5bd48a29943c
2002-04-04 02:10:55 +00:00
drh
3f6b548961 Fix for bug #8: Correctly handle terms of a WHERE clause in a join where the
term does not use a comparison operator. (CVS 515)

FossilOrigin-Name: abb12259a09418eb6e3cf573ea718ac58c91ac7b
2002-04-02 13:26:10 +00:00
drh
dd579122da Fix for bug #6: Correctly handle functions in the WHERE clause of a join. (CVS 513)
FossilOrigin-Name: bdd8ce584e16fe288a7e8386f897cb36a60e8431
2002-04-02 01:58:57 +00:00
drh
5efc18b6da Fix for bug #7: Correctly display the P3 operand in a VDBE trace when the
operand is really a pointer to a structure. (CVS 512)

FossilOrigin-Name: 734dde765b38d61feaa5520e6481c77022367892
2002-04-02 01:44:50 +00:00
drh
e1e68f4974 When an attempt is made to insert an explicit NULL into an INTEGER
PRIMARY KEY column, automatically convert the NULL value into a unique
integer key.  This was already happening when an implied NULL was
inserted - when the INTEGER PRIMARY KEY column was omitted from the
list of columns being inserted.  Patches from Christian Werner. (CVS 510)

FossilOrigin-Name: 9e3cf4aa2cb44932015b8bd3fd800d7678cb09b6
2002-03-31 18:29:03 +00:00
drh
f18543ca39 Fix for bug #3: Allow VIEW as a column name. Also allow COPY. (CVS 507)
FossilOrigin-Name: d2bdc0feeb3a3595850f40ab211df7a3963d6c30
2002-03-30 15:26:50 +00:00
drh
17a7f8ddab Added support for CASE expressions - patches from Dan Kennedy. (CVS 437)
FossilOrigin-Name: 836b59d057c3fb4087b138c9bfbc03392ddfb89d
2002-03-24 13:13:27 +00:00
drh
f1a7a13928 The sqlite_get_table() function now returns an error if you pass in two
or more SELECT statements that return different numbers of columns. (CVS 436)

FossilOrigin-Name: e2558c34034cf49524084ec819df58934a8af983
2002-03-23 00:52:01 +00:00
drh
1cc3d75f69 Fix a bug in subquery generation when the subquery is a compound select.
Also added new tests to cover this case. (CVS 435)

FossilOrigin-Name: aaf7fd4cef04d3d70a0444aad1b606bfc663c3e8
2002-03-23 00:31:29 +00:00
drh
27a3220c54 One more change before 2.4.2: Make the os.h header file more robust in
detecting whether to use unix or windows. (CVS 434)

FossilOrigin-Name: c2e0b79057c9c643e7432e62c90399c8f34339f9
2002-03-20 00:00:29 +00:00
drh
f2d74ffb74 Fix an uninitialized variable in AggReset() (CVS 432)
FossilOrigin-Name: 3dcdeae7f620736c1eae52ad78db1efb886ea9c3
2002-03-18 13:03:54 +00:00
drh
84e5920738 Bug fix: allow ROWID as a column in SELECT statements where the FROM clause
includes views which are flattened. (CVS 431)

FossilOrigin-Name: a3a360b308e45eaaf19efda80e30f2d420799cf2
2002-03-14 14:33:31 +00:00
drh
094b2bbfc7 Fix bug in anonymous subquery in a join. Parser requires a semicolon or
end-of-input before executing. (CVS 429)

FossilOrigin-Name: c0e3f1c592f583a0659901743a368aff1927f1cb
2002-03-13 18:54:07 +00:00
drh
56c0e926f1 Fix the return type of the xStep function in the FuncDef structure
definition. (CVS 428)

FossilOrigin-Name: 753adb789e1624ceeb52066df350dcd99aa4e3df
2002-03-12 23:10:04 +00:00
drh
28b4e4890b Preparing for the 2.4.0 release. (CVS 426)
FossilOrigin-Name: 9f5b241cb2fc89f66d3762b4b4978b8e114caf53
2002-03-11 02:06:13 +00:00
drh
7218ac7098 Bug fix: updates within a transaction would fail if there was existed
a temporary table. (CVS 425)

FossilOrigin-Name: 02cc2d60b2a5ee50efdbd90df90810ba559a453f
2002-03-10 21:21:00 +00:00
drh
5191b7e699 Added prototypes to sqlite.h for sqlite_freemem(), sqlite_libversion()
and sqlite_libencoding(). (CVS 424)

FossilOrigin-Name: 145516c93b1a03231e7d84f7f799a39655d7aa99
2002-03-08 02:12:00 +00:00
drh
acd4c69580 Fix a bug in the sorting of compound selects. (CVS 423)
FossilOrigin-Name: 0a51323561b7235d46621d9fa25c7111b81c528f
2002-03-07 02:02:51 +00:00
drh
cd61c2816f Added the default_cache_size and default_synchronous pragmas. Added additional
tests for pragmas.  Added a new speedtest script. (CVS 421)

FossilOrigin-Name: 161c0c5f5db66815e4345c9b5f7a600c03a67475
2002-03-06 22:01:34 +00:00
drh
e684090012 Optimizations to the processing of integer comparisons. (CVS 420)
FossilOrigin-Name: b7a7dae919be0e4c35b1fe8cb24fa7359a4b1200
2002-03-06 03:08:25 +00:00
drh
4b845d7ef4 Change the pager locking mechanism so that we don't have to write page 1
to the journal and to the database unless it actually changes. (CVS 419)

FossilOrigin-Name: 480eef1a3a4f049bc0d0cbee32dc8a8d138597c6
2002-03-05 12:41:19 +00:00
drh
603240cf5d Add the ability to turn of calls to fsync() using the "synchronous" pragma.
Increased the default cache size from 100 to 2000 and made the "cache_size"
pragma persistent. (CVS 418)

FossilOrigin-Name: 414da4af1f4aebc3936ca339fbc7932add081912
2002-03-05 01:11:12 +00:00
drh
ef2daf547d Updates to the documentation. Changed version number to 2.4.0-beta1 (CVS 417)
FossilOrigin-Name: 36a8fe0ad0ee2a67afafc04125dcc085ec1b5a13
2002-03-04 02:26:15 +00:00
drh
4ff6dfa7de More bugs fixed for views. (CVS 416)
FossilOrigin-Name: 813077623087ffc6cd506f57cf6d1e3d9239f806
2002-03-03 23:06:00 +00:00
drh
417be79cd1 VIEWs are bound to tables when they are used, not when they are first
entered.  This works around the problem of what to do if a table is deleted
that a view refers to. (CVS 415)

FossilOrigin-Name: 6121e5ab9328c90c64d40ade3de73ad11d4aaf4e
2002-03-03 18:59:40 +00:00
drh
75148a27b4 Fix a memory leak in expression processing. (CVS 414)
FossilOrigin-Name: dfe431c9b70bc3a1bf5148826edce0846737e66b
2002-03-03 03:42:31 +00:00
drh
2d0794e325 Suppress superfluous OP_OpenTemps when flattening subqueries. (CVS 412)
FossilOrigin-Name: 000441c8fec48cc172894eb767ae9549b8ed8c34
2002-03-03 03:03:52 +00:00
drh
1b2e032999 Bug fixes and additional tests for the subquery flattener. (CVS 411)
FossilOrigin-Name: 2c05389eda391e38894fc6969e29766df82a8fec
2002-03-03 02:49:51 +00:00
drh
30e58750c1 Pager optimization: do not write or journal free pages. This results in
a 2x performance gain for large INSERTs and a 5x performance gain for
large DELETEs. (CVS 410)

FossilOrigin-Name: cf1ebcfb741786f84a596c406f4c492f68cbe881
2002-03-02 20:41:57 +00:00
drh
f9ffac96a7 Change the btree node balancers to sort nodes into accending order. This
improves insert and delete speed by 25%. (CVS 409)

FossilOrigin-Name: abbb999d4fc3fe142567b6ede5e625e7bf0da714
2002-03-02 19:00:31 +00:00
drh
832508b7ea Subquery flattening is implemented and passes all regression tests.
We still need to add addition tests to the suite to further exercise
the flattener, however. (CVS 408)

FossilOrigin-Name: d5d3e79cc58da5bd315cc1fea1f7cbf46274da16
2002-03-02 17:04:07 +00:00
drh
567c604bb5 Bug fix when -DMEMORY_DEBUG is off. (CVS 407)
FossilOrigin-Name: e14b0c82f3514f41934a7c0d173b6fdb186aafc8
2002-02-28 04:10:29 +00:00
drh
47c8a67907 Fix bugs in substr() for UTF-8. (CVS 406)
FossilOrigin-Name: e9fd9e7b0fed445b48e7024ecde0354fff1478a6
2002-02-28 04:00:12 +00:00