Whenever I execute SELECT * FROM table
I get this error:
Error code 1064, SQL state 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1
I think , I use the latest release of mysql server
| Variable_name | Value |
| innodb_version | 1.2.6 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 5.6.6-m9-log |
| version_comment | MySQL Community Server (GPL) |
| version_compile_machine | x86_64 |
| version_compile_os | debian6.0 |
it seems like MySQL have deprecated this syntax OPTION SQL_SELECT_LIMIT=DEFAULT
Some google foo lead me to this:
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:
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:
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
It's too risky to change the bundled MySQL driver in 7.3.
We should update it in the next release.
Matthias, thank you very much for evaluation.
I have the same problem:
I installed MySQL Server 5.6.10 and Netbeans through me the exact error. Then I found this bug descriptions and I look for a newer mysql jdbc driver, I found this one:
saved the jar file next to the old one in the netbeans folder .../NetBeans 7.3 RC1\ide\modules\ext and changed the driver within Netbeans under Services/Databases/Drivers/MySQL (Connector/J driver)/Customize
Now it works like a charm :) So far... :)
Created attachment 131676 [details]
Updating MySQL driver to version 5.1.23 and PostgreSQL driver to 9.2-1002.
Some of modified files contain this comment:
<!-- please check with firstname.lastname@example.org before/after updating this or "classpath" section -->
So, Milos, please, could you check the patch.
File postgresql-9.2-1002-license.txt contained different newline characters. The patch changes them to line-feed. Is it OK?
(In reply to comment #5)
> Some of modified files contain this comment:
> <!-- please check with email@example.com before/after updating this or
> "classpath" section -->
> So, Milos, please, could you check the patch.
looks good to me.
Thank you for checking it.
Fixed in http://hg.netbeans.org/core-main/rev/f584da6419a9
Integrated into 'main-golden', will be available in build *201302222300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Jaroslav Havlin <firstname.lastname@example.org>
Log: #224260: Update JDBC drivers
*** Bug 228696 has been marked as a duplicate of this bug. ***
I'm still struggling with this error message. Comment 3's suggestion didn't help in my case. I have a new Mysql driver already. With regards to comment 1, my statementImpl.java file already looks updated and not deprecated (thus without the set option command). What else can I try to fix my program? I've noticed a proposed patch above, though how do I implement the code in the patch to fix the problem?
(In reply to comment #10)
> What else can I try to fix my program? I've
> noticed a proposed patch above, though how do I implement the code in
> the patch to fix the problem?
If you already have the latest JDBC driver, the patch will not help you (it only updates default drivers). Please ensure that the latest driver is correctly registered in NetBeans (check Services tab -> Databases -> Drivers), and that your connections are configured to use it.
My code is now compiling correctly because I also deleting the old driver, instead of just installing the new driver. The following link also helped:
both drivers in new versions are present in NetBeans IDE Dev (Build 201304292301); I'll sanity test them during 7.3.1 functional testing.
(In reply to comment #13)
> both drivers in new versions are present in NetBeans IDE Dev (Build
> 201304292301); I'll sanity test them during 7.3.1 functional testing.
Integrated into release73: http://hg.netbeans.org/releases/rev/cf3d26e7202e
Integrated into 'releases', will be available in build *201305042200* or newer. Wait for official and publicly available build.
User: Jaroslav Havlin <email@example.com>
Log: #224260: Update JDBC Drivers (in release73 branch)
thanks, verified in
Product Version: NetBeans IDE 7.3.1 (Build 201305082200)
Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b12
System: Mac OS X version 10.8.3 running on x86_64; US-ASCII; en_US (nb)
User directory: /Users/tomas/Library/Application Support/NetBeans/7.3
Cache directory: /Users/tomas/Library/Caches/NetBeans/7.3
*** Bug 229966 has been marked as a duplicate of this bug. ***
SPAM - Removed by Administrator