[Koha-patches] [PATCH] Bug 7886 - C4/ShelfBrowser slow SQL performance

MJ Ray mjr at phonecoop.coop
Fri Apr 6 22:56:26 CEST 2012


Marc Balmer <marc at msys.ch>
> ah, it's these MySQL backquotes again... Can't we get rid of them in new
> code?

Please note that in this case:

> >  installer/data/mysql/kohastructure.sql |    2 ++
> >  installer/data/mysql/updatedatabase.pl |    8 ++++++++

Both files are in the mysql folder.  Aren't mysqlisms fine in there?


More generally, it is not safe to simply omit backquotes because some
column names in koha are mysql reserved words (so I am told).

Meanwhile, Koha doesn't set the session mode to ANSI or require all
sysadmins to set the global mode to ANSI (which would break other apps
I suspect), which would allow double-quotes to be used instead.
Anyway, double-quotes are currently used in some places for string
literals, which would need fixing (and probably should be).

So how can we quote in a portable way?  Is anyone willing to do the
work replacing ""s so we can set session mode to ANSI and everything
still will work?

Bemused,
-- 
MJ Ray (slef), member of www.software.coop, a for-more-than-profit co-op.
http://koha-community.org supporter, web and library systems developer.
In My Opinion Only: see http://mjr.towers.org.uk/email.html
Available for hire (including development) at http://www.software.coop/


More information about the Koha-patches mailing list