Opened 19 years ago
Closed 19 years ago
#1482 closed enhancement (fixed)
[patch] Small correction in MySQL SET NAMES statement
Reported by: | 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
Note:
See TracTickets
for help on using tickets.
(In [2516]) magic-removal: Fixed #1482 -- Corrected 'SET NAMES' syntax for MySQL backend. Thanks, Geert Vanderkelen