-- Evaluate all settings
SET @cCurResult := (SELECT description FROM db_version ORDER BY `version` DESC, STRUCTURE DESC, CONTENT DESC LIMIT 0,1);
SET @cOldResult := (SELECT description FROM db_version WHERE `version`=@cOldVersion AND `structure`=@cOldStructure AND `content`=@cOldContent);
SET @cNewResult := (SELECT description FROM db_version WHERE `version`=@cNewVersion AND `structure`=@cNewStructure AND `content`=@cNewContent);
IF (@cCurResult = @cOldResult) THEN -- Does the current version match the expected version
-- APPLY UPDATE
After reading the update file "Rel22_01_001_Release_22.sql", it's skipped because the current version "21_2_1" does not match the expected "21_4_1".
But how do I find the patch from "21_2_1" to "21_4_1"? The content in Rel21 doesn't look right :
ls Rel21
Rel20_to_BaseRel21_Updates readme.txt