1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-01-06 08:01:16 +03:00

Strive to make sorts stable in the mkpragmatab.tcl build script, so that

we get consistent amalgamations regardless of platform.
[forum:/forumpost/c9914addebf3da51|Forum thread c9914addebf3da51].

FossilOrigin-Name: 3f57584710d611748eb0af797c58c72e4ac099db09f5286cafdbd9a8ce354c90
This commit is contained in:
drh
2025-02-27 16:07:49 +00:00
parent 157d9276a0
commit 1d54203394
3 changed files with 12 additions and 10 deletions

View File

@@ -528,10 +528,13 @@ foreach f [lsort [array names allflags]] {
set fv [expr {$fv*2}]
}
# Sort the column lists so that longer column lists occur first
# Sort the column lists so that longer column lists occur first.
# In the event of a tie, sort column lists lexicographically.
#
proc colscmp {a b} {
return [expr {[llength $b] - [llength $a]}]
set rc [expr {[llength $b] - [llength $a]}]
if {$rc} {return $rc}
return [string compare $a $b]
}
set cols_list [lsort -command colscmp $cols_list]