Fossil SCM

Only create index when "case-sensitive" is off.

jan.nijtmans 2013-04-17 10:15 trunk
Commit 87ac9af8c672c14b9d5483cc3cf71470d09fb127
1 file changed +1 -1
+1 -1
--- src/add.c
+++ src/add.c
@@ -268,11 +268,11 @@
268268
if( vid==0 ){
269269
fossil_panic("no checkout to add to");
270270
}
271271
db_begin_transaction();
272272
db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
273
- if( caseSensitive ){
273
+ if( !caseSensitive ){
274274
db_multi_exec(
275275
"CREATE INDEX IF NOT EXISTS vfile_pathname "
276276
" ON vfile(pathname COLLATE nocase)"
277277
);
278278
}
279279
--- src/add.c
+++ src/add.c
@@ -268,11 +268,11 @@
268 if( vid==0 ){
269 fossil_panic("no checkout to add to");
270 }
271 db_begin_transaction();
272 db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
273 if( caseSensitive ){
274 db_multi_exec(
275 "CREATE INDEX IF NOT EXISTS vfile_pathname "
276 " ON vfile(pathname COLLATE nocase)"
277 );
278 }
279
--- src/add.c
+++ src/add.c
@@ -268,11 +268,11 @@
268 if( vid==0 ){
269 fossil_panic("no checkout to add to");
270 }
271 db_begin_transaction();
272 db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
273 if( !caseSensitive ){
274 db_multi_exec(
275 "CREATE INDEX IF NOT EXISTS vfile_pathname "
276 " ON vfile(pathname COLLATE nocase)"
277 );
278 }
279

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button