<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to bugs</title><link>https://sourceforge.net/p/jsqlparser/bugs/</link><description>Recent changes to bugs</description><atom:link href="https://sourceforge.net/p/jsqlparser/bugs/feed.rss" rel="self"/><language>en</language><lastBuildDate>Tue, 02 Oct 2012 17:16:51 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/jsqlparser/bugs/feed.rss" rel="self" type="application/rss+xml"/><item><title>Some Parser Issues with subqueries</title><link>https://sourceforge.net/p/jsqlparser/bugs/23/</link><description>Here is a very generic but \(almost\) everything covering select 

SELECT t1.col\_1
,col\_2 as column2
,t4.col\_3 \* \(4+2\) 
,t2.col\_4 +2 as column\_4\_plus\_2
,Concat\(a,b,c,d\)  as my\_sql\_func
,count\(\(select foo from bar where something is ture\)\) as sub\_query\_column
,custom\_function\(a,b,2\)
FROM t1 
,t2 t4
LEFT OUTER JOIN t3 as t5 ON t3.id = t1.id
,\(select foo from bar where something is ture\) as sub\_query\_table
WHERE \(t1.col\_1 like '% something %' OR \(col\_2=3 and t2.col\_4='hello world'\)\)
AND NOT EXISTS \(select foo from bar b where b.id = t1.id\)
GROUP BY t1.col\_1, col\_2, t4.col\_3 \* \(4+2\), t2.col\_4 +2 
HAVING count\(\*\) &amp;gt; 3
ORDER BY t1.col\_1 DESC
LIMIT 100;


The following statements are causing problems:

1\)  count\(\(select foo from bar where something is not null\)\) as sub\_query\_column

This is completly legal. 
On mysql test: 

mysql&amp;gt; select now\(\), count\(\(select now\(\) from dual\)\) from dual;
+---------------------+---------------------------------+
| now\(\)               | count\(\(select now\(\) from dual\)\) |
+---------------------+---------------------------------+
| 2012-10-02 19:06:01 |                               1 |
+---------------------+---------------------------------+
1 row in set \(0.01 sec\)


On Oracle XE:
SQL&amp;gt; select 'a', count\(\(select 'a' from dual\)\) from dual;

' COUNT\(\(SELECT'A'FROMDUAL\)\)
\- --------------------------
a                          1


2\) subselect in from 
,\(select foo from bar where something is ture\) as sub\_query\_table

</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">christian</dc:creator><pubDate>Tue, 02 Oct 2012 17:16:51 -0000</pubDate><guid>https://sourceforge.net669d262062a71c262c44319fd2e3ea42e1cf1cfd</guid></item><item><title>De-parsing removes a space on joins</title><link>https://sourceforge.net/p/jsqlparser/bugs/22/</link><description>The following code 

import java.io.StringReader;

import net.sf.jsqlparser.JSQLParserException;
import net.sf.jsqlparser.parser.CCJSqlParserManager;
import net.sf.jsqlparser.statement.Statement;
import net.sf.jsqlparser.util.deparser.StatementDeParser;

public class SelectDeparserTest \{
	public static void main\(String\[\] args\) throws JSQLParserException \{
		String originalSQL = "SELECT \* FROM BOB B RIGHT JOIN FRED F ON \(B.C=F.C\)";
		System.out.println\(originalSQL\);
		Statement parsed = new CCJSqlParserManager\(\).parse\(new StringReader\(
				originalSQL\)\);
		StringBuffer stringBuffer = new StringBuffer\(\);
		parsed.accept\(new StatementDeParser\(stringBuffer\)\);
		System.out.println\(stringBuffer\);
	\}
\}

when run has the following output

SELECT \* FROM BOB B RIGHT JOIN FRED F ON \(B.C=F.C\)
SELECT \* FROM BOB AS BRIGHT JOIN FRED AS F ON \(B.C = F.C\)

notice that the de-parsed query \(the second one\) lacks a white space between the alias for BOB, i.e.: B and the keyword RIGHT. The same happens for LEFT, INNER, OUTER, FULL, and simply JOIN</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Luigi</dc:creator><pubDate>Wed, 01 Aug 2012 08:33:12 -0000</pubDate><guid>https://sourceforge.net65cf86d130161d9099860e2cbb055ddc3e62f89d</guid></item><item><title>Negative default values not handled correctly</title><link>https://sourceforge.net/p/jsqlparser/bugs/21/</link><description>A CREATE statement with default values that are negative are not handled correctly.  Please see the example below where the default value for MONTH is -1.

With &amp;lt;&amp;lt;QUERY&amp;gt;&amp;gt; = 
CREATE TABLE dim\_date\(
date DATE NOT NULL,
year INTEGER NOT NULL,
quarter INTEGER NOT NULL,
month INTEGER NOT NULL DEFAULT -1,
day INTEGER NOT NULL
\);

This test fails:

