View Issue Details

IDProjectCategoryView StatusLast Update
0006023SymmetricDSBugpublic2023-10-12 18:00
Reporteremiller Assigned Toemiller  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.13.0 
Target Version3.15.1Fixed in Version3.15.1 
Summary0006023: SQLException when updating a non-OK outgoing batch on some database platforms
DescriptionIf a database platform has SQL script replacement tokens, all SQL statements in every SQL map class get trimmed. As a result, concatenating two of them together without a space can result in an error on some database platforms. One example of this occurs when updating a non-OK outgoing batch on Sybase ASE. Notice the missing space below, where it says "node_id=?and":

SQL caused exception: [update sym_outgoing_batch set status=?, load_id=?, extract_job_flag=?, load_flag=?, error_flag=?, byte_count=?, extract_count=?, sent_count=?, load_count=?, data_row_count=?, reload_row_count=?, data_insert_row_count=?, data_update_row_count=?, data_delete_row_count=?, other_row_count=?, ignore_count=?, router_millis=?, network_millis=?, filter_millis=?, load_millis=?, extract_millis=?, extract_start_time=?, transfer_start_time=?, load_start_time=?, sql_state=?, sql_code=?, sql_message=?, failed_data_id=?, failed_line_number=?, last_update_hostname=?, last_update_time=?, summary=?, load_row_count=?, load_insert_row_count=?, load_update_row_count=?, load_delete_row_count=?, fallback_insert_count=?, fallback_update_count=?, conflict_win_count=?, conflict_lose_count=?, ignore_row_count=?, missing_delete_count=?, skip_count=?, extract_row_count=?, extract_insert_row_count=?, extract_update_row_count=?, extract_delete_row_count=?, transform_extract_millis=?, transform_load_millis=?, bulk_loader_flag=? where batch_id=? and node_id=?and status not in ('OK', 'IG')] sql args: [ER, -1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 374, 0, 0, 0, 0, null, null, null, 42000, 102, Incorrect syntax near 'status'., 0, 0, hostname, Wed Oct 11 17:25:06 UTC 2023, sym_node, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 231953, 001] java.sql.SQLException: Incorrect syntax near 'status'.

It would be best to avoid trimming these SQL statements because sometimes SymmetricDS depends on them beginning with or ending with spaces.
TagsNo tags attached.

Relationships

related to 0006021 closedemiller SQLException when updating a non-OK outgoing batch on some database platforms 

Activities

There are no notes attached to this issue.

Related Changesets

SymmetricDS: 3.15 2a862ab5

2023-10-12 17:34:00

evan-miller-jumpmind

Details Diff
0006023: Fixed SQLException when updating a non-OK outgoing batch on some database platforms Affected Issues
0006023
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/AbstractDatabasePlatform.java Diff File

Issue History

Date Modified Username Field Change
2023-10-12 17:17 emiller New Issue
2023-10-12 17:17 emiller Status new => assigned
2023-10-12 17:17 emiller Assigned To => emiller
2023-10-12 17:17 emiller Issue generated from: 0006021
2023-10-12 17:17 emiller Relationship added related to 0006021
2023-10-12 17:34 emiller Status assigned => resolved
2023-10-12 17:34 emiller Resolution open => fixed
2023-10-12 17:34 emiller Fixed in Version => 3.15.1
2023-10-12 18:00 Changeset attached => SymmetricDS 3.15 2a862ab5
2023-11-14 21:10 admin Status resolved => closed