5adcf6bc2904690de7b7b30a83ec8a7a0996abe9 galt Tue Aug 21 00:01:25 2018 -0700 changing cse subdomain to soe diff --git src/hg/geoIp/README src/hg/geoIp/README index e7a1e7c..7bc30b8 100644 --- src/hg/geoIp/README +++ src/hg/geoIp/README @@ -110,31 +110,31 @@ Europe update continentToNode set node=2 where continentId = "EU"; Asia update continentToNode set node=3 where continentId = "AS"; Now we just can make a join insert into countryToNode (select countryId, node from countryToContinent cc, continentToNode cn where cc.continentId = cn.continentId); # fix ones requested by Bob to be included in euro instead of defaulting to america. # these are mostly around the middle east. update countryToNode set node=2 where countryId in ('AE','AM','BH','CY','GE','IL','IQ','JO','KW','LB','OM','PS','QA','SA','SY','YE'); I compared the before and after updating with public_html/geoMap/test.csh at - http://hgwdev.cse.ucsc.edu/~galt/geoMap/countryToNodeMap.html + http://hgwdev.soe.ucsc.edu/~galt/geoMap/countryToNodeMap.html And it looked identical. So we did not lose anything. mysql> select distinct countryId from geoIpCountry where countryId not in (select distinct countryId from countryToNode); +-----------+ | countryId | +-----------+ | SS | | CW | | SX | | BQ | +-----------+ mysql> select * from country where id in ('SS','CW','SX','BQ'); +----+--------------+ | id | name | @@ -152,31 +152,31 @@ insert into countryToContinent values ('SS', 'AF'); insert into countryToContinent values ('SX', 'NA'); insert into countryToContinent values ('CW', 'NA'); insert into countryToContinent values ('BQ', 'NA'); insert into countryToNode values ('SS', '1'); insert into countryToNode values ('SX', '1'); insert into countryToNode values ('CW', '1'); insert into countryToNode values ('BQ', '1'); mysql> select distinct countryId from geoIpCountry where countryId not in (select distinct countryId from countryToNode); Empty set (0.13 sec) Re-ran test.csh and checked again: -http://hgwdev.cse.ucsc.edu/~galt/geoMap/countryToNodeMap.html +http://hgwdev.soe.ucsc.edu/~galt/geoMap/countryToNodeMap.html This means we should have full integrity. insert into geoIpNode (select ipStart, ipEnd, node from geoIpCountry gic, countryToNode ctn where gic.countryId=ctn.countryId); Query OK, 164390 rows affected (1.61 sec) Records: 164390 Duplicates: 0 Warnings: 0 NOW IT IS READY! Note that in the future we may be putting other contries with other servers, like we did with the middle-east countries, overriding their default continent mappings in countryToNode.