Fossil SCM

Fix a bug in the pivot-finder introduced by check-in [917f1c21e52a29904] from 5 days ago.

drh 2018-06-05 23:06 trunk
Commit 83789c6e53416241cfacfe51999a3eeb5adb4d436c8b2c6109b5a925880dcbd8
1 file changed +4 -3
+4 -3
--- src/pivot.c
+++ src/pivot.c
@@ -38,15 +38,16 @@
3838
*/
3939
void pivot_set_primary(int rid){
4040
/* Set up table used to do the search */
4141
db_multi_exec(
4242
"CREATE TEMP TABLE IF NOT EXISTS aqueue("
43
- " rid INTEGER PRIMARY KEY," /* The record id for this version */
43
+ " rid INTEGER," /* The record id for this version */
4444
" mtime REAL," /* Time when this version was created */
4545
" pending BOOLEAN," /* True if we have not check this one yet */
46
- " src BOOLEAN" /* 1 for primary. 0 for others */
47
- ");"
46
+ " src BOOLEAN," /* 1 for primary. 0 for others */
47
+ " PRIMARY KEY(rid,src)"
48
+ ") WITHOUT ROWID;"
4849
"DELETE FROM aqueue;"
4950
"CREATE INDEX IF NOT EXISTS aqueue_idx1 ON aqueue(pending, mtime);"
5051
);
5152
5253
/* Insert the primary record */
5354
--- src/pivot.c
+++ src/pivot.c
@@ -38,15 +38,16 @@
38 */
39 void pivot_set_primary(int rid){
40 /* Set up table used to do the search */
41 db_multi_exec(
42 "CREATE TEMP TABLE IF NOT EXISTS aqueue("
43 " rid INTEGER PRIMARY KEY," /* The record id for this version */
44 " mtime REAL," /* Time when this version was created */
45 " pending BOOLEAN," /* True if we have not check this one yet */
46 " src BOOLEAN" /* 1 for primary. 0 for others */
47 ");"
 
48 "DELETE FROM aqueue;"
49 "CREATE INDEX IF NOT EXISTS aqueue_idx1 ON aqueue(pending, mtime);"
50 );
51
52 /* Insert the primary record */
53
--- src/pivot.c
+++ src/pivot.c
@@ -38,15 +38,16 @@
38 */
39 void pivot_set_primary(int rid){
40 /* Set up table used to do the search */
41 db_multi_exec(
42 "CREATE TEMP TABLE IF NOT EXISTS aqueue("
43 " rid INTEGER," /* The record id for this version */
44 " mtime REAL," /* Time when this version was created */
45 " pending BOOLEAN," /* True if we have not check this one yet */
46 " src BOOLEAN," /* 1 for primary. 0 for others */
47 " PRIMARY KEY(rid,src)"
48 ") WITHOUT ROWID;"
49 "DELETE FROM aqueue;"
50 "CREATE INDEX IF NOT EXISTS aqueue_idx1 ON aqueue(pending, mtime);"
51 );
52
53 /* Insert the primary record */
54

Keyboard Shortcuts

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