Code

Opened 8 years ago

Closed 8 years ago

#1482 closed enhancement (fixed)

[patch] Small correction in MySQL SET NAMES statement

Reported by: Geert Vanderkelen <geert@…> Owned by: adrian
Component: contrib.admin Version: magic-removal
Severity: normal Keywords: mysql encoding utf8
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Hi,

Small correction in SET NAMES statement in django.db.backends.mysql.base

  • cursor.execute("SET NAMES utf8")

+ cursor.execute("SET NAMES 'utf8'")

Although it works without quotes, the correct way is to quote the encoding. A detail, no clue why though.. will ask..
SET CHARACTER SET utf8, that would be without quotes.

Cheers,

Geert

Attachments (0)

Change History (1)

comment:1 Changed 8 years ago by adrian

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

(In [2516]) magic-removal: Fixed #1482 -- Corrected 'SET NAMES' syntax for MySQL backend. Thanks, Geert Vanderkelen

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.