-C Fix\sharmless\scompiler\swarning.
-D 2015-03-04T20:18:55.349
+C New\srequirements\smarks\son\sINSERT\sand\sINDEXED\sBY\sand\son\ssome\ssqlite3_config()\noptions.
+D 2015-03-04T23:14:14.129
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 2f643d6968dfc0b82d2e546a0525a39079f9e928
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/legacy.c ba1863ea58c4c840335a84ec276fc2b25e22bc4e
F src/lempar.c 7274c97d24bb46631e504332ccd3bd1b37841770
F src/loadext.c 86bd4e2fccd520b748cba52492ab60c4a770f660
-F src/main.c 6facbb3214a492d09022ac8414dc83d07d5d5f41
+F src/main.c fa997fa27d95febc16d57095299384b667a7f762
F src/malloc.c 740db54387204c9a2eb67c6d98e68b08e9ef4eab
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
F src/mem1.c abe6ee469b6c5a35c7f22bfeb9c9bac664a1c987
F test/e_expr.test 8f5fdd7261e2d746813b0c6a1c0e34824ad3c5ad
F test/e_fkey.test a1783fe1f759e1990e6a11adfcf0702dac4d0707
F test/e_fts3.test 5c02288842e4f941896fd44afdef564dd5fc1459
-F test/e_insert.test 7b2fa9cd1456f83474d6c5d27db3abaeb8be2023
+F test/e_insert.test 0e63edc037afe738bb81a626a676811ed7862c90
F test/e_reindex.test 396b7b4f0a66863b4e95116a67d93b227193e589
F test/e_resolve.test dcce9308fb13b934ce29591105d031d3e14fbba6
F test/e_select.test 52692ff3849541e828ad4661fe3773a9b8711763
F test/index5.test 25b0b451aceed4ac5f7d49f856f6de7257470b3e
F test/index6.test 3ae54e53c53f2adcacda269237d8e52bdb05a481
F test/index7.test 917cf1e1c7439bb155abbeabec511b28945e157b
-F test/indexedby.test b2f22f3e693a53813aa3f50b812eb609ba6df1ec
+F test/indexedby.test 5f527a78bae74c61b8046ae3037f9dfb0bf0c353
F test/indexfault.test 31d4ab9a7d2f6e9616933eb079722362a883eb1d
F test/init.test 15c823093fdabbf7b531fe22cf037134d09587a7
F test/insert.test 38742b5e9601c8f8d76e9b7555f7270288c2d371
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 04a59d6f7ecbf769bd127a9071348b51ce8463f8
-R eb7760e5f73fea42d82f7f1da509727f
-U mistachkin
-Z c6ab24c8fd379ad2586877483b56d26f
+P 580dae4615353d73c7d096107571bd60fec5b0f2
+R 83bea64f65ae4623fef6afe49023010e
+U drh
+Z 9817df219f494c0715d6d5afc55f3ce5
-580dae4615353d73c7d096107571bd60fec5b0f2
\ No newline at end of file
+c298ea0bd90d63673435bf8ceafbaeba3db6187d
\ No newline at end of file
*/
#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE>0 /* IMP: R-54466-46756 */
case SQLITE_CONFIG_SINGLETHREAD: {
- /* Disable all mutexing */
- sqlite3GlobalConfig.bCoreMutex = 0;
- sqlite3GlobalConfig.bFullMutex = 0;
+ /* EVIDENCE-OF: R-02748-19096 This option sets the threading mode to
+ ** Single-thread. */
+ sqlite3GlobalConfig.bCoreMutex = 0; /* Disable mutex on core */
+ sqlite3GlobalConfig.bFullMutex = 0; /* Disable mutex on connections */
break;
}
#endif
#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE>0 /* IMP: R-20520-54086 */
case SQLITE_CONFIG_MULTITHREAD: {
- /* Disable mutexing of database connections */
- /* Enable mutexing of core data structures */
- sqlite3GlobalConfig.bCoreMutex = 1;
- sqlite3GlobalConfig.bFullMutex = 0;
+ /* EVIDENCE-OF: R-14374-42468 This option sets the threading mode to
+ ** Multi-thread. */
+ sqlite3GlobalConfig.bCoreMutex = 1; /* Enable mutex on core */
+ sqlite3GlobalConfig.bFullMutex = 0; /* Disable mutex on connections */
break;
}
#endif
#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE>0 /* IMP: R-59593-21810 */
case SQLITE_CONFIG_SERIALIZED: {
- /* Enable all mutexing */
- sqlite3GlobalConfig.bCoreMutex = 1;
- sqlite3GlobalConfig.bFullMutex = 1;
+ /* EVIDENCE-OF: R-41220-51800 This option sets the threading mode to
+ ** Serialized. */
+ sqlite3GlobalConfig.bCoreMutex = 1; /* Enable mutex on core */
+ sqlite3GlobalConfig.bFullMutex = 1; /* Enable mutex on connections */
break;
}
#endif
6.2 "SELECT * FROM a1" {{} {} {} {}}
}
-# EVIDENCE-OF: R-46928-50290 The optional conflict-clause allows the
-# specification of an alternative constraint conflict resolution
-# algorithm to use during this one INSERT command.
+# EVIDENCE-OF: R-03235-45250 The "REPLACE" and "INSERT OR action" forms
+# specify an alternative constraint conflict resolution algorithm to use
+# during this one INSERT command.
#
# EVIDENCE-OF: R-23110-47146 the parser allows the use of the single
# keyword REPLACE as an alias for "INSERT OR REPLACE".
-# 2008 October 4
+# 2008-10-04
#
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
#
#***********************************************************************
#
-# $Id: indexedby.test,v 1.5 2009/03/22 20:36:19 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
# attached to a table in the FROM clause, but not to a sub-select or
# SQL view. Also test that specifying an index that does not exist or
# is attached to a different table is detected as an error.
+#
+# EVIDENCE-OF: R-63761-48810 -- syntax diagram qualified-table-name
#
+# EVIDENCE-OF: R-58230-57098 The "INDEXED BY index-name" phrase
+# specifies that the named index must be used in order to look up values
+# on the preceding table.
+#
do_test indexedby-2.1 {
execsql { SELECT * FROM t1 NOT INDEXED WHERE a = 'one' AND b = 'two'}
} {}
+do_test indexedby-2.1b {
+ execsql { SELECT * FROM main.t1 NOT INDEXED WHERE a = 'one' AND b = 'two'}
+} {}
do_test indexedby-2.2 {
execsql { SELECT * FROM t1 INDEXED BY i1 WHERE a = 'one' AND b = 'two'}
} {}
+do_test indexedby-2.2b {
+ execsql { SELECT * FROM main.t1 INDEXED BY i1 WHERE a = 'one' AND b = 'two'}
+} {}
do_test indexedby-2.3 {
execsql { SELECT * FROM t1 INDEXED BY i2 WHERE a = 'one' AND b = 'two'}
} {}
-
+# EVIDENCE-OF: R-44699-55558 The INDEXED BY clause does not give the
+# optimizer hints about which index to use; it gives the optimizer a
+# requirement of which index to use.
+# EVIDENCE-OF: R-15800-25719 If index-name does not exist or cannot be
+# used for the query, then the preparation of the SQL statement fails.
+#
do_test indexedby-2.4 {
catchsql { SELECT * FROM t1 INDEXED BY i3 WHERE a = 'one' AND b = 'two'}
} {1 {no such index: i3}}
+
+# EVIDENCE-OF: R-62112-42456 If the query optimizer is unable to use the
+# index specified by the INDEX BY clause, then the query will fail with
+# an error.
+do_test indexedby-2.4.1 {
+ catchsql { SELECT b FROM t1 INDEXED BY i1 WHERE b = 'two' }
+} {1 {no query solution}}
+
do_test indexedby-2.5 {
catchsql { SELECT * FROM t1 INDEXED BY i5 WHERE a = 'one' AND b = 'two'}
} {1 {no such index: i5}}
catchsql { SELECT * FROM v1 INDEXED BY i1 WHERE a = 'one' }
} {1 {no such index: i1}}
+
# Tests for single table cases.
#
+# EVIDENCE-OF: R-37002-28871 The "NOT INDEXED" clause specifies that no
+# index shall be used when accessing the preceding table, including
+# implied indices create by UNIQUE and PRIMARY KEY constraints. However,
+# the rowid can still be used to look up entries even when "NOT INDEXED"
+# is specified.
+#
do_execsql_test indexedby-3.1 {
+ EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE a = 'one' AND b = 'two'
+} {/SEARCH TABLE t1 USING INDEX/}
+do_execsql_test indexedby-3.1.1 {
EXPLAIN QUERY PLAN SELECT * FROM t1 NOT INDEXED WHERE a = 'one' AND b = 'two'
} {0 0 0 {SCAN TABLE t1}}
+do_execsql_test indexedby-3.1.2 {
+ EXPLAIN QUERY PLAN SELECT * FROM t1 NOT INDEXED WHERE rowid=1
+} {/SEARCH TABLE t1 USING INTEGER PRIMARY KEY .rowid=/}
+
+
do_execsql_test indexedby-3.2 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 INDEXED BY i1 WHERE a = 'one' AND b = 'two'
EXPLAIN QUERY PLAN SELECT * FROM t1 NOT INDEXED WHERE b = 10 ORDER BY rowid
} {0 0 0 {SCAN TABLE t1}}
+# EVIDENCE-OF: R-40297-14464 The INDEXED BY phrase forces the SQLite
+# query planner to use a particular named index on a DELETE, SELECT, or
+# UPDATE statement.
+#
# Test that "INDEXED BY" can be used in a DELETE statement.
#
do_execsql_test indexedby-7.1 {