View Issue Details

IDProjectCategoryView StatusLast Update
0003045SymmetricDSBugpublic2017-04-18 19:44
Reportergeorgi Assigned Tomaxwellpettit  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.8.19 
Target Version3.8.20Fixed in Version3.8.20 
Summary0003045: Sometimes insert on replicated tables fails on MySQL
DescriptionI upgraded SymmetricDS from version 3.7.35 to 3.8.19. During the upgrade the triggers had recreated automatically. Version of MySQL is 5.7.16 (RDS on Amazon AWS).

After upgrade some inserts into master table fails with
MySQL Error 1329: No data - zero rows fetched, selected, or processed
Steps To ReproduceNot sure
Additional InformationAnalizing the problem I noticed that there's a function sym_transaction_id_post_5_7_6() called by trigger on insert:

-------------------------------------------
FUNCTION `sym_transaction_id_post_5_7_6`() RETURNS varchar(50) CHARSET latin1
    READS SQL DATA
begin
    declare comm_value varchar(50);
    declare comm_cur cursor for select TRX_ID from INFORMATION_SCHEMA.INNODB_TRX where TRX_MYSQL_THREAD_ID = CONNECTION_ID();
    open comm_cur;
    fetch comm_cur into comm_value;
    close comm_cur;
    return concat(concat(connection_id(), '.'), comm_value);
 end
-------------------------------------------

This function expects a row in INNODB_TRX for current connection.
On my system, sometimes there is no such row. This causes function to raise error and insert to fail.
I'm wondering whether the problem is missed row or it is bug in this function ...
TagsNo tags attached.

Activities

maxwellpettit

2017-04-17 18:33

manager   ~0001011

If this issue is occurring, upgrade to the newest version. Then on each node, run the SQL: "drop function sym_transaction_id_post_5_7_6" and restart SymmetricDS.

Related Changesets

SymmetricDS: 3.8 a98131a1

2017-04-13 16:06:46

maxwellpettit

Details Diff
0003045: Sometimes insert on replicated tables fails on MySQL Affected Issues
0003045
mod - symmetric-client/src/main/java/org/jumpmind/symmetric/db/mysql/MySqlSymmetricDialect.java Diff File

SymmetricDS: 3.8 4f780edc

2017-04-17 13:14:15

maxwellpettit

Details Diff
0003045: Sometimes insert on replicated tables fails on MySQL Affected Issues
0003045
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/db/DatabaseUpgradeListener.java Diff File

Issue History

Date Modified Username Field Change
2017-04-12 13:32 georgi New Issue
2017-04-13 20:05 maxwellpettit Assigned To => maxwellpettit
2017-04-13 20:05 maxwellpettit Status new => assigned
2017-04-13 21:00 maxwellpettit Changeset attached => SymmetricDS 3.8 a98131a1
2017-04-17 18:00 maxwellpettit Changeset attached => SymmetricDS 3.8 4f780edc
2017-04-17 18:33 maxwellpettit Note Added: 0001011
2017-04-17 18:33 maxwellpettit Status assigned => resolved
2017-04-17 18:33 maxwellpettit Fixed in Version => 3.8.20
2017-04-17 18:33 maxwellpettit Resolution open => fixed
2017-04-18 19:44 chenson Status resolved => closed