]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Additional automatic index tests.
authordrh <drh@noemail.net>
Thu, 8 Apr 2010 16:30:38 +0000 (16:30 +0000)
committerdrh <drh@noemail.net>
Thu, 8 Apr 2010 16:30:38 +0000 (16:30 +0000)
FossilOrigin-Name: 99d8e325e9eb8905631b06676206e6412f386d08

manifest
manifest.uuid
test/autoindex1.test

index a075df1989088ee9be9a178a9fa7f6bc468c5648..1f5483b6ee020317bce8b7c88e4830f9277841d9 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,8 +1,8 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-C New\stest\scases\sfor\sautomatic\sindices.\s\sNew\stestcase()\smacros\sassociated\nwith\scolumn-used\sbitmasks.
-D 2010-04-08T15:01:45
+C Additional\sautomatic\sindex\stests.
+D 2010-04-08T16:30:39
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in 4f2f967b7e58a35bb74fb7ec8ae90e0f4ca7868b
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -250,7 +250,7 @@ F test/auth.test 8f21c160a4562f54f27618e85bac869efcecbcaf
 F test/auth2.test 270baddc8b9c273682760cffba6739d907bd2882
 F test/auth3.test a4755e6a2a2fea547ffe63c874eb569e60a28eb5
 F test/autoinc.test 85ef3180a737e6580086a018c09c6f1a52759b46
-F test/autoindex1.test 637a6937c0a418973df086f271d6cf3474b084bc
+F test/autoindex1.test ffb06a246e2c1f89cfbe3d93eca513c9e78d4063
 F test/autovacuum.test 25f891bc343a8bf5d9229e2e9ddab9f31a9ab5ec
 F test/autovacuum_ioerr2.test 598b0663074d3673a9c1bc9a16e80971313bafe6
 F test/avtrans.test 1e901d8102706b63534dbd2bdd4d8f16c4082650
@@ -799,14 +799,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P edeab06a5010c82491a6cc9393cf2a35a7622ac5
-R 3d6f994b2bd9dcab1b6154af0d66fe63
+P e1aa48ace7e43c3805278120b8228ee597e2cee7
+R 1ddd64c6b085dbc423616dd819df6a05
 U drh
-Z 0c418d305b2aa7feea9ae0219789f436
+Z f3ae6e61cec8452c9ef4d9b54b9c5c99
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.6 (GNU/Linux)
 
-iD8DBQFLve/foxKgR168RlERAssZAJ9doXebZgLphKwzSQhRjoRdtdMYRwCfctGL
-MfbrhTHSy2sAdRksWCmPgWU=
-=KTV/
+iD8DBQFLvgSyoxKgR168RlERAh81AJ9w9/1rTkO8H54lQWnY5JK4Kl9IAgCdFYMu
+h187VpM+yHCLSuWlqbUeVgs=
+=mli0
 -----END PGP SIGNATURE-----
index e75547efdbcf5e56a6ecca78b52c72f378d4b3c7..995a07da9a042a2fc2112daa1142cea57c3d08cd 100644 (file)
@@ -1 +1 @@
-e1aa48ace7e43c3805278120b8228ee597e2cee7
\ No newline at end of file
+99d8e325e9eb8905631b06676206e6412f386d08
\ No newline at end of file
index 146eb7bf527f2d6b7a8fff00564dae4fa8d71b23..96b4f1a63afc032e1c48ea070552452706fb84fc 100644 (file)
@@ -103,4 +103,37 @@ do_test autoindex1-310 {
   db eval {SELECT d FROM t2 ORDER BY d}
 } {919 930 941 952 963 974 985 996}
 
+# The next test does a 10-way join on unindexed tables.  Without
+# automatic indices, the join will take a long time to complete.
+# With automatic indices, it should only take about a second.
+#
+do_test autoindex1-400 {
+  db eval {
+    CREATE TABLE t4(a, b);
+    INSERT INTO t4 VALUES(1,2);
+    INSERT INTO t4 VALUES(2,3);
+  }
+  for {set n 2} {$n<4096} {set n [expr {$n+$n}]} {
+    db eval {INSERT INTO t4 SELECT a+$n, b+$n FROM t4}
+  }
+  db eval {
+    SELECT count(*) FROM t4;
+  }
+} {4096}
+do_test autoindex1-401 {
+  db eval {
+    SELECT count(*)
+      FROM t4 AS x1
+      JOIN t4 AS x2 ON x2.a=x1.b
+      JOIN t4 AS x3 ON x3.a=x2.b
+      JOIN t4 AS x4 ON x4.a=x3.b
+      JOIN t4 AS x5 ON x5.a=x4.b
+      JOIN t4 AS x6 ON x6.a=x5.b
+      JOIN t4 AS x7 ON x7.a=x6.b
+      JOIN t4 AS x8 ON x8.a=x7.b
+      JOIN t4 AS x9 ON x9.a=x8.b
+      JOIN t4 AS x10 ON x10.a=x9.b;
+  }
+} {4087}
+
 finish_test