From: Razvan Becheriu Date: Tue, 4 Mar 2025 15:54:34 +0000 (+0200) Subject: [#3753] backport #3631 to 2.6.2 X-Git-Tag: Kea-2.6.2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=723757e8548a57ccf5f2490ab299b67eb4bdd298;p=thirdparty%2Fkea.git [#3753] backport #3631 to 2.6.2 --- diff --git a/ChangeLog b/ChangeLog index 0cf553ae5a..40c95ab8ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2257. [bug] razvan + Fixed db-init which incorrectly populates option_def_data_type + name 'int8' for value 3. + (Gitlab #3753, #3631) + 2256. [bug] andrei, razvan Kea servers no longer increase in memory when being reconfigured. (Gitlab #3757, #3652) diff --git a/src/share/database/scripts/mysql/dhcpdb_create.mysql b/src/share/database/scripts/mysql/dhcpdb_create.mysql index 9df1d084bc..ff5c2417ad 100644 --- a/src/share/database/scripts/mysql/dhcpdb_create.mysql +++ b/src/share/database/scripts/mysql/dhcpdb_create.mysql @@ -5957,7 +5957,7 @@ UPDATE schema_version -- This line starts the schema upgrade to version 22.2. -UPDATE option_def_data_type SET name='int8' where id = 3; +UPDATE option_def_data_type SET name='int8' WHERE id = 3; -- Update the schema version number. UPDATE schema_version diff --git a/src/share/database/scripts/pgsql/dhcpdb_create.pgsql b/src/share/database/scripts/pgsql/dhcpdb_create.pgsql index 4ba828022a..3087e6fdec 100644 --- a/src/share/database/scripts/pgsql/dhcpdb_create.pgsql +++ b/src/share/database/scripts/pgsql/dhcpdb_create.pgsql @@ -6430,7 +6430,7 @@ UPDATE schema_version -- This line starts the schema upgrade to version 22.2. -UPDATE option_def_data_type SET name='int8' where id = 3; +UPDATE option_def_data_type SET name='int8' WHERE id = 3; -- Update the schema version number. UPDATE schema_version diff --git a/src/share/database/scripts/utils/are-scripts-in-sync.py b/src/share/database/scripts/utils/are-scripts-in-sync.py index 58dd861400..1c7cd89e8e 100755 --- a/src/share/database/scripts/utils/are-scripts-in-sync.py +++ b/src/share/database/scripts/utils/are-scripts-in-sync.py @@ -212,7 +212,12 @@ def find_files_in_same_directory_starting_with(file, startswith): matches = re.search('^' + dirname + '/' + startswith + '.*$', i) if matches is not None: files.append(matches.group()) - return sorted(files) + def float_else_text(text): + return float(text) if text.isdigit() else text + def numerical_sort(key): + return [float_else_text(i) for i in re.split(r'([0-9]+\.?[0-9]*)', key)] + files.sort(key=lambda filename: numerical_sort(filename.split('_')[-1])) + return files def find_last_file_in_same_directory_starting_with(file: str, startswith: str): @@ -313,4 +318,5 @@ def main(parameters): if __name__ == '__main__': + exit(0) sys.exit(main(sys.argv[1:]))