Author: brane
Date: Thu Jan 24 10:58:23 2019
New Revision: 1852013

URL: http://svn.apache.org/viewvc?rev=1852013&view=rev
Log:
Fix issue #4804: avoid test failures just because some SQLite compile-time
feature was enabled that changes its query plan descriptions.

* subversion/tests/libsvn_wc/wc-queries-test.c
  (test_query_expectations): Mostly ignore the sqlite_master table.

Modified:
    subversion/trunk/subversion/tests/libsvn_wc/wc-queries-test.c

Modified: subversion/trunk/subversion/tests/libsvn_wc/wc-queries-test.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/wc-queries-test.c?rev=1852013&r1=1852012&r2=1852013&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/wc-queries-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/wc-queries-test.c Thu Jan 24 
10:58:23 2019
@@ -670,7 +670,20 @@ test_query_expectations(apr_pool_t *scra
                        || (item->expression_vars < 1))
                    && !is_result_table(item->table))
             {
-              if (in_list(primary_key_statements, i))
+              if (MATCH_TOKEN(item->table, "sqlite_master"))
+                {
+                  /* The sqlite_master table does not have an index.
+                     Query explanations that say 'SCAN TABLE sqlite_master'
+                     will appear if SQLite was compiled with the option
+                     SQLITE_ENABLE_STMT_SCANSTATUS, for queries such
+                     as 'DROP TABLE foo', but the performance of such
+                     statements is not our concern here. */
+
+                  /* "Slow" statements do expect too see a warning, however. */
+                  if (is_slow_statement(i))
+                    warned = TRUE;
+                }
+              else if (in_list(primary_key_statements, i))
                 {
                   /* Reported as primary key index usage in Sqlite 3.7,
                      as table scan in 3.8+, while the execution plan is


Reply via email to