aboutsummaryrefslogtreecommitdiff
path: root/test/index.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/index.test')
-rw-r--r--test/index.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/index.test b/test/index.test
index 790bed908..2b95bad83 100644
--- a/test/index.test
+++ b/test/index.test
@@ -715,6 +715,23 @@ do_test index-20.2 {
DROP INDEX "t6i1";
}
} {}
+
+# Try to create a TEMP index on a non-TEMP table. */
+#
+do_test index-21.1 {
+ catchsql {
+ CREATE INDEX temp.i21 ON t6(c);
+ }
+} {1 {cannot create a TEMP index on non-TEMP table "t6"}}
+do_test index-21.2 {
+ catchsql {
+ CREATE TEMP TABLE t6(x);
+ INSERT INTO temp.t6 values(1),(5),(9);
+ CREATE INDEX temp.i21 ON t6(x);
+ SELECT x FROM t6 ORDER BY x DESC;
+ }
+} {0 {9 5 1}}
+
finish_test