View Issue Details

IDProjectCategoryView StatusLast Update
0006021SymmetricDSBugpublic2023-10-12 17:17
Reporteremiller Assigned Toemiller  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.13.0 
Target Version3.14.10Fixed in Version3.14.10 
Summary0006021: 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 0006023 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.14 4880174c

2023-10-12 15:53:20

evan-miller-jumpmind

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

Issue History

Date Modified Username Field Change
2023-10-12 15:52 emiller New Issue
2023-10-12 15:52 emiller Status new => assigned
2023-10-12 15:52 emiller Assigned To => emiller
2023-10-12 15:53 emiller Status assigned => resolved
2023-10-12 15:53 emiller Resolution open => fixed
2023-10-12 15:53 emiller Fixed in Version => 3.14.10
2023-10-12 16:00 Changeset attached => SymmetricDS 3.14 4880174c
2023-10-12 17:17 emiller Issue cloned: 0006023
2023-10-12 17:17 emiller Relationship added related to 0006023
2023-10-27 20:06 admin Status resolved => closed