# HG changeset patch # User Kim Alvefur # Date 1384251225 -3600 # Node ID 06106726a1f010e77fdb2c6c2586f7a0412334e3 # Parent 1c4405f33561f45cc7f8804b76dc6d1a39eb35aa util.sql: Get character set info from the correct database. diff -r 1c4405f33561 -r 06106726a1f0 util/sql.lua --- a/util/sql.lua Tue Nov 12 02:23:02 2013 +0000 +++ b/util/sql.lua Tue Nov 12 11:13:45 2013 +0100 @@ -308,7 +308,7 @@ 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;