﻿id	summary	reporter	owner	description	type	status	priority	component	severity	resolution	keywords	cc	release
4277	[Patch] Support for MySQL	nat@…	hasienda	"sqlite syntax and mysql syntax are different, causing ticket.py to fail its query silently. in sqlite:
 {{{SELECT ""aaa""||""bbb""; => ""aaabbb""}}}
in MySQL
 {{{SELECT ""aaa""||""bbb""; => 0}}}

this impacts the line that in ticket.py which is trying to concatenate the COALESCE'd fields.

changing it to the following allows use of your MySQL-backed trac to work with tags:
{{{
        sql = ""SELECT * FROM (SELECT id, %s, CONCAT(%s) AS fields FROM ticket%s) s"" % (
            ','.join(self.fields),
            "", ' ',"".join([""COALESCE(%s, '')"" % f for f in self.fields]),
            ignore)
}}}

this is a drive-by patch, i'm not a huge python hacker or trac hacker, just upgraded our trac and need tags to work and so hacked this in after sorting through the madness of pythn eggs. it wasn't instantly apparent how to detect the DB provider so i didn't know how to support both sqlite and mysql here."	defect	assigned	normal	TagsPlugin	critical		SQL specific syntax		0.11
