'OPTION SQL_SELECT_LIMIT=DEFAULT'

后端 未结 5 577
被撕碎了的回忆
被撕碎了的回忆 2021-01-01 12:12

I have a mysql database on Netbeans and I want to see that view data but I have a error 1064 \'OPTION SQL_SELECT_LIMIT=DEFAULT\'

相关标签:
5条回答
  • 2021-01-01 12:26

    Some google foo lead me to this:

    http://bugs.mysql.com/bug.php?id=66659

    That bug report sound pretty much like your problem - there is no good fix for you. But there is a lead for some more reading.

    The similarity to you problem:

    1. It's also the jdbc driver involved
    2. The error message is the same
    3. the problem occurs on a very recent mysql server version

    So I tried to find the problem in the mysql-connector-java sources and found the statement in StatementImpl.java in version 5.1.18 - an older version can be found here:

    http://www.docjar.com/html/api/com/mysql/jdbc/StatementImpl.java.html

    Look for "SET OPTION SQL_SELECT_LIMIT=DEFAULT" in the file and you will find it.

    I also checked the most recent version

    I checked the source of mysql-connector-java 5.1.22 and the problem seems to be fixed:

    SET SQL_SELECT_LIMIT=DEFAULT
    

    So suggested fix for the user: Please download the newer version of connector/j and modify the driver entry in databases.

    Suggested fix: Update bundled connector/j version

    0 讨论(0)
  • 2021-01-01 12:28

    The thing I notice is that if you have several connectors in the same place, BO will take the first one he found like you can see in these images.

    WEBI doesn't work with connector 5.0.8 evenif Designer do

    BO take the first SQL connector he found

    0 讨论(0)
  • 2021-01-01 12:30

    Found the answer from another question... The steps are quite straightforward.

    1. Download latest jar file from here: http://dev.mysql.com/downloads/mirror.php?id=412737. Unzip it Copy jar file "mysql-connector-java-5.1.25-bin.jar" to this folder: C:\Program Files\NetBeans 7.3\ide\modules\ext

    2. In Netbeans IDE: Disconnect from database. Click Services. Expand Drivers. Right-click on MySQL and press Customize. Add latest driver Remove previous driver.

    Re-connect to dabatase within IDE.

    0 讨论(0)
  • 2021-01-01 12:31

    I was able to bypass this error by setting my own limit on the query. This worked for me because I had full control over the sql statement. By specifying the limit myself it did not rely on the 'default'. I also made sure to end the query with a ';' but not sure if that made any difference.

    0 讨论(0)
  • 2021-01-01 12:44

    Just restart the MySql server(WAMP, XAMP). Resolved my issue.

    If you are using glassfish, upgrade to version 4.1,

    0 讨论(0)
提交回复
热议问题