I found a little glitch on mysql's XML output. It turns out that the
exit is not properly escaped for some ">=3D" clauses. Here is an example:
bash$ mysql -u user -ppass MyDB -X -e \
"select C.name Op, count(E.emailProfileId) TotalAccounts \
from MDEmailReader.EmailProfiles E, MDRegister.Carriers C, \
MDRegister.CarrierAreaCodes CAC \
where C.carrierId =3D CAC.carrierId and \
LEFT(E.userCellphone, 2) =3D CAC.prefix and \
MID(E.userCellphone, 3, 2) <=3D CAC.endNumber and \
MID(E.userCellphone, 3, 2) >=3D CAC.startNumber \
group by C.carrierId;"
The problem is in the "statement" value. The clause
"MID(E.userCellphone, 3, 2) >=3D CAC.startNumber" was not correctly
escaped to
"MID(E.userCellphone, 3, 2) >=3D CAC.startNumber".
Here is the actual output.
<?xml version=3D"1.0"?>
<resultset statement=3D"select C.name Op, count(E.emailProfileId)
TotalAccounts from MDEmailReader.EmailProfiles E, MDRegister.Carriers C,
MDRegister.CarrierAreaCodes CAC
where C.carrierId =3D CAC.carrierId and
LEFT(E.userCellphone, 2) =3D CAC.prefix and
MID(E.userCellphone, 3, 2) <=3D CAC.endNumber and
MID(E.userCellphone, 3, 2) >=3D CAC.startNumber
group by C.carrierId">
<row>
<Op>Claro</Op>
<TotalAccounts>2665</TotalAccounts>
</row>
<row>
<Op>Vivo</Op>
<TotalAccounts>58</TotalAccounts>
</row>
</resultset>
I haven't found this on previous posts to the bugs list. I'm sorry if
this is a known issue. Please let me know if you need further
information (such as tables definitions etc).
Regards,
--
Thiago Figueir=F3 Ger=EAncia de Opera=E7=F5es
thiago [at] ntime.com.br Cel.: (21) 9329-0308
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=3Dgcdmb-bugs [at] m.gmane.org
