From: Maria K. <mkr...@ne...> - 2004-02-25 11:08:20
|
Hi there, we solved the compatibility problem described below. Marko Riedel wrote: > Hi folks, > > we are using version 1.7.4 with MySQL version 3.23 with no problem. > > We decided to try MySQL 4.1 because we might eventually upgrade. We > discovered that TikiWiki sends queries that are not valid MySQL 4.1 > syntax, e.g. > > Warning: MYSQL error: DB Error: syntax error in query: > select permName,type,level,permDesc from users_permissions order by permName desc limit 0,-1 > in /srv/www/htdocs/wikiwiese/lib/tikilib.php on line 101 > > The same query works fine with MySQL 3.23. > > Are the developers aware of this problem? What should be done to fix > it? > > Best regards, > The solution was to remove "limit 0,-1" form all select queries where it accurs. diff lib/tikilib.php /tmp/tikiwiki-1.7.4/lib/tikilib.php 86,90d85 < < if(preg_match("/^(select.*)limit\s+0\s*,\s*-1$/i", $query, $parts)){ < $query = $parts[1]; < } < Best regards, Marko Riedel |