Django

Code

Ticket #1440 (closed: fixed)

Opened 3 years ago

Last modified 3 years ago

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

Reported by: Malcolm Tredinnick <malcolm@pointy-stick.com> Assigned to: adrian
Milestone: Component: Database layer (models, ORM)
Version: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

management.diff (1.1 kB) - added by Malcolm Tredinnick <malcolm@pointy-stick.com> on 03/01/06 20:09:32.
Send multiple SQL statements one at a time to backend.

Change History

03/01/06 20:09:32 changed by Malcolm Tredinnick <malcolm@pointy-stick.com>

  • attachment management.diff added.

Send multiple SQL statements one at a time to backend.

03/01/06 23:04:22 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

(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/Change #1440 ([patch] [magic-removal] Do not put multiple SQL statements in one execute() call.)




Change Properties
Action