Bug report #16805
Corrupting SQL Server tables when using drag and drop in QGIS browser
|Affected QGIS version:||2.18.9||Regression?:||No|
|Operating System:||Windows 10||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||Yes||Copied to github as #:||24704|
We have found a dangerous bug in QGIS in the Browser Panel - under a SQL Server Connection. Dragging a file and dropping it into SQL Server connection browser window drops the database table overrides the data without warning.
If you start to drag a file from the Browser Panel to the Map window and change your mind and let go before you even hover over the map window- it throws up a message saying "Successfully imported". However, it deletes the attributes from the table. We tested this process on a PostGIS connection and it gave a warning prompt, which is probably what the SQL Server connection should do. At the very least a yes to override table or cancel message would be good.
The attached screenshots show a few examples of how the bug occurs.
[mssql] Prevent overwriting existing tables via drag and drop in browser