Commit Graph

11801 Commits

Author SHA1 Message Date
drh 849a9d92ba Fix the ".echo on" dot-command of the shell so that it echos comments in
addition to SQL statements and dot-commands.  Add the --explain option
to speedtest1 so that the output can be piped into the command-line shell
to show nicely-formated VDBE code for the entire test.

FossilOrigin-Name: 96397263f94256e284aae9506de1fc48fea89193
2013-12-21 15:46:06 +00:00
drh ae28d6efc6 Add a case to speedtest1.c that demonstrates the need to factor OP_Column
operators out of inner loops.

FossilOrigin-Name: 69a17336fdf4ae891e815914be8942f7222230c2
2013-12-21 00:04:37 +00:00
drh a47941fe42 Fix compiler harmless warnings in tclsqlite.c that appeared with GCC 4.8.x.
FossilOrigin-Name: d93ae6833a7fca0672caf902a7b48846e54242cd
2013-12-20 18:57:44 +00:00
drh d42ef839bc Code simplification in sqlite3GenerateIndexKey() by making use of a subroutine
found over in expr.c.

FossilOrigin-Name: 0026d3355340d66687a3fd4cbece28811ef1b505
2013-12-20 18:44:35 +00:00
drh 4eded604ea Combine adjacent single-register OP_Copy instructions into a single
multi-register OP_Copy, where possible.  Fix the Synopsis comment for
multi-register OP_Copy instructions to show the correct register ranges.

FossilOrigin-Name: 2ae22dc0cbed2feca4baf89d02aaace0331971d6
2013-12-20 15:59:20 +00:00
drh aed1819875 Allow any arbitrary expression as the filename in an ATTACH statement,
including functions and subqueries.

FossilOrigin-Name: df70a1f30393b34146d6b8bf1df5a76aaf362efe
2013-12-20 14:48:12 +00:00
drh 7e61d18eb4 Simplify the accumulator reset for aggregate query processing so that it
uses a single multi-register OP_Null rather than a separate OP_Null for each
register.

FossilOrigin-Name: 2c7fd9b043f5f3d9d8e22dbefa84a9770ca951d0
2013-12-20 13:11:45 +00:00
dan 1001ee8819 Do not inject OOM faults into SQLITE_FCNTL_COMMIT_PHASE_TWO file-control invocations. It causes problems for test scripts.
FossilOrigin-Name: 8eb28d23e353139d24a8af78309d39249ab9eaf0
2013-12-19 17:04:58 +00:00
drh f6b1a8e1a5 Make sure errors encountered while initializing extensions such as FTS4
get reported out from sqlite3_open().  This fixes a bug introduced by
check-in [9d347f547e7ba9].  Also remove lots of forgotten "breakpoint"
commands left in test scripts over the years.

FossilOrigin-Name: ca3fdfd41961d8d3d1e39d20dc628e8a95dabb2f
2013-12-19 16:26:05 +00:00
drh a021f121c9 Remove an unneeded column-cache flush in aggregate SELECT
and an unreachable branch in the INSERT logic.

FossilOrigin-Name: ffa092e13b3781677b18418cca40e3dd1e388aed
2013-12-19 14:34:34 +00:00
drh edfac3456e Omit an unnecessary OP_Null opcode from UPDATE.
FossilOrigin-Name: 72d111336c5016e5b5092dfebcd01253266a7685
2013-12-19 02:56:01 +00:00
drh 46d03fcbfc Omit one or more pointless instructions that occur in between OP_NoConflict
and OP_Halt.

FossilOrigin-Name: 61e2f3575c4a94f9571c28fb2bd19da84b0edceb
2013-12-19 02:23:45 +00:00
drh 935c34711b Remove an unnecessary column-cache flush operation. Add code to trace the
column cache when compiled with SQLITE_DEBUG and using
PRAGMA vdbe_addoptrace=ON.

FossilOrigin-Name: 58704ed1f4cd78bb3b0c095ffd1626906a95a413
2013-12-18 18:44:43 +00:00
drh 039468ef2d Remove an unnecessary column-cache flush. Add another test case to the
speedtest1.c program to accentuate the benefit of not flushing the cache at
that point.

