From: Adam Dickmeiss Date: Tue, 13 Oct 2009 11:48:58 +0000 (+0200) Subject: Make reclist sorting stable X-Git-Tag: v1.2.3~25 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=652fbb48e52b32905b4bfc4a0dcc4005856dae39;p=pazpar2-moved-to-github.git Make reclist sorting stable Make reclist sorting stable by comparing mergekey for records if relevance/title or other sorting criteria all match. This is merely to ensure that our regressions tests works (reproducible output). --- diff --git a/src/reclists.c b/src/reclists.c index bbb293c..9b9b258 100644 --- a/src/reclists.c +++ b/src/reclists.c @@ -165,6 +165,8 @@ static int reclist_cmp(const void *p1, const void *p2) res = 0; } } + if (res == 0) + res = strcmp(r1->recid, r2->recid); return res; } diff --git a/test/test_http_18.res b/test/test_http_18.res index d948728..77131ed 100644 --- a/test/test_http_18.res +++ b/test/test_http_18.res @@ -20,18 +20,6 @@ -OIL/GAS DRILLING -This database contains information on oil and gas drilling such as well name, operator, driller, location, depth, copies of logs run, permits, samples (cuttings, core), completion records -OIL/GAS DRILLING -This database contains information on oil and gas drilling such as well name, operator, driller, location, depth, copies of logs run, permits, samples (cuttings, core), completion records -1907-PRESENT -test-usersetting-2 data: - -0 -title oil gas drilling author medium book - - - GROUNDWATER RESOURCE MAPS - COUNTY SERIES A series of 1:250,000 scale maps showing well yield, well depth, and depth to bedrock for a large number of bedrock wells inventoried by the Maine Geological Survey in the mid-to late 1970's comprises this data set. Some series also show bedrock topography and potentiometric surface. Geographic coverage is restricted to Southern Maine GROUNDWATER RESOURCE MAPS - COUNTY SERIES @@ -42,4 +30,16 @@ 0 title groundwater resource maps county series author medium book + + +OIL/GAS DRILLING +This database contains information on oil and gas drilling such as well name, operator, driller, location, depth, copies of logs run, permits, samples (cuttings, core), completion records +OIL/GAS DRILLING +This database contains information on oil and gas drilling such as well name, operator, driller, location, depth, copies of logs run, permits, samples (cuttings, core), completion records +1907-PRESENT +test-usersetting-2 data: + +0 +title oil gas drilling author medium book + diff --git a/test/test_http_28.res b/test/test_http_28.res index a9b1d0a..d9ad8e6 100644 --- a/test/test_http_28.res +++ b/test/test_http_28.res @@ -15,24 +15,24 @@ -UTAH EARTHQUAKE EPICENTERS -UTAH EARTHQUAKE EPICENTERS +UTAH CRIB FILE +UTAH CRIB FILE 127197 -title utah earthquake epicenters author medium book +title utah crib file author medium book -UTAH CRIB FILE -UTAH CRIB FILE +UTAH EARTHQUAKE EPICENTERS +UTAH EARTHQUAKE EPICENTERS 127197 -title utah crib file author medium book +title utah earthquake epicenters author medium book -UTAH OIL FIELD FILE -UTAH OIL FIELD FILE +BIBLIOGRAPHY OF UTAH GEOLOGY +BIBLIOGRAPHY OF UTAH GEOLOGY 95398 -title utah oil field file author medium book +title bibliography of utah geology author medium book @@ -43,24 +43,24 @@ -UTAH GEOLOGICAL SOCIETY PUBLICATIONS -UTAH GEOLOGICAL SOCIETY PUBLICATIONS +UTAH GEOLOGICAL ASSOCIATION PUBLICATIONS +UTAH GEOLOGICAL ASSOCIATION PUBLICATIONS 95398 -title utah geological society publications author medium book +title utah geological association publications author medium book -UTAH GEOLOGICAL ASSOCIATION PUBLICATIONS -UTAH GEOLOGICAL ASSOCIATION PUBLICATIONS +UTAH GEOLOGICAL SOCIETY PUBLICATIONS +UTAH GEOLOGICAL SOCIETY PUBLICATIONS 95398 -title utah geological association publications author medium book +title utah geological society publications author medium book -BIBLIOGRAPHY OF UTAH GEOLOGY -BIBLIOGRAPHY OF UTAH GEOLOGY +UTAH OIL FIELD FILE +UTAH OIL FIELD FILE 95398 -title bibliography of utah geology author medium book +title utah oil field file author medium book @@ -78,13 +78,6 @@ -MINE MAP INDEX -MINE MAP INDEX -0 -title mine map index author medium book - - - COAL SAMPLE BANK COAL SAMPLE BANK 0 @@ -92,10 +85,10 @@ -MEASURED GEOLOGIC SECTIONS -MEASURED GEOLOGIC SECTIONS +ELECTRIC LOG LIBRARY +ELECTRIC LOG LIBRARY 0 -title measured geologic sections author medium book +title electric log library author medium book @@ -106,17 +99,17 @@ -ELECTRIC LOG LIBRARY -ELECTRIC LOG LIBRARY +MEASURED GEOLOGIC SECTIONS +MEASURED GEOLOGIC SECTIONS 0 -title electric log library author medium book +title measured geologic sections author medium book -WELL SAMPLE LIBRARY -WELL SAMPLE LIBRARY +MINE MAP INDEX +MINE MAP INDEX 0 -title well sample library author medium book +title mine map index author medium book @@ -125,4 +118,11 @@ 0 title oil impregnated rock deposits author medium book + + +WELL SAMPLE LIBRARY +WELL SAMPLE LIBRARY +0 +title well sample library author medium book + diff --git a/test/test_http_32.res b/test/test_http_32.res index ac9acea..dec8283 100644 --- a/test/test_http_32.res +++ b/test/test_http_32.res @@ -17,15 +17,6 @@ -OIL/GAS DRILLING -This database contains information on oil and gas drilling such as well name, operator, driller, location, depth, copies of logs run, permits, samples (cuttings, core), completion records -OIL/GAS DRILLING -This database contains information on oil and gas drilling such as well name, operator, driller, location, depth, copies of logs run, permits, samples (cuttings, core), completion records -0 -title oil gas drilling author oil gas drilling medium book - - - GROUNDWATER RESOURCE MAPS - COUNTY SERIES A series of 1:250,000 scale maps showing well yield, well depth, and depth to bedrock for a large number of bedrock wells inventoried by the Maine Geological Survey in the mid-to late 1970's comprises this data set. Some series also show bedrock topography and potentiometric surface. Geographic coverage is restricted to Southern Maine GROUNDWATER RESOURCE MAPS - COUNTY SERIES @@ -33,4 +24,13 @@ 0 title groundwater resource maps county series author groundwater resource maps county series medium book + + +OIL/GAS DRILLING +This database contains information on oil and gas drilling such as well name, operator, driller, location, depth, copies of logs run, permits, samples (cuttings, core), completion records +OIL/GAS DRILLING +This database contains information on oil and gas drilling such as well name, operator, driller, location, depth, copies of logs run, permits, samples (cuttings, core), completion records +0 +title oil gas drilling author oil gas drilling medium book + diff --git a/test/test_http_36.res b/test/test_http_36.res index 608f1e6..31ed24a 100644 --- a/test/test_http_36.res +++ b/test/test_http_36.res @@ -8,20 +8,6 @@ 8 -The use of passwords for controlled access to computer resources -1977 -Wood, Helen M -The use of passwords for controlled access to computer resources -1977 -Wood, Helen M -XXXXXXXXXX -test-usersetting-2 data: - YYYYYYYYY -5722 -title the use of passwords for controlled access to computer resources author wood helen m medium book - - - A plan for community college computer development 1971 Cover title @@ -36,6 +22,20 @@ +The use of passwords for controlled access to computer resources +1977 +Wood, Helen M +The use of passwords for controlled access to computer resources +1977 +Wood, Helen M +XXXXXXXXXX +test-usersetting-2 data: + YYYYYYYYY +5722 +title the use of passwords for controlled access to computer resources author wood helen m medium book + + + Washington metropolitan area rail computer feasibility study; final report 1971 @@ -54,6 +54,20 @@ +Computer science & technology +proceedings of a workshop held at the National Bureau of Standards, Gaithersburg, MD, June 3-4, 1976 +1977 +Computer science & technology +proceedings of a workshop held at the National Bureau of Standards, Gaithersburg, MD, June 3-4, 1976 +1977 +XXXXXXXXXX +test-usersetting-2 data: + YYYYYYYYY +4005 +title computer science technology author medium book + + + The Computer Bible 1973-1980 Vols. 2, 8: Missoula, Mont. : Published by Scholars Press for Biblical Research Associates @@ -69,20 +83,6 @@ -Computer science & technology -proceedings of a workshop held at the National Bureau of Standards, Gaithersburg, MD, June 3-4, 1976 -1977 -Computer science & technology -proceedings of a workshop held at the National Bureau of Standards, Gaithersburg, MD, June 3-4, 1976 -1977 -XXXXXXXXXX -test-usersetting-2 data: - YYYYYYYYY -4005 -title computer science technology author medium book - - - The Puget Sound Region a portfolio of thematic computer maps 1974 diff --git a/test/test_http_41.res b/test/test_http_41.res index c78186c..b7ca6cf 100644 --- a/test/test_http_41.res +++ b/test/test_http_41.res @@ -8,24 +8,31 @@ 8 -UTAH EARTHQUAKE EPICENTERS -UTAH EARTHQUAKE EPICENTERS +APPLIED GEOLOGY FILE +APPLIED GEOLOGY FILE 0 -title utah earthquake epicenters author medium book +title applied geology file author medium book -UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS -UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS +ELECTRIC LOG LIBRARY +ELECTRIC LOG LIBRARY 0 -title utah geological and mineral survey publications author medium book +title electric log library author medium book -APPLIED GEOLOGY FILE -APPLIED GEOLOGY FILE +ISOTOPIC DATES OF ROCKS AND MINERALS +ISOTOPIC DATES OF ROCKS AND MINERALS 0 -title applied geology file author medium book +title isotopic dates of rocks and minerals author medium book + + + +MINE MAP INDEX +MINE MAP INDEX +0 +title mine map index author medium book @@ -36,10 +43,10 @@ -MINE MAP INDEX -MINE MAP INDEX +UTAH EARTHQUAKE EPICENTERS +UTAH EARTHQUAKE EPICENTERS 0 -title mine map index author medium book +title utah earthquake epicenters author medium book @@ -50,16 +57,9 @@ -ELECTRIC LOG LIBRARY -ELECTRIC LOG LIBRARY -0 -title electric log library author medium book - - - -ISOTOPIC DATES OF ROCKS AND MINERALS -ISOTOPIC DATES OF ROCKS AND MINERALS +UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS +UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS 0 -title isotopic dates of rocks and minerals author medium book +title utah geological and mineral survey publications author medium book diff --git a/test/test_http_5.res b/test/test_http_5.res index b2f35d7..8683442 100644 --- a/test/test_http_5.res +++ b/test/test_http_5.res @@ -27,20 +27,6 @@ -The use of passwords for controlled access to computer resources -1977 -Wood, Helen M -The use of passwords for controlled access to computer resources -1977 -Wood, Helen M -XXXXXXXXXX -test-usersetting-2 data: - YYYYYYYYY -4515 -title the use of passwords for controlled access to computer resources author wood helen m medium book - - - A plan for community college computer development 1971 Cover title @@ -55,6 +41,20 @@ +The use of passwords for controlled access to computer resources +1977 +Wood, Helen M +The use of passwords for controlled access to computer resources +1977 +Wood, Helen M +XXXXXXXXXX +test-usersetting-2 data: + YYYYYYYYY +4515 +title the use of passwords for controlled access to computer resources author wood helen m medium book + + + Washington metropolitan area rail computer feasibility study; final report 1971 @@ -73,6 +73,20 @@ +Computer science & technology +proceedings of a workshop held at the National Bureau of Standards, Gaithersburg, MD, June 3-4, 1976 +1977 +Computer science & technology +proceedings of a workshop held at the National Bureau of Standards, Gaithersburg, MD, June 3-4, 1976 +1977 +XXXXXXXXXX +test-usersetting-2 data: + YYYYYYYYY +3160 +title computer science technology author medium book + + + The Computer Bible 1973-1980 Vols. 2, 8: Missoula, Mont. : Published by Scholars Press for Biblical Research Associates @@ -88,20 +102,6 @@ -Computer science & technology -proceedings of a workshop held at the National Bureau of Standards, Gaithersburg, MD, June 3-4, 1976 -1977 -Computer science & technology -proceedings of a workshop held at the National Bureau of Standards, Gaithersburg, MD, June 3-4, 1976 -1977 -XXXXXXXXXX -test-usersetting-2 data: - YYYYYYYYY -3160 -title computer science technology author medium book - - - The Puget Sound Region a portfolio of thematic computer maps 1974 diff --git a/test/test_http_6.res b/test/test_http_6.res index 51684c0..bd664dd 100644 --- a/test/test_http_6.res +++ b/test/test_http_6.res @@ -1,7 +1,7 @@ title how to program a computer author jack collins medium book -title the use of passwords for controlled access to computer resources author wood helen m medium book +title a plan for community college computer development author medium book 0 How to program a computer diff --git a/test/test_post_9.res b/test/test_post_9.res index c3e85a8..e28d1a8 100644 --- a/test/test_post_9.res +++ b/test/test_post_9.res @@ -8,10 +8,10 @@ 3 -OIL/GAS DRILLING -OIL/GAS DRILLING +BIBLIOGRAPHY OF MAINE GEOLOGY +BIBLIOGRAPHY OF MAINE GEOLOGY 0 -title oil gas drilling author medium book +title bibliography of maine geology author medium book @@ -22,9 +22,9 @@ -BIBLIOGRAPHY OF MAINE GEOLOGY -BIBLIOGRAPHY OF MAINE GEOLOGY +OIL/GAS DRILLING +OIL/GAS DRILLING 0 -title bibliography of maine geology author medium book +title oil gas drilling author medium book