File tree Expand file tree Collapse file tree 4 files changed +23
-6
lines changed
main/jjtree/net/sf/jsqlparser/parser
test/java/net/sf/jsqlparser/statement Expand file tree Collapse file tree 4 files changed +23
-6
lines changed Original file line number Diff line number Diff line change @@ -1749,13 +1749,15 @@ FromItem SubJoin():
17491749{
17501750 FromItem fromItem = null;
17511751 Join join = null;
1752- List joinList = null;
1753- SubJoin subJoin = new SubJoin();
1752+ List<Join> joinList = null;
17541753}
17551754{
1756- fromItem=FromItem() { subJoin.setLeft(fromItem); }
1757- joinList=SubJoinsList() { subJoin.setJoinList(joinList); }
1755+ fromItem=FromItem()
1756+ joinList=SubJoinsList()
17581757 {
1758+ SubJoin subJoin = new SubJoin();
1759+ subJoin.setLeft(fromItem);
1760+ subJoin.setJoinList(joinList);
17591761 return subJoin;
17601762 }
17611763}
@@ -1778,7 +1780,6 @@ List SubJoinsList():
17781780{
17791781
17801782 (join=JoinerExpression() { joinsList.add(join); })+
1781-
17821783 { return joinsList; }
17831784}
17841785
Original file line number Diff line number Diff line change @@ -360,7 +360,7 @@ public void testAddConstraintKeyIssue320() throws JSQLParserException {
360360 }
361361
362362 @ Test
363- public void testIssue633 () throws JSQLParserException {
363+ public void testIssue633 () throws JSQLParserException , JSQLParserException , JSQLParserException {
364364 assertSqlCanBeParsedAndDeparsed ("ALTER TABLE team_phases ADD CONSTRAINT team_phases_id_key UNIQUE (id)" );
365365 }
366366
@@ -383,4 +383,9 @@ public void testAlterTableIndex586() throws Exception {
383383 public void testIssue259 () throws JSQLParserException {
384384 assertSqlCanBeParsedAndDeparsed ("ALTER TABLE feature_v2 ADD COLUMN third_user_id int (10) unsigned DEFAULT '0' COMMENT '第三方用户id' after kdt_id" );
385385 }
386+
387+ @ Test
388+ public void testIssue633_2 () throws JSQLParserException {
389+ assertSqlCanBeParsedAndDeparsed ("CREATE INDEX idx_american_football_action_plays_1 ON american_football_action_plays USING btree (play_type)" );
390+ }
386391}
Original file line number Diff line number Diff line change @@ -2182,6 +2182,12 @@ public void testValues6BothVariants() throws JSQLParserException {
21822182 assertSqlCanBeParsedAndDeparsed (stmt );
21832183 }
21842184
2185+ @ Test
2186+ public void testIntervalWithColumn () throws JSQLParserException {
2187+ String stmt = "SELECT DATE_ADD(start_date, INTERVAL duration MINUTE) AS end_datetime FROM appointment" ;
2188+ assertSqlCanBeParsedAndDeparsed (stmt );
2189+ }
2190+
21852191 @ Test
21862192 public void testInterval1 () throws JSQLParserException {
21872193 String stmt = "SELECT 5 + INTERVAL '3 days'" ;
Original file line number Diff line number Diff line change @@ -150,4 +150,9 @@ public void testUpdateIssue826() throws JSQLParserException {
150150 + "where message_topic.name='test' \n "
151151 + "AND message_topic_config.enable_flag='Y'" , true );
152152 }
153+
154+ @ Test
155+ public void testUpdateIssue750 () throws JSQLParserException {
156+ assertSqlCanBeParsedAndDeparsed ("update a,(select * from c) b set a.id=b.id where a.id=b.id" , true );
157+ }
153158}
You can’t perform that action at this time.
0 commit comments