Opened 18 years ago

Last modified 18 years ago

#1325 closed defect (fixed)

MySQL doesn't open datastore in update mode by defaul

Reported by: Mateusz Łoskot Owned by: hobu
Priority: highest Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

OGRMySQLDriver::CreateDataSource() should open existing instance of datastore by default in update mode.

Now, it opens in update mode only through OGRSFDriverRegistrar::Open() call.

So, when using ogr2ogr utility, it's required to specify -update option.

Change History (4)

comment:1 by hobu, 18 years ago

I un #ifdef'd the CreateDataSource method in the MySQL driver.  Please test to confirm that this is the behavior we want and I'll close this bug.

comment:2 by Mateusz Łoskot, 18 years ago

Hobu, this changes have not fixed the problem.

I still have to provide ogr2ogr with -update option, without it, OGR reports error message:

ogr2ogr -f MySQL MySQL:test,user=mloskot -nln borders -lco SPATIAL_INDEX=NO world_borders.shp
OGR: OGROpen(world_borders.shp/0x804f408) succeeded as ESRI Shapefile.
MySQL driver does not support data source creation.


Note, the 'test' database on my MySQL server is available and it's empty.
I use MySQL 5.0.22, on Ubuntu Dapper.



comment:3 by hobu, 18 years ago

I also report ODrCCreateDataSource as true in TestCapabilities now, even though the driver doesn't not truly create new databases (you'll have to have the db created first before using).

The appears to be fixed now... closing

comment:4 by Mateusz Łoskot, 18 years ago

(In reply to comment #3)
> The appears to be fixed now... closing

Yes, I confirm it's fixed.

Note: See TracTickets for help on using tickets.