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 188979 - Wrong query parsing with a "limit" keyword on new line
Summary: Wrong query parsing with a "limit" keyword on new line
Status: RESOLVED WORKSFORME
Alias: None
Product: db
Classification: Unclassified
Component: SQL Editor (show other bugs)
Version: 6.x
Hardware: All All
: P4 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-27 06:40 UTC by kRk
Modified: 2011-11-25 20:12 UTC (History)
1 user (show)

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 kRk 2010-07-27 06:40:02 UTC
Typing any query with limit on new line, ie:

select * from table_name
where id > 12
limit 10

causes SQL error (Error code 0, SQL state 42601: ERROR: syntax error at or near "LIMIT").
But

select * from table_name
where id > 12
 limit 10 -- tab or space at first pos

or 

select * from table_name
where id > 12 limit 10

is parsed OK.

Product Version = NetBeans IDE 6.9 (Build 201006101454)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.6.0_20
Runtime = Java HotSpot(TM) Client VM 16.3-b01
Comment 1 Jiri Rechtacek 2010-07-27 08:52:47 UTC
Please, what DB are you using? Thanks
Comment 2 kRk 2010-07-27 09:01:15 UTC
Sorry, i forgot to mention this.
PostgresSQL 8.4.2 (org.postgresql.Driver)

Thanks.
Comment 3 Kibur 2011-05-14 09:22:28 UTC
Same thing happens with MySQL 5.5.8.
Comment 4 matthias42 2011-11-25 20:12:14 UTC
This is not reproducible in netbeans 7.0.1 using the supplied mysql driver and against an mysql 5.1.58 server. Same for postgresql 9.1 and the build in driver. Please test again und reopen if the bug is still present. An example with exact SQLs und server version would be helpful in this case.