Opened 19 years ago

Closed 19 years ago

#1482 closed enhancement (fixed)

[patch] Small correction in MySQL SET NAMES statement

Reported by: Geert Vanderkelen <geert@…> Owned by: Adrian Holovaty
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: no UI/UX: no

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

Change History (1)

comment:1 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: newclosed

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

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