/ Check-in [87ccdf9c]
Login

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

Overview
Comment:Disable FTS3 matchinfo() tests that assume a littleEndian platform when running on bigEndian.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 87ccdf9cbb9284553330683d4971be4f523ce922089aee6dffccfc18b3004263
User & Date: drh 2017-09-13 12:55:59
Context
2017-09-13
20:20
Test case update due to PRAGMA integrity_check enhancements in [8525c30c]. No changes to code. check-in: 43c6023b user: drh tags: trunk
18:38
Experimental sqlite3_stmt_retryable() interface. Leaf check-in: ebada072 user: drh tags: sqlite3_stmt_retryable
12:55
Disable FTS3 matchinfo() tests that assume a littleEndian platform when running on bigEndian. check-in: 87ccdf9c user: drh tags: trunk
00:33
Improvements to PRAGMA integrity_check for better detection of malformed records. Integrity_check now avoids returning SQLITE_CORRUPT on a corrupt record. Also includes microoptimizations that I stumbled over while working on integrity_check. check-in: 8525c30c user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/fts3conf.test.

   132    132       INSERT INTO t1(docid, x) VALUES(1, 'a b c');
   133    133       REPLACE INTO t1(docid, x) VALUES('zero', 'd e f');
   134    134   } {1 {datatype mismatch}}
   135    135   do_execsql_test 2.2.2 { COMMIT }
   136    136   do_execsql_test 2.2.3 { SELECT * FROM t1 } {{a b c} {a b c}}
   137    137   fts3_integrity 2.2.4 db t1
   138    138   
   139         -do_execsql_test 3.1 {
   140         -  CREATE VIRTUAL TABLE t3 USING fts4;
   141         -  REPLACE INTO t3(docid, content) VALUES (1, 'one two');
   142         -  SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
   143         -} {X'0100000002000000'}
   144         -
   145         -do_execsql_test 3.2 {
   146         -  REPLACE INTO t3(docid, content) VALUES (2, 'one two three four');
   147         -  SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'four'
   148         -} {X'0200000003000000'}
   149         -
   150         -do_execsql_test 3.3 {
   151         -  REPLACE INTO t3(docid, content) VALUES (1, 'one two three four five six');
   152         -  SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
   153         -} {X'0200000005000000'}
   154         -
   155         -do_execsql_test 3.4 {
   156         -  UPDATE OR REPLACE t3 SET docid = 2 WHERE docid=1;
   157         -  SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
   158         -} {X'0100000006000000'}
   159         -
   160         -do_execsql_test 3.5 {
   161         -  UPDATE OR REPLACE t3 SET docid = 3 WHERE docid=2;
   162         -  SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
   163         -} {X'0100000006000000'}
   164         -
   165         -do_execsql_test 3.6 {
   166         -  REPLACE INTO t3(docid, content) VALUES (3, 'one two');
   167         -  SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
   168         -} {X'0100000002000000'}
   169         -
   170         -do_execsql_test 3.7 {
   171         -  REPLACE INTO t3(docid, content) VALUES (NULL, 'one two three four');
   172         -  REPLACE INTO t3(docid, content) VALUES (NULL, 'one two three four five six');
   173         -  SELECT docid FROM t3;
   174         -} {3 4 5}
   175         -
   176         -do_execsql_test 3.8 {
   177         -  UPDATE OR REPLACE t3 SET docid = 5, content='three four' WHERE docid = 4;
   178         -  SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
   179         -} {X'0200000002000000'}
          139  +if {$tcl_platform(byteOrder)=="littleEndian"} {
          140  +  do_execsql_test 3.1 {
          141  +    CREATE VIRTUAL TABLE t3 USING fts4;
          142  +    REPLACE INTO t3(docid, content) VALUES (1, 'one two');
          143  +    SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
          144  +  } {X'0100000002000000'}
          145  +  
          146  +  do_execsql_test 3.2 {
          147  +    REPLACE INTO t3(docid, content) VALUES (2, 'one two three four');
          148  +    SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'four'
          149  +  } {X'0200000003000000'}
          150  +  
          151  +  do_execsql_test 3.3 {
          152  +    REPLACE INTO t3(docid, content) VALUES (1, 'one two three four five six');
          153  +    SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
          154  +  } {X'0200000005000000'}
          155  +  
          156  +  do_execsql_test 3.4 {
          157  +    UPDATE OR REPLACE t3 SET docid = 2 WHERE docid=1;
          158  +    SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
          159  +  } {X'0100000006000000'}
          160  +  
          161  +  do_execsql_test 3.5 {
          162  +    UPDATE OR REPLACE t3 SET docid = 3 WHERE docid=2;
          163  +    SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
          164  +  } {X'0100000006000000'}
          165  +  
          166  +  do_execsql_test 3.6 {
          167  +    REPLACE INTO t3(docid, content) VALUES (3, 'one two');
          168  +    SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
          169  +  } {X'0100000002000000'}
          170  +  
          171  +  do_execsql_test 3.7 {
          172  +    REPLACE INTO t3(docid, content) VALUES(NULL,'one two three four');
          173  +    REPLACE INTO t3(docid, content) VALUES(NULL,'one two three four five six');
          174  +    SELECT docid FROM t3;
          175  +  } {3 4 5}
          176  +  
          177  +  do_execsql_test 3.8 {
          178  +    UPDATE OR REPLACE t3 SET docid = 5, content='three four' WHERE docid = 4;
          179  +    SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
          180  +  } {X'0200000002000000'}
          181  +}
   180    182   
   181    183   #-------------------------------------------------------------------------
   182    184   # Test that the xSavepoint is invoked correctly if the first write 
   183    185   # operation within a transaction is to a virtual table. 
   184    186   # 
   185    187   do_catchsql_test 4.1.1 {
   186    188     CREATE VIRTUAL TABLE t0 USING fts4;