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():
1749
1749
{
1750
1750
FromItem fromItem = null;
1751
1751
Join join = null;
1752
- List joinList = null;
1753
- SubJoin subJoin = new SubJoin();
1752
+ List<Join> joinList = null;
1754
1753
}
1755
1754
{
1756
- fromItem=FromItem() { subJoin.setLeft(fromItem); }
1757
- joinList=SubJoinsList() { subJoin.setJoinList(joinList); }
1755
+ fromItem=FromItem()
1756
+ joinList=SubJoinsList()
1758
1757
{
1758
+ SubJoin subJoin = new SubJoin();
1759
+ subJoin.setLeft(fromItem);
1760
+ subJoin.setJoinList(joinList);
1759
1761
return subJoin;
1760
1762
}
1761
1763
}
@@ -1778,7 +1780,6 @@ List SubJoinsList():
1778
1780
{
1779
1781
1780
1782
(join=JoinerExpression() { joinsList.add(join); })+
1781
-
1782
1783
{ return joinsList; }
1783
1784
}
1784
1785
Original file line number Diff line number Diff line change @@ -360,7 +360,7 @@ public void testAddConstraintKeyIssue320() throws JSQLParserException {
360
360
}
361
361
362
362
@ Test
363
- public void testIssue633 () throws JSQLParserException {
363
+ public void testIssue633 () throws JSQLParserException , JSQLParserException , JSQLParserException {
364
364
assertSqlCanBeParsedAndDeparsed ("ALTER TABLE team_phases ADD CONSTRAINT team_phases_id_key UNIQUE (id)" );
365
365
}
366
366
@@ -383,4 +383,9 @@ public void testAlterTableIndex586() throws Exception {
383
383
public void testIssue259 () throws JSQLParserException {
384
384
assertSqlCanBeParsedAndDeparsed ("ALTER TABLE feature_v2 ADD COLUMN third_user_id int (10) unsigned DEFAULT '0' COMMENT '第三方用户id' after kdt_id" );
385
385
}
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
+ }
386
391
}
Original file line number Diff line number Diff line change @@ -2182,6 +2182,12 @@ public void testValues6BothVariants() throws JSQLParserException {
2182
2182
assertSqlCanBeParsedAndDeparsed (stmt );
2183
2183
}
2184
2184
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
+
2185
2191
@ Test
2186
2192
public void testInterval1 () throws JSQLParserException {
2187
2193
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 {
150
150
+ "where message_topic.name='test' \n "
151
151
+ "AND message_topic_config.enable_flag='Y'" , true );
152
152
}
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
+ }
153
158
}
You can’t perform that action at this time.
0 commit comments