FossilOrigin-Name: 97fdfc6b79833011fc0c506fe5e0985c0fb1906c
2013-12-18 16:27:48 +00:00
drh 9ac7962ace Show changes to the column cache when PRAGMA vdbe_addoptrace=ON is set.
FossilOrigin-Name: 4c6a659c432e4f7c0285f58675a67f967b07bb0d
2013-12-18 15:11:47 +00:00
drh 3a8aec5e13 Add evidence marks and additional test cases for the printf() SQL function.
FossilOrigin-Name: 93121d3097a43997af3c0de65bd9bd7663845fa2
2013-12-17 16:32:56 +00:00
drh afa5af807c Add the printf() SQL function.
FossilOrigin-Name: a1bb62f91a85af0584100c3ad77877a949c30cca
2013-12-17 16:10:57 +00:00
drh fc6ee9df22 Fix the formatting of %c in the printf() SQL function.
FossilOrigin-Name: 3375571a5e267744c19a7c310840256cec57a242
2013-12-17 15:58:42 +00:00
drh a5c1416d64 Add the printf() SQL function.
FossilOrigin-Name: 6db7052eeefafdbf26b3153bc38600fecfb53ae6
2013-12-17 15:03:06 +00:00
drh 4a8ee3dfe2 Allow the SQLITE_DETERMINISTIC flag to be ORed into the preferred text encoding
of application-defined functions, to mark the function as deterministic.

FossilOrigin-Name: 5716fc2341ddd8cf64139e7168597f864da4e10b
2013-12-14 13:44:22 +00:00
drh 5dee6afcac Performance optimizations in the pager_write() routine of pager.c.
FossilOrigin-Name: bc5febef921bd12ca7760e9d07d3be0e67140320
2013-12-13 20:45:50 +00:00
drh 16f9a81125 Reduce the number of calls to the subjRequiresPage() routine inside of pager.
FossilOrigin-Name: e50ff39a93a51b5a5be4f0e82a76104b81c9e2a4
2013-12-13 19:48:04 +00:00
drh da8a330a03 Create and use a new pager interface sqlite3PagerUnrefNotNull() that works
just like sqlite3PagerUnref() but guarantees that its argument is not a
NULL pointer.

FossilOrigin-Name: e00f37e2333cac5b53e17cf764ab56c4fcd5f617
2013-12-13 19:35:21 +00:00
drh 5d56dd2867 Enhance the pcache1PinPage() routine so that it called much less often and
runs much faster in the cases when it is actually called.

FossilOrigin-Name: a845779cd31aec3204a6a9c776bd9c9f7d47dd24
2013-12-13 18:50:40 +00:00
drh 40f22bed06 Avoid unnecessary calls to sqlite3_free() from within sqlite3VXPrintf().
FossilOrigin-Name: e2a8b280e84c1f8fd6106d9427e1ad6cbcfccd10
2013-12-13 16:42:18 +00:00
drh a3cc007df4 Simplication and optimization of error message handling.
FossilOrigin-Name: 9d347f547e7ba9590b0c68edf50a14ad94a2bb92
2013-12-13 16:23:55 +00:00
drh a5f40593be Add the SQLITE_FCNTL_SYNC and SQLITE_FCNTL_COMMIT_PHASETWO file-controls
and have the pager call them at appropriate times.  This is needed in order
to enable ZIPVFS to do multi-file atomic commits.

FossilOrigin-Name: 552f94d50f08cf11f33205730fde52bc2f06cff6
2013-12-11 15:47:39 +00:00
drh 07c5d0a901 Merge in the latest trunk changes.
FossilOrigin-Name: 9ff4dfe1e36b40e386858b03f36cfab8f6806fdd
2013-12-11 14:17:06 +00:00
drh a81ad1758c Fix a bug in the shell ".import" command: Do not end the field
when an escaped double-quote occurs at the end of a CRNL line.

FossilOrigin-Name: 5e239ecda0f7835ce037b38b04627a574b5854cd
2013-12-11 14:00:04 +00:00
drh 39325bac1b Remove an unreachable conditional inserted by the previous check-in.
FossilOrigin-Name: 3e1d55f0bd84810a035bd6c54583eb373784a9a3
2013-12-11 12:02:55 +00:00
dan 1d8b85bed1 Have the crash-test infrastructure code in test6.c read and write the 512-byte block containing the pending-byte lock as normal. Earlier versions did not access this part of the file in order to avoid triggering an assert in os_unix.c. But the assert() has since been removed. And not reading/writing this part of the file causes problems for multiplexor tests.
FossilOrigin-Name: fdc3f3fa3de1481860e1e2a819db2d6c4eb05658
2013-12-11 11:03:19 +00:00
drh a9ab481fca Fix harmless compiler warnings.
FossilOrigin-Name: a7e5fcd66659750eb2f4675082df324e7cf35427
2013-12-11 11:00:44 +00:00
mistachkin 53cd964648 Fix harmless compiler warning.
FossilOrigin-Name: 2525296d919245ebb01077aad541e4ae6eab7940
2013-12-11 02:21:19 +00:00
drh 2dc0648a80 Do not run the tool/vdbe-compress.tcl script that generates the
vdbeExecUnion object that reduces the size of the sqlite3VdbeExec()
stack frame unless the SQLITE_SMALL_STACK compile-time option is
specified as on of the OPTS in the makefile.  The vdbeExecUnion object
gets in the way of C-compiler optimizer and results in slightly slower code.

