@@ -31,7 +31,7 @@ public class UpdateTest {
3131 public void testUpdate () throws JSQLParserException {
3232 String statement = "UPDATE mytable set col1='as', col2=?, col3=565 Where o >= 3" ;
3333 Update update = (Update ) parserManager .parse (new StringReader (statement ));
34- assertEquals ("mytable" , update .getTables ().get ( 0 ). getName ());
34+ assertEquals ("mytable" , update .getTable ().toString ());
3535 assertEquals (3 , update .getColumns ().size ());
3636 assertEquals ("col1" , ((Column ) update .getColumns ().get (0 )).getColumnName ());
3737 assertEquals ("col2" , ((Column ) update .getColumns ().get (1 )).getColumnName ());
@@ -119,24 +119,35 @@ public void testUpdateDoesNotAllowLimitOffset() throws JSQLParserException {
119119 public void testUpdateWithFunctions () throws JSQLParserException {
120120 assertSqlCanBeParsedAndDeparsed ("UPDATE tablename SET col = SUBSTRING(col2, 1, 2)" );
121121 }
122-
122+
123123 @ Test
124124 public void testUpdateIssue508LeftShift () throws JSQLParserException {
125125 assertSqlCanBeParsedAndDeparsed ("UPDATE user SET num = 1 << 1 WHERE id = 1" );
126126 }
127-
127+
128128 @ Test
129129 public void testUpdateIssue338 () throws JSQLParserException {
130130 assertSqlCanBeParsedAndDeparsed ("UPDATE mytable SET status = (status & ~1)" );
131131 }
132-
132+
133133 @ Test
134134 public void testUpdateIssue338_1 () throws JSQLParserException {
135135 assertSqlCanBeParsedAndDeparsed ("UPDATE mytable SET status = (status & 1)" );
136136 }
137-
137+
138138 @ Test
139139 public void testUpdateIssue338_2 () throws JSQLParserException {
140140 assertSqlCanBeParsedAndDeparsed ("UPDATE mytable SET status = (status + 1)" );
141141 }
142+
143+ @ Test
144+ public void testUpdateIssue826 () throws JSQLParserException {
145+ assertSqlCanBeParsedAndDeparsed ("update message_topic inner join message_topic_config on\n "
146+ + " message_topic.id=message_topic_config.topic_id \n "
147+ + "set message_topic_config.enable_flag='N', \n "
148+ + "message_topic_config.updated_by='test', \n "
149+ + "message_topic_config.update_at='2019-07-16' \n "
150+ + "where message_topic.name='test' \n "
151+ + "AND message_topic_config.enable_flag='Y'" , true );
152+ }
142153}
0 commit comments