View Issue Details

IDProjectCategoryView StatusLast Update
0003045SymmetricDSBugpublic2017-04-18 15:44
ReportergeorgiAssigned Tomaxwellpettit 
PrioritynormalSeveritymajorReproducibilityrandom
Status closedResolutionfixed 
Product Version3.8.19 
Target VersionFixed 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 14:33

developer   ~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
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
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 09:32 georgi New Issue
2017-04-13 16:05 maxwellpettit Assigned To => maxwellpettit
2017-04-13 16:05 maxwellpettit Status new => assigned
2017-04-13 17:00 maxwellpettit Changeset attached => SymmetricDS 3.8 a98131a1
2017-04-17 14:00 maxwellpettit Changeset attached => SymmetricDS 3.8 4f780edc
2017-04-17 14:33 maxwellpettit Note Added: 0001011
2017-04-17 14:33 maxwellpettit Status assigned => resolved
2017-04-17 14:33 maxwellpettit Fixed in Version => 3.8.20
2017-04-17 14:33 maxwellpettit Resolution open => fixed
2017-04-18 15:44 chenson Status resolved => closed