Code

Opened 8 years ago

Closed 8 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
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: UI/UX:

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@…> 8 years ago.
Send multiple SQL statements one at a time to backend.

Download all attachments as: .zip

Change History (2)

Changed 8 years ago by Malcolm Tredinnick <malcolm@…>

Send multiple SQL statements one at a time to backend.

comment:1 Changed 8 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.