<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Another thing - I tried this on another machine. I get this:<div><br></div><div><div>Program received signal EXC_BAD_ACCESS, Could not access memory.</div><div>Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000</div><div>0x00007fff88337c00 in strlen ()</div><div>(gdb) bt</div><div>#0 0x00007fff88337c00 in strlen ()</div><div>#1 0x00000001cf77aa67 in msPOSTGRESQLJoinConnect ()</div><div>#2 0x00000001cf6b578b in msReturnNestedTemplateQuery ()</div><div>#3 0x00000001cf70bbd9 in msWMSFeatureInfo ()</div><div>#4 0x00000001cf710584 in msWMSDispatch ()</div><div>#5 0x00000001cf7389e3 in msOWSDispatch ()</div><div>#6 0x00000001cf67728d in main ()</div><div><br></div><div><br></div><div>My question is - why msPOSTGRESQLJoinConnect is called if join is defined for MySQL:</div><div><br></div><div><div> JOIN</div><div> NAME "test"</div><div> CONNECTIONTYPE ogr </div><div> CONNECTION "MySQL:gis,user=gis,password=gis,port=3306"</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> END </div></div><div><br></div><div>regards, dejan</div><div><div>On 14. ruj. 2011., at 13:05, 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; ">I tried debugging with gdb but only get this:<div><br></div><div><div>Program received signal SIGTRAP, Trace/breakpoint trap.</div><div>0x00007f8b8d76c8b7 in ?? () from /lib64/ld-linux-x86-64.so.2</div><div><br></div><div>and with backtrace (bt):</div><div><br></div><div><div>#0 0x00007f8b8d76c8b7 in ?? () from /lib64/ld-linux-x86-64.so.2</div><div>#1 0x00007f8b8d75b1bc in ?? () from /lib64/ld-linux-x86-64.so.2</div><div>#2 0x00007f8b8d76bb35 in ?? () from /lib64/ld-linux-x86-64.so.2</div><div>#3 0x00007f8b8d75931b in ?? () from /lib64/ld-linux-x86-64.so.2</div><div>#4 0x00007f8b8d758a68 in ?? () from /lib64/ld-linux-x86-64.so.2</div><div>#5 0x0000000000000002 in ?? ()</div><div>#6 0x00007fff531bc8e2 in ?? ()</div><div>#7 0x0000000000000000 in ?? ()</div></div><div><br></div><div>regards, dejan</div><div><br></div><div><div>On 14. ruj. 2011., at 12:33, 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; ">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><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>mapserver-users mailing list<br><a 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>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>