/ Check-in [b61cc5a0]
Login

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

Overview
Comment:Fix test problems causing the "prepare" permutation test to fail.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:b61cc5a0f9f2c2d2175ad30fc3fa4cb2086dbb948d5a5cc538ac43b871bb5221
User & Date: dan 2017-07-15 06:35:15
Context
2017-07-15
08:02
Fix another minor problem in test file like.test. check-in: 0953e746 user: dan tags: trunk
06:35
Fix test problems causing the "prepare" permutation test to fail. check-in: b61cc5a0 user: dan tags: trunk
2017-07-14
20:53
Fix test problems with stmtvtab1.test under some permutations. check-in: ad6699d4 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/like.test.

209
210
211
212
213
214
215






216
217
218
219
220
221
222
223
224
225
226

227
228
229
230
231
232
233
} {abc abcd nosort {} i1}
do_test like-3.3.101 {
  set sqlite_like_count
} 0

# The like optimization works even when the pattern is a bound parameter
#






do_test like-3.3.102 {
  set sqlite_like_count 0
  unset -nocomplain ::likepat
  set ::likepat abc%
  queryplan {
    SELECT x FROM t1 WHERE x LIKE $::likepat ORDER BY 1;
  }
} {abc abcd nosort {} i1}
do_test like-3.3.103 {
  set sqlite_like_count
} 0


# Except, the like optimization does not work for bound parameters if
# the query planner stability guarantee is active.
#
do_test like-3.3.104 {
  set sqlite_like_count 0
  sqlite3_db_config db QPSG 1







>
>
>
>
>
>
|
|
|
<
|
|
|
|
|
|
|
>







209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224

225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
} {abc abcd nosort {} i1}
do_test like-3.3.101 {
  set sqlite_like_count
} 0

# The like optimization works even when the pattern is a bound parameter
#
# Exception: It does not work if sqlite3_prepare() is used instead of
# sqlite3_prepare_v2(), as in that case the statement cannot be reprepared
# after the parameter is bound.
#
set ::likepat abc%
if {[permutation]!="prepare"} {
  do_test like-3.3.102 {
    set sqlite_like_count 0
    unset -nocomplain ::likepat

    queryplan {
      SELECT x FROM t1 WHERE x LIKE $::likepat ORDER BY 1;
    }
  } {abc abcd nosort {} i1}
  do_test like-3.3.103 {
    set sqlite_like_count
  } 0
}

# Except, the like optimization does not work for bound parameters if
# the query planner stability guarantee is active.
#
do_test like-3.3.104 {
  set sqlite_like_count 0
  sqlite3_db_config db QPSG 1

Changes to test/permutations.test.

1044
1045
1046
1047
1048
1049
1050
1051

1052
1053
1054
1055
1056
1057
1058

test_suite "prepare" -description {
  Run tests with the db connection using sqlite3_prepare() instead of _v2().
} -dbconfig {
  db_use_legacy_prepare $::dbhandle 1
  #$::dbhandle cache size 0
} -files [
  test_set $allquicktests -exclude *malloc* *ioerr* *fault* stmtvtab1.test

]

# End of tests
#############################################################################

# run_tests NAME OPTIONS
#







|
>







1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059

test_suite "prepare" -description {
  Run tests with the db connection using sqlite3_prepare() instead of _v2().
} -dbconfig {
  db_use_legacy_prepare $::dbhandle 1
  #$::dbhandle cache size 0
} -files [
  test_set $allquicktests -exclude *malloc* *ioerr* *fault* \
      stmtvtab1.test index9.test
]

# End of tests
#############################################################################

# run_tests NAME OPTIONS
#