private CCJSqlParserManager sqlParser = new CCJSqlParserManager\(\);
Statement stmt = sqlParser.parse\(new StringReader\(&amp;lt;&amp;lt;QUERY&amp;gt;&amp;gt;\);
assertTrue\(stmt instanceof CreateTable\);

</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 29 Feb 2012 13:38:43 -0000</pubDate><guid>https://sourceforge.netb8a0e0aa4a44fc7adcb236c996f26be28d7c734f</guid></item><item><title>CROSS JOIN not supported</title><link>https://sourceforge.net/p/jsqlparser/bugs/20/</link><description>Encountered " &amp;lt;S\_IDENTIFIER&amp;gt; "cross "" at line 1, column 413.
Was expecting one of:
&amp;lt;EOF&amp;gt; 
"JOIN" ...
"LEFT" ...
"FULL" ...
"WHERE" ...
"GROUP" ...
"INNER" ...
"LIMIT" ...
"OUTER" ...
"ORDER" ...
"RIGHT" ...
"OFFSET" ...
"HAVING" ...
"NATURAL" ...
";" ...
"," ...
"LEFT" ...
"RIGHT" ...
"FULL" ...
"NATURAL" ...
"OUTER" ...
"INNER" ...
"JOIN" ...
"," ...
"WHERE" ...
"GROUP" ...
"HAVING" ...
"ORDER" ...
"LIMIT" ...
"OFFSET" ...
"LIMIT" ...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eric Citaire</dc:creator><pubDate>Wed, 25 Jan 2012 13:37:43 -0000</pubDate><guid>https://sourceforge.netd4a61f6532db6fdf3e53ae9c1281e5f8187a21f6</guid></item><item><title>case else bug</title><link>https://sourceforge.net/p/jsqlparser/bugs/19/</link><description>This sql statement should work: \(else 'el' || 'se'\)

select case when dummy = 'X' then 'XXX' else 'el' || 'se' end from dual

jsqlparser version: 0.7

java.text.ParseException: Encountered " "CASE" "case "" at line 1, column 8.
Was expecting one of:
"ALL" ...
"TOP" ...
"DISTINCT" ...
"\(" ...
"\*" ...
"ALL" ...
"DISTINCT" ...
"TOP" ...
"\*" ...
"\(" ...
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 24 Jan 2012 08:00:31 -0000</pubDate><guid>https://sourceforge.netc1878d7118a3fe91bef85247135a7a17654ffce1</guid></item><item><title>or not bug</title><link>https://sourceforge.net/p/jsqlparser/bugs/18/</link><description>This sql statement should work:

select dummy from dual where dummy like '%X%' or not dummy like '%A%'

jsqlparser version: 0.7

java.text.ParseException: Encountered " &amp;lt;S\_IDENTIFIER&amp;gt; "dummy "" at line 1, column 54.
Was expecting one of:
"\(" ...
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 24 Jan 2012 07:57:39 -0000</pubDate><guid>https://sourceforge.netf436e392a4d091979b3f41a81809376c2864640f</guid></item><item><title>and not bug</title><link>https://sourceforge.net/p/jsqlparser/bugs/17/</link><description>This sql statement should work:

select dummy from dual where dummy like '%X%' and not dummy like '%A%'

jsqlparser version: 0.7

Stacktrace:
java.text.ParseException: Encountered " &amp;lt;S\_IDENTIFIER&amp;gt; "dummy "" at line 1, column 55.
Was expecting one of:
"\(" ...



</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 24 Jan 2012 07:41:23 -0000</pubDate><guid>https://sourceforge.net3e7aed463e4e13ab64d7307246adb11de043c50d</guid></item><item><title>Column names started with Numbers !</title><link>https://sourceforge.net/p/jsqlparser/bugs/16/</link><description>In Ms Sql Server \(2000\) you can create columns that their names started with digits. 
in parsin JSQLParser throws Exception</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Mon, 21 Nov 2011 07:06:27 -0000</pubDate><guid>https://sourceforge.netb2e34bf251491e4ca66b646ee34f3dd9a49b01ca</guid></item><item><title>Arabic Characters Comparison</title><link>https://sourceforge.net/p/jsqlparser/bugs/15/</link><description>The Comparison of one String column with an Arabic String throws excrption like:

SELECT Amount, AmountEzaf,AmountKasr, idProvince, LastName FROM VIEWFactorDetail WHERE LastName ='حسین'</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Mon, 21 Nov 2011 07:04:02 -0000</pubDate><guid>https://sourceforge.net784fabf1a8449671260216ae160860ef4f7de40c</guid></item><item><title>CASE in Statement throws exception</title><link>https://sourceforge.net/p/jsqlparser/bugs/14/</link><description>When parsing statements, which containe a CASE and the ELSE part of the CASE is a arithmetic function like /,+,- ... an exception is thrown.

Example statement throwing the exception:
select p, case when sum\(a\)=0 then 1 else 1\*2 end as f from anything

the 1\*2 part is the one causing the exception.

select p, case when sum\(a\)=0 then 1 else 2 end as f from anything  
is parsed correctly
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 20 Apr 2011 08:00:07 -0000</pubDate><guid>https://sourceforge.netd78f9ed58ed89d7cb5aa8b9007471ee153ea372d</guid></item></channel></rss>