sql syntax problem linux/ms4.10/gdal1.4/mysql4.1.11

ROBERT HOLLINGSWORTH reh2 at PRODIGY.NET
Wed Feb 7 15:29:48 EST 2007


1. this all works on mswin/ms4.10/gdal1.4/mysql5.x...

2. have created table with polygon geometry in mysql
on linux and have successfully added records.  ogrinfo
able to summarize the data for me.

3. client built ms4.10, gdal-1.4 on linux system

4. I've got a php_mapscript program where the mapfile
connects to mysql via ogr

5. from what I can tell, the DATA "select xxx,shape
from..." in my mapfile appears to be succeeding enough
that the layer I've created is able to return a
correct Extent on the selection.

6. but the php logs have this, and no layer is
actually drawn:

------------------------------------
[07-Feb-2007 11:40:18] PHP Warning:  [MapServer
Error]: msDrawMap(): Failed to draw layer named
'vermont mysql'.
 in .../test/vermont.php on line 39

[07-Feb-2007 11:40:18] PHP Warning:  [MapServer
Error]: msOGRFileNextShape(): MySQL error message:You
have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the
right syntax to use near 'privileges' at line 1
Description: DESCRIBE Failed
 in .../test/vermont.php on line 39

[07-Feb-2007 11:40:18] PHP Fatal error:  Call to a
member function saveImage() on a non-object in
.../test/vermont.php on line 40

-----------------------------------
I understand the 1st and 3rd message, given the 2nd.
But the sql complaint is odd, because this might stem
from the DESCRIBEs in
OGRMySQLTableLayer::ReadTableDefinition 
or
OGRMySQLDataSource::InitializeMetadataTables,
altho I don't think the MetadataTables are needed for
spatial geoms (?) and the "Describe Failed" looks to
come straight from ReadTableDefinition.

and none of these queries in ogr/mysql appear to
contain the keyword 'privileges' anyway. (the word
doesn't appear anywhere in the ogr/mysql cpps.)

I may be able to get the client to turn on mysql error
and other logging, but I'm wondering if there is an
obvious versions mixup here that can be cured.  or
something else... 

has anyone ever run into this error?

thanks,
Robert H.



More information about the mapserver-users mailing list