lib/shiba/parsers/mysql_select_fields.rb in shiba-0.9.0 vs lib/shiba/parsers/mysql_select_fields.rb in shiba-0.9.1
- old
+ new
@@ -48,9 +48,15 @@
table = sc[1]
col = sc[2]
tables[table] ||= []
tables[table] << col
+ elsif sc.scan(/\(`(.*?)`\.`(.*?)` collate \w+\) AS `(.*?)`/)
+ table = sc[1]
+ col = sc[2]
+
+ tables[table] ||= []
+ tables[table] << col
elsif sc.scan(/(\d+|NULL|'.*?') AS `(.*?)`/m)
else
if ENV['SHIBA_DEBUG']
raise Shiba::Error.new("unknown stuff: in #{@sql}: #{@sc.rest}")
end