1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Have REINDEX handle missing collation sequences correctly. (CVS 2280)

FossilOrigin-Name: 1c1904f44310fa0e327d8f0a77f1cf97599b630a
This commit is contained in:
danielk1977
2005-01-27 00:22:02 +00:00
parent 536065afef
commit 33a5edc3a4
4 changed files with 53 additions and 11 deletions

View File

@@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library.
# This file implements tests for the REINDEX command.
#
# $Id: reindex.test,v 1.2 2004/11/07 13:01:50 drh Exp $
# $Id: reindex.test,v 1.3 2005/01/27 00:22:04 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -141,4 +141,32 @@ do_test reindex-2.8 {
} {ABCD BCDE abc bcd}
integrity_check reindex-2.8.1
# Try to REINDEX an index for which the collation sequence is not available.
#
do_test reindex-3.1 {
sqlite3 db2 test.db
catchsql {
REINDEX c1;
} db2
} {1 {no such collation sequence: c1}}
do_test reindex-3.2 {
proc need_collate {collation} {
db2 collate c1 c1
}
db2 collation_needed need_collate
catchsql {
REINDEX c1;
} db2
} {0 {}}
do_test reindex-3.3 {
catchsql {
REINDEX;
} db2
} {1 {no such collation sequence: c2}}
do_test reindex-3.99 {
db2 close
} {}
finish_test