/ Check-in [0c228f5d]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a test script problem causing a test to fail if the ICU extension is enabled.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:0c228f5d3db1be598ebf5d9170428c19d18e01ad
User & Date: dan 2016-07-06 10:17:43
Context
2016-07-06
18:42
Add the SQLITE_DBSTATUS_CACHE_USED_SHARED sqlite3_db_status() parameter. This option is similar to DBSTATUS_CACHE_USED, except that it divides memory used by shared caches evenly between all connections. check-in: 06cf2680 user: dan tags: trunk
10:17
Fix a test script problem causing a test to fail if the ICU extension is enabled. check-in: 0c228f5d user: dan tags: trunk
09:19
Fix a memory leak in recently added test code. check-in: 724e4cdc user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/bestindex3.test.

131
132
133
134
135
136
137




138
139
140
141
142
143
144
145
146
147
148

149
150
151
152
153
154
155
    SELECT rowid FROM t1 WHERE c = 'three' OR c LIKE 'o%'
  } {1 6 3 4}
}

#-------------------------------------------------------------------------
# Test the same pattern works with ordinary tables.
#




do_execsql_test 2.1 {
  CREATE TABLE t2(x TEXT COLLATE nocase, y TEXT);
  CREATE INDEX t2x ON t2(x COLLATE nocase);
  CREATE INDEX t2y ON t2(y);
}

do_eqp_test 2.2 {
  SELECT * FROM t2 WHERE x LIKE 'abc%' OR y = 'def'
} {
  0 0 0 {SEARCH TABLE t2 USING INDEX t2x (x>? AND x<?)}
  0 0 0 {SEARCH TABLE t2 USING INDEX t2y (y=?)}

}

#-------------------------------------------------------------------------
# Test that any PRIMARY KEY within a sqlite3_decl_vtab() CREATE TABLE 
# statement is currently ignored.
#
proc vvv_command {method args} {







>
>
>
>
|
|
|
|
|

|
|
|
|
|
>







131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
    SELECT rowid FROM t1 WHERE c = 'three' OR c LIKE 'o%'
  } {1 6 3 4}
}

#-------------------------------------------------------------------------
# Test the same pattern works with ordinary tables.
#
# This test does not work if the ICU extension is enabled. ICU overrides
# LIKE - and this optimization only works with the built-in LIKE function.
#
ifcapable !icu {
  do_execsql_test 2.1 {
    CREATE TABLE t2(x TEXT COLLATE nocase, y TEXT);
    CREATE INDEX t2x ON t2(x COLLATE nocase);
    CREATE INDEX t2y ON t2(y);
  }

  do_eqp_test 2.2 {
    SELECT * FROM t2 WHERE x LIKE 'abc%' OR y = 'def'
  } {
    0 0 0 {SEARCH TABLE t2 USING INDEX t2x (x>? AND x<?)}
    0 0 0 {SEARCH TABLE t2 USING INDEX t2y (y=?)}
  }
}

#-------------------------------------------------------------------------
# Test that any PRIMARY KEY within a sqlite3_decl_vtab() CREATE TABLE 
# statement is currently ignored.
#
proc vvv_command {method args} {