Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit c2f4926

Browse files
committed
Update trigger as mysql automatically pads varchars when comparing, creating a content instead of path in some case (trailing spaces). See #1253
1 parent 72bf939 commit c2f4926

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/plugins/meta.syncable/create.mysql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ DROP TRIGGER IF EXISTS `LOG_UPDATE`;
3535

3636
CREATE TRIGGER `LOG_UPDATE` AFTER UPDATE ON `ajxp_index`
3737
FOR EACH ROW INSERT INTO ajxp_changes (repository_identifier, node_id,source,target,type)
38-
VALUES (new.repository_identifier, new.node_id, old.node_path, new.node_path, CASE old.node_path COLLATE utf8_bin = new.node_path COLLATE utf8_bin WHEN true THEN 'content' ELSE 'path' END);
38+
VALUES (new.repository_identifier, new.node_id, old.node_path, new.node_path, CASE LENGTH(new.node_path) = LENGTH(old.node_path) AND old.node_path COLLATE utf8_bin = new.node_path COLLATE utf8_bin WHEN true THEN 'content' ELSE 'path' END);

0 commit comments

Comments
 (0)