[ewiki] Re: SQL query for GETALL broken

  • From: Andy Fundinger <andy@xxxxxxxxxxx>
  • To: "'ewiki@xxxxxxxxxxxxx'" <ewiki@xxxxxxxxxxxxx>
  • Date: Wed, 22 Oct 2003 20:12:14 -0400

> I also tried several other ways to match MAX() against the retireved row,
> even a LEFT JOIN of the same TABLE did not result in what we need. So I
> currently don't see a way to fetch the wanted data from MySQL (maybe other
> SQL databases get it better). So we have to go another way and must
> (sadly)
> retrieve __everything__ from database and filter it in a loop. Happily
> there
> is a way ORDER BY can speed it up, but I don't feel very comfortable about
> that whole ting, so I'm going to investigate further (could be a broken
> mysql ver?).
> 
> If anybody had an idea for this SQL query, please post it.

Well, the MySQL Manual has a section on this problem
http://www.mysql.com/documentation/mysql/bychapter/manual_Tutorial.html#exam
ple-Maximum-column-group-row, it seems to me like on MySQL we could go the
temporary table route omitting locks(precision not critical) and on other
databases we could use sub selects (supported in MySQL after v4.1).

> > In retesting I did notice that aview_linktree had never been updated to
> > the new database api, attached is a (partial?) update.  There may be
> more
> > changes needed once GETALL is working but this seems to be functional.
> > Additionally there is a bug in the omission of empty references in
> > ewiki_f_parent_refs() but I wanted to get it out to you today.
> 
> I invoked an automated regex on most plugins when moving to the new
> database
> thingi, so there is always the chance I missed one.
> 
> *wondering* Is anybody really using this plugin???

I am and my users like it.  They said they'd miss it if it was pulled.
Personally I love it and have some thoughts on extending it.  My deployed
site still uses the old API so I didn't catch it until now.

Andy

Other related posts: