diff options
author | Kim Alvefur <zash@zash.se> | 2013-11-12 11:13:45 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2013-11-12 11:13:45 +0100 |
commit | a9e2cb510a760ac13bb8aeab47afdb64d19ea710 (patch) | |
tree | d4aff0b2df96e4c6cb9cdff6285802fb4ad2435a /util/sql.lua | |
parent | cb224e1c036d6270200f90f1b836c4447270e804 (diff) | |
download | prosody-a9e2cb510a760ac13bb8aeab47afdb64d19ea710.tar.gz prosody-a9e2cb510a760ac13bb8aeab47afdb64d19ea710.zip |
util.sql: Get character set info from the correct database.
Diffstat (limited to 'util/sql.lua')
-rw-r--r-- | util/sql.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/sql.lua b/util/sql.lua index a7f46421..5e441c10 100644 --- a/util/sql.lua +++ b/util/sql.lua @@ -308,7 +308,7 @@ function engine:set_encoding() -- to UTF-8 if driver == "MySQL" then set_names_query = set_names_query:gsub(";$", " COLLATE 'utf8_bin';"); local ok, charsets = self:transaction(function() - return self:select"SELECT `CHARACTER_SET_NAME` FROM `CHARACTER_SETS` WHERE `CHARACTER_SET_NAME` LIKE 'utf8%' ORDER BY MAXLEN DESC LIMIT 1;"; + return self:select"SELECT `CHARACTER_SET_NAME` FROM `CHARACTER_SETS` WHERE `information_schema`.`CHARACTER_SET_NAME` LIKE 'utf8%' ORDER BY MAXLEN DESC LIMIT 1;"; end); local row = ok and charsets(); charset = row and row[1] or charset; |