=== modified file 'mysql-test/r/gis-precise.result' --- mysql-test/r/gis-precise.result 2010-10-14 05:33:13 +0000 +++ mysql-test/r/gis-precise.result 2011-01-11 09:17:48 +0000 @@ -160,15 +160,16 @@ select astext(geom), area(geom),area(ST_ astext(geom) area(geom) area(ST_buffer(geom,2)) POLYGON((0 0,10 10,0 8,0 0)) 40 101.67150840374886 POLYGON((1 1,10 10,0 8,1 1)) 36 108.55539589266459 -select astext(ST_buffer(geom,2)) from t1; -astext(ST_buffer(geom,2)) -POLYGON((1.414213562373095 -1.414213562373095,-1.414213562373095 1.414213562373095,0 2.82842712474619,0 6.000050261222183,-0.09604577729856129 6.0023075290067505,-0.19395220952652842 6.009426579997669,-0.2913913938935395 6.021341096711012,-0.38812859086978896 6.03802237603243,-0.4839307520745837 6.059430231298929,-0.578567081710303 6.085513089112066,-0.6718095925696909 6.116208113582781,-0.7634336552770082 6.151441357708556,-0.8532185394398725 6.191127941518226,-0.940947945408108 6.235172256555257,-1.0264105253585494 6.283468196206902,-1.1094003924504583 6.335899411324313,-1.189717616824956 6.39233959051784,-1.2671687072535667 6.45265276445223,-1.341567077275533 6.516693633408666,-1.4127334947009451 6.584307917324514,-1.480496513396783 6.655332727467508,-1.5446928863156684 6.729596958848976,-1.6051679587723025 6.806921702430742,-1.661776041020146 6.8871206761326675,-1.7143807592307814 6.970000673602507,-1.7628553840304106 7.055362029666924,-1.8070831358020145 7.142999101342386,-1.8469574660176828 7.232700763247128,-1.8823823139233473 7.3242509162206835,-1.913272337957552 7.417429007925692,-1.9395531213467532 7.512010564177801,-1.9611613513818404 7.607767729723632,-1.9780449719440023 7.704469817164048,-1.990163308912474 7.8018838627003015,-1.9974871681520578 7.899775187364235,-1.9999989058443504 7.997907962380466,-1.9976924709932495 8.096045777298562,-1.9905734200023315 8.193952209526529,-1.978658903288988 8.291391393893539,-1.9619776239675701 8.388128590869789,-1.940569768701071 8.483930752074583,-1.9144869108879337 8.578567081710304,-1.8837918864172196 8.67180959256969,-1.848558642291444 8.763433655277009,-1.8088720584817741 8.853218539439872,-1.7648277434447421 8.940947945408109,-1.716531803793098 9.02641052535855,-1.6641005886756872 9.109400392450459,-1.6076604094821603 9.189717616824955,-1.5473472355477698 9.267168707253568,-1.483306366591334 9.341567077275533,-1.415692082675486 9.412733494700944,-1.3446672725324915 9.480496513396783,-1.2704030411510234 9.54469288631567,-1.1930782975692584 9.605167958772302,-1.1128793238673322 9.661776041020147,-1.0299993263974934 9.714380759230782,-0.9446379703330767 9.762855384030411,-0.8570008986576141 9.807083135802014,-0.7672992367528719 9.846957466017683,-0.6757490837793165 9.882382313923348,-0.5825709920743072 9.913272337957553,-0.4879894358221987 9.939553121346753,-0.3922322702763681 9.96116135138184,-0.2955301828359524 9.978044971944003,-0.3922322702763681 9.96116135138184,9.607767729723632 11.96116135138184,9.609819355967744 11.96157056080646,9.706539051089276 11.978353019929562,9.803965719340878 11.990369453344393,9.901864651345164 11.997590912410345,10 12,10.098135348654836 11.997590912410345,10.196034280659122 11.990369453344393,10.293460948910724 11.978353019929562,10.390180644032256 11.96157056080646,10.485960359806528 11.940062506389088,10.580569354508924 11.913880671464417,10.67377970678444 11.88308813036604,10.76536686473018 11.847759065022574,10.855110186860564 11.807978586246886,10.942793473651996 11.76384252869671,11.028205488386444 11.715457220000545,11.111140466039204 11.66293922460509,11.191398608984866 11.60641506296129,11.268786568327291 11.546020906725474,11.343117909694037 11.481902250709918,11.414213562373096 11.414213562373096,11.481902250709918 11.343117909694037,11.546020906725474 11.268786568327291,11.60641506296129 11.191398608984866,11.66293922460509 11.111140466039204,11.715457220000545 11.028205488386444,11.76384252869671 10.942793473651996,11.807978586246886 10.855110186860564,11.847759065022574 10.76536686473018,11.88308813036604 10.67377970678444,11.913880671464417 10.580569354508924,11.940062506389088 10.485960359806528,11.96157056080646 10.390180644032256,11.978353019929562 10.293460948910724,11.990369453344393 10.196034280659122,11.997590912410345 10.098135348654836,12 10,11.997590912410345 9.901864651345164,11.990369453344393 9.803965719340878,11.978353019929562 9.706539051089276,11.96157056080646 9.609819355967744,11.940062506389088 9.514039640193472,11.913880671464417 9.419430645491076,11.88308813036604 9.32622029321556,11.847759065022574 9.23463313526982,11.807978586246886 9.144889813139436,11.76384252869671 9.057206526348004,11.715457220000545 8.971794511613556,11.66293922460509 8.888859533960796,11.60641506296129 8.808601391015134,11.546020906725474 8.731213431672709,11.481902250709918 8.656882090305963,11.414213562373096 8.585786437626904,1.414213562373095 -1.414213562373095)) -POLYGON((0.9892698494111194 -0.9999712157599518,0.8911488380683092 -0.9970356593075951,0.7932900587088283 -0.9892890690323013,0.6959292617035704 -0.9767501071485654,0.5993009977403192 -0.959448981113848,0.5036380527705995 -0.9374273708561667,0.40917088720792716 -0.9107383283634973,0.3161270807284893 -0.8794461498768888,0.2247307840117696 -0.843626220995187,0.13520217874192864 -0.8033648350645226,0.04775694717084156 -0.7587589852900836,-0.03739424747933939 -0.7099161310709878,-0.12004626852233802 -0.6569539391211774,-0.19999999999999996 -0.5999999999999999,-0.27706282637007584 -0.5391915207353741,-0.35104909653393324 -0.47467499428004234,-0.42178057108631606 -0.40660584659721555,-0.4890868517096818 -0.3351480622258147,-0.5528057916786753 -0.26047378922735365,-0.6127838864857904 -0.18276292446617926,-0.6688766436471771 -0.10220268022216916,-0.7209489307976877 -0.018987133179951154,-0.7688753012365837 0.06668324311882912,-0.8125402961396226 0.15460206123382925,-0.8518387227094812 0.2445575170314307,-0.8866759075944177 0.33633289993945015,-0.9169679249646674 0.4297071150218881,-0.9426417986971172 0.5244552156159955,-0.9636356781811806 0.6203489452484875,-0.9798989873223332 0.717157287525381,-1.9798989873223332 7.717157287525381,-1.990163308912474 7.8018838627003015,-1.9974871681520578 7.899775187364235,-1.9999989058443504 7.997907962380466,-1.9976924709932495 8.096045777298562,-1.9905734200023315 8.193952209526529,-1.978658903288988 8.291391393893539,-1.9619776239675701 8.388128590869789,-1.940569768701071 8.483930752074583,-1.9144869108879337 8.578567081710304,-1.8837918864172196 8.67180959256969,-1.848558642291444 8.763433655277009,-1.8088720584817741 8.853218539439872,-1.7648277434447421 8.940947945408109,-1.716531803793098 9.02641052535855,-1.6641005886756872 9.109400392450459,-1.6076604094821603 9.189717616824955,-1.5473472355477698 9.267168707253568,-1.483306366591334 9.341567077275533,-1.415692082675486 9.412733494700944,-1.3446672725324915 9.480496513396783,-1.2704030411510234 9.54469288631567,-1.1930782975692584 9.605167958772302,-1.1128793238673322 9.661776041020147,-1.0299993263974934 9.714380759230782,-0.9446379703330767 9.762855384030411,-0.8570008986576141 9.807083135802014,-0.7672992367528719 9.846957466017683,-0.6757490837793165 9.882382313923348,-0.5825709920743072 9.913272337957553,-0.4879894358221987 9.939553121346753,-0.3922322702763681 9.96116135138184,9.607767729723632 11.96116135138184,9.609819355967744 11.96157056080646,9.706539051089276 11.978353019929562,9.803965719340878 11.990369453344393,9.901864651345164 11.997590912410345,10 12,10.098135348654836 11.997590912410345,10.196034280659122 11.990369453344393,10.293460948910724 11.978353019929562,10.390180644032256 11.96157056080646,10.485960359806528 11.940062506389088,10.580569354508924 11.913880671464417,10.67377970678444 11.88308813036604,10.76536686473018 11.847759065022574,10.855110186860564 11.807978586246886,10.942793473651996 11.76384252869671,11.028205488386444 11.715457220000545,11.111140466039204 11.66293922460509,11.191398608984866 11.60641506296129,11.268786568327291 11.546020906725474,11.343117909694037 11.481902250709918,11.414213562373096 11.414213562373096,11.481902250709918 11.343117909694037,11.546020906725474 11.268786568327291,11.60641506296129 11.191398608984866,11.66293922460509 11.111140466039204,11.715457220000545 11.028205488386444,11.76384252869671 10.942793473651996,11.807978586246886 10.855110186860564,11.847759065022574 10.76536686473018,11.88308813036604 10.67377970678444,11.913880671464417 10.580569354508924,11.940062506389088 10.485960359806528,11.96157056080646 10.390180644032256,11.978353019929562 10.293460948910724,11.990369453344393 10.196034280659122,11.997590912410345 10.098135348654836,12 10,11.997590912410345 9.901864651345164,11.990369453344393 9.803965719340878,11.978353019929562 9.706539051089276,11.96157056080646 9.609819355967744,11.940062506389088 9.514039640193472,11.913880671464417 9.419430645491076,11.88308813036604 9.32622029321556,11.847759065022574 9.23463313526982,11.807978586246886 9.144889813139436,11.76384252869671 9.057206526348004,11.715457220000545 8.971794511613556,11.66293922460509 8.888859533960796,11.60641506296129 8.808601391015134,11.546020906725474 8.731213431672709,11.481902250709918 8.656882090305963,11.414213562373096 8.585786437626904,2.414213562373095 -0.4142135623730949,2.4066058465972153 -0.42178057108631606,2.335148062225815 -0.4890868517096818,2.260473789227354 -0.5528057916786753,2.1827629244661795 -0.6127838864857904,2.1022026802221694 -0.6688766436471771,2.018987133179951 -0.7209489307976877,1.9333167568811709 -0.7688753012365837,1.8453979387661708 -0.8125402961396226,1.7554424829685693 -0.8518387227094812,1.6636671000605499 -0.8866759075944177,1.570292884978112 -0.9169679249646674,1.4755447843840046 -0.9426417986971172,1.3796510547515126 -0.9636356781811806,1.282842712474619 -0.9798989873223332,1.1853529773292786 -0.9913925463843567,1.0874167106265484 -0.9980886663767536,0.9892698494111194 -0.9999712157599518)) +select NUMPOINTS(EXTERIORRING(ST_buffer(geom,2))) from t1; +NUMPOINTS(EXTERIORRING(ST_buffer(geom,2))) +121 +134 set @geom=geomfromtext('LINESTRING(2 1, 4 2, 2 3, 2 5)'); set @buff=ST_buffer(@geom,1); -select astext(@buff); -astext(@buff) -POLYGON((2.0218594008566466 0.00023894525032219782,1.9727771204112932 0.00037061126290494073,1.9237604222673113 0.002910472030148492,1.8749273919438858 0.0078524088049996,1.8263956724883341 0.015184516028905026,1.7782821810637013 0.024889130013345362,1.7307028272850733 0.03694287149320841,1.683772233983162 0.05131670194948634,1.6376034610678665 0.06797599356561079,1.592307733157046 0.08688061264889702,1.5479941716266756 0.10798501631612445,1.504769531727891 0.13123836221033125,1.46273794540424 0.1565846309845056,1.4220006704287085 0.18396276125709976,1.382655846464876 0.21330679671424568,1.3447982586398712 0.24454604500429356,1.3085191091986976 0.2776052480418776,1.2739057977900368 0.3124047633112361,1.241041710912841 0.34886075573200737,1.2100060210309511 0.38688539962528223,1.1808734958396978 0.4263870902933562,1.1537143181439746 0.46727066470347056,1.1285939167817136 0.5094376307438929,1.1055728090000843 0.5527864045000421,1.0847064546641425 0.5972125549790352,1.0660451226491614 0.6426090556930975,1.0496337697385036 0.6888665424957445,1.0355119323187965 0.7358735770495916,1.0237136311333106 0.7835169152910685,1.0142672893230111 0.8316817802452878,1.0071956639527206 0.8802521385338314,1.0025157911873577 0.9291109799093207,1.0002389452503222 0.9781405991433534,1.000370611262905 1.0272228795887068,1.0029104720301485 1.0762395777326887,1.0078524088049996 1.1250726080561142,1.015184516028905 1.1736043275116659,1.0248891300133454 1.2217178189362987,1.0369428714932085 1.2692971727149267,1.0513167019494865 1.316227766016838,1.0679759935656108 1.3623965389321335,1.086880612648897 1.407692266842954,1.1079850163161244 1.4520058283733244,1.1312383622103312 1.495230468272109,1.1565846309845056 1.53726205459576,1.1839627612570998 1.5779993295712915,1.2133067967142457 1.617344153535124,1.2445460450042936 1.6552017413601288,1.2776052480418776 1.6914808908013024,1.3124047633112361 1.7260942022099632,1.3488607557320074 1.758958289087159,1.3868853996252821 1.7899939789690489,1.4263870902933562 1.8191265041603022,1.4672706647034706 1.8462856818560254,1.5094376307438928 1.8714060832182864,1.5527864045000421 1.8944271909999157,1.7639320225002106 2,1.5527864045000421 2.1055728090000843,1.5286032631740025 2.118078735651645,1.4858972558067784 2.1422713899997277,1.4444297669803978 2.1685303876974547,1.4043006955075668 2.196792468519355,1.3656067158363545 2.226989546637263,1.3284410451529816 2.259048874645041,1.2928932188134525 2.2928932188134525,1.2590488746450408 2.3284410451529816,1.2269895466372631 2.3656067158363543,1.1967924685193552 2.4043006955075668,1.1685303876974547 2.444429766980398,1.1422713899997279 2.4858972558067784,1.118078735651645 2.5286032631740025,1.0960107068765566 2.572444906569718,1.0761204674887133 2.6173165676349104,1.0584559348169793 2.66311014660778,1.043059664267791 2.709715322745538,1.029968746805456 2.757019820096736,1.0192147195967696 2.8049096779838716,1.0108234900352189 2.853269525544638,1.0048152733278033 2.9019828596704396,1.0012045437948276 2.950932325672582,1 3,1 5,1.0048152733278033 5.098017140329561,1.0108234900352189 5.146730474455362,1.0192147195967696 5.195090322016128,1.029968746805456 5.242980179903264,1.043059664267791 5.290284677254462,1.0584559348169793 5.33688985339222,1.0761204674887133 5.38268343236509,1.0960107068765566 5.427555093430282,1.118078735651645 5.471396736825998,1.1422713899997279 5.514102744193222,1.1685303876974547 5.555570233019602,1.1967924685193552 5.595699304492434,1.2269895466372631 5.634393284163646,1.2590488746450408 5.671558954847018,1.2928932188134525 5.707106781186548,1.3284410451529816 5.740951125354959,1.3656067158363545 5.773010453362737,1.4043006955075668 5.803207531480645,1.4444297669803978 5.831469612302545,1.4858972558067784 5.857728610000272,1.5286032631740025 5.881921264348355,1.572444906569718 5.903989293123443,1.6173165676349102 5.923879532511287,1.6631101466077798 5.941544065183021,1.7097153227455377 5.956940335732209,1.7570198200967362 5.970031253194544,1.8049096779838716 5.98078528040323,1.853269525544638 5.989176509964781,1.9019828596704393 5.995184726672197,1.950932325672582 5.998795456205173,2 6,2.049067674327418 5.998795456205173,2.0980171403295604 5.995184726672197,2.146730474455362 5.989176509964781,2.1950903220161284 5.98078528040323,2.242980179903264 5.970031253194544,2.290284677254462 5.956940335732209,2.33688985339222 5.941544065183021,2.3826834323650896 5.923879532511287,2.427555093430282 5.903989293123443,2.4713967368259975 5.881921264348355,2.5141027441932216 5.857728610000272,2.555570233019602 5.831469612302545,2.5956993044924332 5.803207531480645,2.6343932841636457 5.773010453362737,2.6715589548470184 5.740951125354959,2.7071067811865475 5.707106781186548,2.740951125354959 5.671558954847018,2.773010453362737 5.634393284163646,2.803207531480645 5.595699304492434,2.8314696123025453 5.555570233019602,2.8577286100002723 5.514102744193222,2.881921264348355 5.471396736825998,2.9039892931234434 5.427555093430282,2.923879532511287 5.38268343236509,2.9415440651830207 5.33688985339222,2.956940335732209 5.290284677254462,2.970031253194544 5.242980179903264,2.9807852804032304 5.195090322016128,2.989176509964781 5.146730474455362,2.9951847266721967 5.098017140329561,2.9987954562051726 5.049067674327418,3 5,3 3.618033988749895,4.447213595499958 2.8944271909999157,4.452005828373324 2.8920149836838753,4.4952304682721085 2.8687616377896688,4.53726205459576 2.8434153690154944,4.577999329571291 2.8160372387429002,4.617344153535124 2.786693203285754,4.655201741360129 2.7554539549957067,4.691480890801302 2.7223947519581224,4.726094202209963 2.6875952366887637,4.758958289087159 2.6511392442679926,4.789993978969049 2.613114600374718,4.819126504160303 2.573612909706644,4.846285681856025 2.5327293352965294,4.871406083218286 2.490562369256107,4.894427190999916 2.447213595499958,4.9152935453358575 2.402787445020965,4.933954877350839 2.3573909443069025,4.950366230261497 2.3111334575042557,4.964488067681204 2.2641264229504086,4.976286368866689 2.2164830847089316,4.985732710676989 2.1683182197547124,4.992804336047279 2.1197478614661684,4.997484208812643 2.070889020090679,4.999761054749678 2.0218594008566466,4.999629388737095 1.9727771204112932,4.997089527969852 1.9237604222673113,4.992147591195001 1.8749273919438858,4.984815483971095 1.8263956724883341,4.975110869986654 1.7782821810637013,4.963057128506792 1.7307028272850733,4.948683298050514 1.683772233983162,4.932024006434389 1.6376034610678665,4.913119387351103 1.592307733157046,4.892014983683875 1.5479941716266756,4.868761637789669 1.504769531727891,4.843415369015494 1.46273794540424,4.816037238742901 1.4220006704287085,4.786693203285754 1.382655846464876,4.755453954995707 1.3447982586398712,4.722394751958122 1.3085191091986976,4.687595236688764 1.2739057977900368,4.651139244267993 1.241041710912841,4.613114600374717 1.2100060210309511,4.573612909706644 1.1808734958396978,4.53272933529653 1.1537143181439746,4.490562369256107 1.1285939167817136,4.447213595499958 1.1055728090000843,2.447213595499958 0.10557280900008414,2.3573909443069025 0.06604512264916129,2.3111334575042557 0.04963376973850353,2.2641264229504086 0.03551193231879646,2.2164830847089316 0.023713631133310598,2.1683182197547124 0.014267289323011023,2.1197478614661684 0.007195663952720532,2.070889020090679 0.0025157911873575634,2.0218594008566466 0.00023894525032219782)) +select NUMPOINTS(EXTERIORRING(@buff)) from t1; +NUMPOINTS(EXTERIORRING(@buff)) +202 +202 DROP TABLE t1; select st_touches(geomfromtext('point(0 0)'), geomfromtext('point(1 1)')); st_touches(geomfromtext('point(0 0)'), geomfromtext('point(1 1)')) === modified file 'mysql-test/t/gis-precise.test' --- mysql-test/t/gis-precise.test 2010-06-30 11:04:45 +0000 +++ mysql-test/t/gis-precise.test 2011-01-11 09:17:37 +0000 @@ -64,7 +64,9 @@ select ST_DISTANCE(geomfromtext('linestr # Operations tests +--replace_result 23.85542168674699 23.855421686746986 select astext(ST_Intersection(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('POLYGON((50 5, 55 10, 0 45, 50 5))'))); +--replace_result 23.85542168674699 23.855421686746986 select astext(ST_Intersection(GeomFromText('LINESTRING(0 0, 50 45, 40 50, 0 0)'), GeomFromText('LINESTRING(50 5, 55 10, 0 45, 50 5)'))); select astext(ST_Intersection(GeomFromText('LINESTRING(0 0, 50 45, 40 50)'), GeomFromText('LINESTRING(50 5, 55 10, 0 45)'))); select astext(ST_Intersection(GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), GeomFromText('POINT(20 20)'))); @@ -82,12 +84,13 @@ select astext(ST_buffer(geometryfromtext create table t1(geom geometrycollection); insert into t1 values (geomfromtext('POLYGON((0 0, 10 10, 0 8, 0 0))')); insert into t1 values (geomfromtext('POLYGON((1 1, 10 10, 0 8, 1 1))')); +--replace_result 101.67150840374887 101.67150840374886 108.55539589266462 108.55539589266459 select astext(geom), area(geom),area(ST_buffer(geom,2)) from t1; -select astext(ST_buffer(geom,2)) from t1; +select NUMPOINTS(EXTERIORRING(ST_buffer(geom,2))) from t1; set @geom=geomfromtext('LINESTRING(2 1, 4 2, 2 3, 2 5)'); set @buff=ST_buffer(@geom,1); -select astext(@buff); +select NUMPOINTS(EXTERIORRING(@buff)) from t1; # cleanup DROP TABLE t1; === modified file 'mysql-test/t/gis.test' --- mysql-test/t/gis.test 2010-11-04 15:40:18 +0000 +++ mysql-test/t/gis.test 2011-01-11 09:21:03 +0000 @@ -361,7 +361,7 @@ t1 where object_id=85998; # Expected result is 36.3310176346905, but IA64 returns 36.3310176346904 # due to fused multiply-add instructions. ---replace_result 36.3310176346904 36.3310176346905 +--replace_result 36.3310176346904 36.3310176346905 -114.87787186923326 -114.87787186923313 36.33101763469053 36.33101763469059 36.33101763469043 36.33101763469059 select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from t1 where object_id=85984;