Opened 19 years ago

Closed 19 years ago

#1440 closed defect (fixed)

[patch] [magic-removal] Do not put multiple SQL statements in one execute() call.

Reported by: Malcolm Tredinnick <malcolm@…> Owned by: Adrian Holovaty
Component: Database layer (models, ORM) Version:
Severity: major Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

At least in SQLite (and, from memory, in some other DB-API-comaptible Python wrappers as well), it is not possible to put multiple SQL statements in a single call to execute(). By multiple statements here, I mean things separated by semicolons.

We are currently making this error in the magic-removal branch. The attached patch fixes this.

Attachments (1)

management.diff (1.1 KB ) - added by Malcolm Tredinnick <malcolm@…> 19 years ago.
Send multiple SQL statements one at a time to backend.

Download all attachments as: .zip

Change History (2)

by Malcolm Tredinnick <malcolm@…>, 19 years ago

Attachment: management.diff added

Send multiple SQL statements one at a time to backend.

comment:1 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: newclosed

(In [2467]) magic-removal: Fixed #1440 -- Changed django.core.management not to execute multiple SQL statements in the same cursor.execute(). Thanks, Malcolm Tredinnick

Note: See TracTickets for help on using tickets.
Back to Top