Bug report #16805

Corrupting SQL Server tables when using drag and drop in QGIS browser

Added by Matt Robinson over 7 years ago. Updated about 6 years ago.

Status:Closed
Priority:High
Assignee:Nyall Dawson
Category:Data Provider/MSSQL
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

Description

Hi,

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.

Thanks Matt.

Clipboard02.jpg (18.3 KB) Matt Robinson, 2017-07-07 09:35 AM

Clipboard01.jpg (52.1 KB) Matt Robinson, 2017-07-07 09:35 AM


Related issues

Duplicated by QGIS Application - Bug report #17719: Dragging and dropping MS SQL table in browser window caus... Closed 2017-12-18

Associated revisions

Revision 745495fe
Added by Nyall Dawson about 6 years ago

[mssql] Prevent overwriting existing tables via drag and drop in browser

Fixes #16805

Revision 302b4494
Added by Nyall Dawson about 6 years ago

[mssql] Add browser actions for deleting and truncating tables

Because we can no longer overwrite tables directly using drag
and drop (refs #16805), add some explicit actions which allow
dropping existing tables (after user confirmation, of course!)

History

#1 Updated by Giovanni Manghi over 7 years ago

  • Subject changed from Corruping SQL Server Table when Drag and Drop to Corrupting SQL Server tables when using drag and drop in QGIS browser
  • Assignee deleted (Nathan Woodrow)
  • Priority changed from Normal to High

#2 Updated by Nathan Woodrow over 7 years ago

  • Assignee set to Nathan Woodrow

#3 Updated by Nathan Woodrow over 7 years ago

Thanks. I can take a look next week.

#4 Updated by Nathan Woodrow almost 7 years ago

  • Duplicated by Bug report #17719: Dragging and dropping MS SQL table in browser window causes overwriting of existing table added

#5 Updated by Nathan Woodrow about 6 years ago

  • Assignee changed from Nathan Woodrow to Nyall Dawson

#6 Updated by Nyall Dawson about 6 years ago

  • Status changed from Open to In Progress

#7 Updated by Nyall Dawson about 6 years ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Closed

Also available in: Atom PDF