This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 186537 - New line before LIMIT of OFFSET is not interpreted as whitespace.
Summary: New line before LIMIT of OFFSET is not interpreted as whitespace.
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: SQL Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-22 10:30 UTC by nbphpuser
Modified: 2010-12-11 06:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nbphpuser 2010-05-22 10:30:22 UTC
select * from my table where mycolumn like '01%'
limit 3;


as typing formated sql after '01%' in example above there is no space, but new line. New line is not interpreted as whitespace, resulting in query

select * from my table where mycolumn like '01%'limit 3;
Comment 1 Jiri Rechtacek 2010-06-01 12:22:17 UTC
Reproducible in NB6.9RC2.
Comment 2 Jiri Rechtacek 2010-12-10 10:47:18 UTC
I guess it was fixed some time ago. Try again with NB7.0Beta. Thanks
Comment 3 nbphpuser 2010-12-10 11:15:58 UTC
I still have error.

IDE LOG:

Failed to execute SQL Statement [select * from mytable where name like 'Me%'
limit 1], cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'LIMIT 20 OFFSET 0' at line 2
Failed to execute SQL Statement [select * from mytable where name like 'Me%'
limit 1], cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'LIMIT 20 OFFSET 0' at line 2


Product Version: NetBeans IDE Dev (Build 2010-12-09_15-04-45 )
Java: 1.6.0_22; Java HotSpot(TM) Client VM 17.1-b03
System: Windows 7 version 6.1 running on x86; Cp1252; de_DE (nb)
Comment 4 nbphpuser 2010-12-10 11:19:39 UTC
It happens only with limit clause:

select * from mytable where name like 'Me%'
limit 1;

Following works>

select * from mytable where name like 'Me%'
order by name asc;
Comment 5 Jiri Rechtacek 2010-12-10 12:12:15 UTC
I confirms the bug is still here. Will be fixed in NB7.0 Thank you for the report.
Comment 6 Jiri Rechtacek 2010-12-10 16:40:06 UTC
core-main/rev/c58ea32d9145
Comment 7 Quality Engineering 2010-12-11 06:35:32 UTC
Integrated into 'main-golden', will be available in build *201012110001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/c58ea32d9145
User: Jiri Rechtacek <jrechtacek@netbeans.org>
Log: #186537: New line before LIMIT or OFFSET is not interpreted as whitespace.