Opened 12 years ago

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



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.



Change History (1)

comment:1 Changed 12 years ago by Adrian Holovaty

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