<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I have found "Segmentation fault" message in apache error.log each time I run GetFeatureInfo with MySQL join. No problem with PostgreSQL :-(<div><br></div><div>Any clue? Should I report it as a bug?</div><div><br></div><div>dejan<br><div><div>On 13. ruj. 2011., at 22:51, Dejan Gambin wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Of course. And everything works when using ogrinfo for example<div><br></div><div>dejan<br><div><div>On 13. ruj. 2011., at 20:19, Carlos Ruiz wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><span>Dejan,</span></div><div><br><span></span></div><div><span>One question: If you look at the OGR supported formats, does MySQL appears ?</span></div><div><br></div><div>Cheers from México<br></div><div><br><span></span></div><div><font style="font-weight:bold;color:rgb(0, 96, 191);font-family:verdana, helvetica, sans-serif;" size="2">IC Carlos Ruiz</font><br><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Dejan Gambin <<a href="mailto:dejan.gambin@coin.hr">dejan.gambin@coin.hr</a>><br><b><span style="font-weight: bold;">To:</span></b> <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><b><span style="font-weight: bold;">Sent:</span></b> Tuesday, September 13, 2011 8:13
AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [mapserver-users] GetFeatureInfo using MySQL join - additional info<br></font><br><div id="yiv1497902337">I was finally successful with getting data from joined table through GetFeatureInfo. But:<div><br></div><div>1. It works only for PostgreSQL connection, not with MySQL - is it supposed to be so in MapServer 6? I saw the JOIN documentation changed and there is no MySQL mentioned any more/</div><div>2. I get nicely returned data from one-to-many join, using templates (thanks to Ted Spradley post). But gml returns only the main data, not the joined data. Is it supposed to be so?</div><div><br></div><div>Thanks very much</div><div><br></div><div>regards, dejan<br><div><div>On 13. ruj. 2011., at 09:00, Dejan Gambin wrote:</div><br class="yiv1497902337Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap:break-word;">Some additional info:<div><br></div><div>Since I need
this data only for GetFeatureRequest, it seems like I should use JOIN within a LAYER object. So I did the following:</div><div><br></div><div>LAYER</div><div>...</div><div> DATA "my"</div><div> ...</div><div> ...</div><div><div><div> DUMP TRUE</div><div> TEMPLATE "template.html"</div><div> HEADER "template_header.html"</div><div> FOOTER "template_footer.html"</div></div><div> JOIN</div><div> NAME "test"</div><div> CONNECTION "MySQL:gis,host=localhost,user=gis,password=gis,tables=katastar_vodnjan"</div><div># CONNECTION "PG:host=localhost user=postgres password=runda711 dbname=vodnjan port=5432" </div><div> CONNECTIONTYPE ogr</div><div> TABLE "katastar_vodnjan"</div><div> FROM "KO_KC"</div><div> TO
"broj_ko_kc"</div><div> TYPE ONE-TO-MANY</div><div> TEMPLATE "template_join.html"</div><div>#<span class="yiv1497902337Apple-tab-span" style="white-space:pre;"> </span>HEADER "template_header.html"</div><div>#<span class="yiv1497902337Apple-tab-span" style="white-space:pre;"> </span>FOOTER "template_footer.html" </div><div> END </div><div><br></div><div>I tried this with joined data from MySQL and from Postgres. No success. The interesting thing is, when I do:</div><div><br></div><div>shp2img -m my.map -o image.png -l "mylayer" -all_debug 3</div><div><br></div><div>I get:</div><div><br></div><div><div>[Tue Sep 13 08:58:04 2011].271467 msLoadMap(): 0.029s</div><div>[Tue Sep 13 08:58:04 2011].356888 msDrawMap(): Layer 0 (katastar_vodnjan_poligon), 0.083s</div><div>[Tue Sep 13 08:58:04 2011].356943 msDrawMap(): Drawing Label Cache, 0.000s</div><div>[Tue Sep 13 08:58:04 2011].356956
msDrawMap() total time: 0.085s</div><div>[Tue Sep 13 08:58:04 2011].399386 msSaveImage() total time: 0.042s</div><div>[Tue Sep 13 08:58:04 2011].402773 msPOSTGRESQLJoinClose() already close or never opened.</div><div>[Tue Sep 13 08:58:04 2011].402821 shp2img total time: 0.161s</div></div><div><br></div><div>Does anybody know what is it? It happens for MySQL and Postgres database join</div><div><br></div><div>thanks very much</div><div><br></div><div>dejan</div><div><br></div><div><br></div><div><div>On 12. ruj. 2011., at 14:03, Dejan Gambin wrote:</div><br class="yiv1497902337Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap:break-word;">Hi,<div><br></div><div>After solving my compile problem (thanks to thomas), I need to do GetFeatureInfo to a shape layer joined to MySQL table (non-spatial join).</div><div><br></div><div>I compiled MapServer with MySQL support and everything seems ok, but "mapserv -v" doesn't return
"INPUT=MYSQL". Is it supposed to anyway? Or it is enough to be compiled with gdal/ogr that supports MySQL?</div><div><br></div><div>Because - when I do this:</div><div><br></div><div>ogrinfo -sql "SELECT * FROM my LEFT JOIN 'MYSQL:gis,host=localhost,user=gis,password=gis'.katastar_vodnjan ON my.KO_KC=katastar_vodnjan.broj_ko_kc" /var/www/data/vodnjan/my.shp</div><div><br></div><div>I get all the attributes from shape (dbf) and MySQL, so everything seems fine</div><div><br></div><div>But using thi:</div><div><br></div><div><div>LAYER # katastar vodnjan poligoni</div><div> NAME "mylayer"</div><div> STATUS ON</div><div> CONNECTIONTYPE ogr </div><div> CONNECTION "/var/www/data/vodnjan/my.shp"</div><div> DATA "SELECT * FROM my LEFT JOIN 'MYSQL:gis,host=localhost,user=gis,password=gis'.katastar_vodnjan ON my.KO_KC=katastar_vodnjan.broj_ko_kc"</div><div> TYPE POLYGON
</div></div><div>...</div><div><br></div><div>I don't get any information with GetFeatureInfo. The request is like:</div><div><br></div><div><a rel="nofollow" target="_blank" href="http://www.coin.hr/cgi-bin/mywms61?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=5403800,4981350,5403980,4981460&SRS=EPSG:31275&WIDTH=400&HEIGHT=300&LAYERS=katastar_vodnjan_poligon&STYLES=&FORMAT=image/png&TRANSPARENT=true&QUERY_LAYERS=mylayer&INFO_FORMAT=gml&X=200&Y=100">http://www.coin.hr/cgi-bin/mywms61?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=5403800,4981350,5403980,4981460&SRS=EPSG:31275&WIDTH=400&HEIGHT=300&LAYERS=katastar_vodnjan_poligon&STYLES=&FORMAT=image/png&TRANSPARENT=true&QUERY_LAYERS=mylayer&INFO_FORMAT=gml&X=200&Y=100</a></div><div><br></div><div>Using the same request with regular
mapfile:</div><div><br></div><div><div><div>LAYER # katastar vodnjan poligoni</div><div> NAME "mylayer"</div><div> STATUS ON</div><div> DATA "my"</div><div> TYPE POLYGON </div></div><div>...</div></div><div><br></div><div>returns one feature and its attributes from the dbf (tha is OK)</div><div><br></div><div>I have also tried with JOIN clause in LAYER part, but this doesn't work either. Do I have to use owf? Am I doing something wrong?</div><div><br></div><div>regards, dejan</div></div>_______________________________________________<br>mapserver-users mailing list<br><a rel="nofollow" ymailto="mailto:mapserver-users@lists.osgeo.org" target="_blank" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><a rel="nofollow" target="_blank" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></blockquote></div><br></div></div>_______________________________________________<br>mapserver-users mailing list<br><a rel="nofollow" ymailto="mailto:mapserver-users@lists.osgeo.org" target="_blank" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></blockquote></div><br></div></div><br>_______________________________________________<br>mapserver-users mailing list<br><a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br><br><br></div></div></div></div></blockquote></div><br></div></div>_______________________________________________<br>mapserver-users mailing list<br><a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>http://lists.osgeo.org/mailman/listinfo/mapserver-users<br></blockquote></div><br></div></body></html>