#493 Fatal error, SQL syntax error with MySQL

Database
closed
Reini Urban
5
2014-08-22
2005-08-04
Anonymous
No

I installed a brand new 1.3.11_rc3, configured for a
MySQL backend and created the tables + db user. When
accessing the page, all i get is this:

-- 8< --
Fatal Error:

lib/WikiDB/backend/PearDB.php:1014: Error[256]:
wikidb_backend_peardb_mysql: fatal database error

* DB Error: syntax error
* (SELECT version() LIMIT 0, 1 [nativecode=1064 **

You have an error in your SQL syntax near 'LIMIT 0, 1'
at line 1])
*

lib/WikiDB/backend/PearDB.php:1014: Error[256]:
wikidb_backend_peardb_mysql: fatal database error

* DB Error: syntax error
* (SELECT version() LIMIT 0, 1 [nativecode=1064 **

You have an error in your SQL syntax near 'LIMIT 0, 1'
at line 1])

-- >8 --

Regards, Nils (noels01 at gmx d0t net).

Discussion

  • Reini Urban
    Reini Urban
    2005-08-06

    Logged In: YES
    user_id=13755

    I see. PearDB is very clever now in GetOne() and adds a
    LIMIT 1,0

    For a shortterm fix try to use our pear version, by
    prepending phpwiki/lib/pear to the INCLUDE_PATH

    I'll check which pear DB 's are broken.

     
  • Reini Urban
    Reini Urban
    2005-08-06

    Logged In: YES
    user_id=13755

    Sorry, cannot reproduce with the following PearDB versions:
    1.7.6 (current), from 2004-03-12 and the one which is
    included into phpwiki (2004-06-21).

    please update your Pear::DB