Bug report #17538

MYSQL Connection with wrong tables

Added by Gerd Dreier almost 6 years ago. Updated over 5 years ago.

Category:Data Provider/OGR
Affected QGIS version:2.18.14 Regression?:Yes
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:25435


In former times MYSQL Connection from a table as saved in the QGS File as:


Now it is saved as:


If I add or insert a table in the database from Mysql, the layerid will be changed an QGIS connect with an other table.
To save the connection to a table over the layerid is not a good idea. In former Times it was better!


#1 Updated by Giovanni Manghi almost 6 years ago

  • Regression? changed from No to Yes
  • Status changed from Open to Feedback
  • Priority changed from Normal to High
  • Crashes QGIS or corrupts data changed from Yes to No

Do you know what was the last release were it worked as expected?

#2 Updated by Gerd Dreier almost 6 years ago

Sorry, i don't know the release, but I update periodically. So it was changed between Feb. 2016 and March 2017.

#3 Updated by Alessandro Pasotti almost 6 years ago

  • Category changed from Data Provider to Data Provider/OGR

#4 Updated by Alessandro Pasotti almost 6 years ago

It would be useful if you could confirm this bug on master. IIRC there were some recent changes in the way sublayers are referred to in OGR provider.

#5 Updated by Even Rouault over 5 years ago

  • Resolution set to fixed/implemented

I'm pretty sure this is a known issue that has been fixed in the QGIS 3 line. Previously for multi-layer datasources, the project stored them with a layer index, which was unstable if the datasource had layers removed or added. QGIS3 now stores the layer name instead.
Closing as fixed in QGIS 3

#6 Updated by Even Rouault over 5 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF