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:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user