/ Check-in [122330db]
Login

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

Overview
Comment:Verify that fts5 auxiliary functions cannot be used in aggregate queries.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 122330dba3eb2492875bd02a46442306f73e251408447af5e5914ee0c8d6a110
User & Date: dan 2019-02-27 15:26:03
Context
2019-02-27
16:38
Add the "-returntype" option to the "db function" Tcl method. check-in: 789a492b user: dan tags: trunk
15:26
Verify that fts5 auxiliary functions cannot be used in aggregate queries. check-in: 122330db user: dan tags: trunk
2019-02-26
19:16
Reformat the white-space in a few test cases so that the tests work with Tcl 8.6.9. check-in: 29d02bf2 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts5/test/fts5aux.test.

   271    271   
   272    272   do_execsql_test 9.3 {
   273    273     SELECT rowid FROM t1('b:a AND b:b') ORDER BY rank;
   274    274   } {
   275    275     9 10
   276    276   }
   277    277   
          278  +#-------------------------------------------------------------------------
          279  +# Test that aux. functions may not be used in aggregate queries.
          280  +#
          281  +reset_db
          282  +do_execsql_test 10.0 {
          283  +  CREATE VIRTUAL TABLE t1 USING fts5(x, y, z);
          284  +  INSERT INTO t1 VALUES('a', 'one two', 1);
          285  +  INSERT INTO t1 VALUES('b', 'two three', 2);
          286  +  INSERT INTO t1 VALUES('c', 'three four', 1);
          287  +  INSERT INTO t1 VALUES('d', 'four five', 2);
          288  +  INSERT INTO t1 VALUES('e', 'five six', 1);
          289  +  INSERT INTO t1 VALUES('f', 'six seven', 2);
          290  +}
          291  +
          292  +proc firstcol {cmd} { $cmd xColumnText 0 }
          293  +sqlite3_fts5_create_function db firstcol firstcol
          294  +
          295  +do_execsql_test 10.1.1 {
          296  +  SELECT firstcol(t1) FROM t1
          297  +} {a b c d e f}
          298  +do_execsql_test 10.1.2 {
          299  +  SELECT group_concat(x, '.') FROM t1
          300  +} {a.b.c.d.e.f}
          301  +
          302  +do_catchsql_test 10.1.3 {
          303  +  SELECT group_concat(firstcol(t1), '.') FROM t1
          304  +} {1 {unable to use function firstcol in the requested context}}
   278    305   
          306  +do_catchsql_test 10.1.4 {
          307  +  SELECT group_concat(firstcol(t1), '.') FROM t1 GROUP BY rowid
          308  +} {1 {unable to use function firstcol in the requested context}}
   279    309   
   280    310   finish_test
          311  +