FossilOrigin-Name: 4d0781473a465b4ab0a307914014f3d2ddd0ce33
2013-12-11 00:59:10 +00:00
drh 024045fe6e Avoid unnecessary calls to sqlite3VdbeSerialType() from within
sqlite3VdbeSerialPut().

FossilOrigin-Name: 079c04a5013074b68f7d90f1ce8bf8e7092ad8a2
2013-12-10 21:38:08 +00:00
drh 3e6c060fac In the OP_MakeRecord opcode, factor out affinity changes into separate loop,
for a slight performance advantage.

FossilOrigin-Name: 1c6ee9b85f61e5cdb5d9b7815cddf526dc78aaa7
2013-12-10 20:53:01 +00:00
drh b0e7704e9f Simplify and improve the performance of the sqlite3VdbeMemGrow() routine.
FossilOrigin-Name: 48ecf18774ba9572d86696c60d87007a619d9f53
2013-12-10 19:49:00 +00:00
dan 6f68f1640d Use SQLITE_FCNTL_SYNC instead of SQLITE_FCNTL_SYNC_OMITTED. Add documentation in for FCNTL_SYNC and FCNTL_COMMIT_PHASETWO.
FossilOrigin-Name: 46231af985a1a872d1dc3418591cbaacb0b7c249
2013-12-10 17:34:53 +00:00
dan d22d7b4daa Merge changes from the trunk.
FossilOrigin-Name: 3ee736a39d1fc175a297c5fdd0d2e1c5a9b5b18e
2013-12-10 16:35:42 +00:00
dan a01abc302d Fix handling of errors returned by the SQLITE_FCNTL_OMIT_SYNCED file-control.
FossilOrigin-Name: d9a5f44f4a27336d41e60b6c3791bd018fbbff6f
2013-12-10 16:27:59 +00:00
drh 038b7bc4ef Simplifications to the OP_MakeRecord opcode and the sqlite3VdbeSerialPut()
helper function.

FossilOrigin-Name: 7277a769694787e0332d1a4efc02041834661e2a
2013-12-09 23:17:22 +00:00
mistachkin 401387553d Correct the VFS name as reported by the file control when explicitly using the 'win32-longpath' VFS.
FossilOrigin-Name: c43b59dac1fbb67ec3a9d921005543046ad416ce
2013-12-09 21:48:49 +00:00
drh a2a3028d5f Reduce the number of times that OP_Column calls sqlite3VdbeMemMakeWriteable().
FossilOrigin-Name: 6b51863553e51334880fb322bdf74e51e35d0e61
2013-12-09 21:06:46 +00:00
drh 2a8d2261ed Simplify the sqlite3BtreeKeyFetch() and sqlite3BtreeDataFetch() interfaces
to the storage engine.

FossilOrigin-Name: bf97598592ff60fab2a06d8b31b0201200b91684
2013-12-09 20:43:22 +00:00
dan 999cd08aae Modify the way some internal file-controls are invoked. In order to support multi-file transactions in the zipvfs extension.
FossilOrigin-Name: 32fb1784af4594161d954343e3787db702000a4d
2013-12-09 20:42:03 +00:00
drh c65faab2e1 Minor performance optimizations in pager.c.
FossilOrigin-Name: ba9eef5f5293633d1479e1d877bf338edb2a9471
2013-12-09 19:25:28 +00:00
drh a6353a3f64 Performance optimizations for sqlite3VXPrintf().
FossilOrigin-Name: 9227ad48e1612b32a3a3e9551c49890f93abc0a7
2013-12-09 19:03:26 +00:00
drh 195134c6c3 Fix an incorrect test number in the output of the speedtest1.c program. No
changes to the test algorithms.

FossilOrigin-Name: fbfc075a5a3c9c5c98353f396f9da7f7ec7c1c04
2013-12-09 12:24:23 +00:00
drh 7250c547a5 Avoid unnecessary (no-op) calls to sqlite3DbFree() from sqlite3VdbeMemRelease().
FossilOrigin-Name: 2d6dd7c2eb5a64f8994162b564a99ef0014b7460
2013-12-09 03:07:21 +00:00
drh 8f518837f9 Use memmove() rather than a home-made copy loop in insertCell() too.
FossilOrigin-Name: a3d796b1673ca68ced247d63c22ddcfb1f9d56ea
2013-12-09 02:32:19 +00:00