From: Thomas Markwalder Date: Wed, 1 Apr 2026 14:02:36 +0000 (-0400) Subject: [#4405] Addressed review comments X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69701e28bdd1a64bb669bf0f5374a0e0e992a892;p=thirdparty%2Fkea.git [#4405] Addressed review comments Fixed typos modified: src/bin/admin/tests/mysql_tests.sh.in modified: src/bin/admin/tests/pgsql_tests.sh.in modified: src/share/database/scripts/mysql/dhcpdb_create.mysql modified: src/share/database/scripts/mysql/upgrade_033_to_034.sh.in modified: src/share/database/scripts/pgsql/dhcpdb_create.pgsql modified: src/share/database/scripts/pgsql/upgrade_032_to_033.sh.in --- diff --git a/src/bin/admin/tests/mysql_tests.sh.in b/src/bin/admin/tests/mysql_tests.sh.in index 0e92be0039..59bc57090a 100755 --- a/src/bin/admin/tests/mysql_tests.sh.in +++ b/src/bin/admin/tests/mysql_tests.sh.in @@ -1113,7 +1113,7 @@ mysql_upgrade_33_to_34_test() { mysql_execute "${query}" assert_eq 1 "${EXIT_CODE}" "${query}: expected %d, returned %d" - # Makse sure all four SFLQ tables exist. + # Make sure all four SFLQ tables exist. check_table_column start_address flq_pool4 check_table_column address free_lease4 check_table_column start_address flq_pool6 @@ -4421,7 +4421,7 @@ mysql_sflqUpdateLease4() { sql="select count(address) from free_lease4 where address = inet_aton(${in_address});" run_statement "check free_lease4 2" "$sql" "0" - # Update the lease to be reclalmed. + # Update the lease to be reclaimed. sql="call sflqUpdateLease4(inet_aton($in_address), NULL, NULL, 3600, timestamp('$future'),\ 1, 0, 0, NULL, 2, NULL, NULL, NULL, 0)"; run_statement "sflqUpdateLease4 to reclaimed $in_address" "$sql" @@ -4433,7 +4433,7 @@ mysql_sflqUpdateLease4() { run_statement "check free_lease4 3" "$sql" "1" # Update requires expirations to match. In order to test expiration - # logic, need to get an expried time stamp and then update the lease + # logic, need to get an expired time stamp and then update the lease # directly setting expire. sql="select TIMESTAMPADD(SECOND, -3600, CURRENT_TIMESTAMP)" run_statement "get expired time stamp" "$sql" @@ -4692,7 +4692,7 @@ mysql_sflqUpdateLease6() { sql="select count(address) from free_lease6 where address = $in_address;" run_statement "check free_lease6 2" "$sql" "0" - # Update the lease to be reclalmed. + # Update the lease to be reclaimed. state="2" sql="call sflqUpdateLease6($bin_address, $duid, 3600, timestamp('$future'),\ $subnet_id, 3600, $ltype, $iaid, 128, 0, 0,\ diff --git a/src/bin/admin/tests/pgsql_tests.sh.in b/src/bin/admin/tests/pgsql_tests.sh.in index a6ae27894d..f7f7d8d8a2 100755 --- a/src/bin/admin/tests/pgsql_tests.sh.in +++ b/src/bin/admin/tests/pgsql_tests.sh.in @@ -1099,7 +1099,7 @@ pgsql_upgrade_32_to_33_test() { pgsql_execute "${qry}" assert_eq 3 "${EXIT_CODE}" "select isJsonSupported() should have failed. (expected status code %d, returned %d)" - # Makse sure all four SFLQ tables exist. + # Make sure all four SFLQ tables exist. check_table_column start_address flq_pool4 check_table_column address free_lease4 check_table_column start_address flq_pool6 @@ -3609,7 +3609,7 @@ pgsql_sflqUpdateLease4() { sql="select count(address) from free_lease4 where address = $bigint_address;" run_statement "check free_lease4 2" "$sql" "0" - # Update the lease to be reclalmed. + # Update the lease to be reclaimed. sql="call sflqUpdateLease4($bigint_address, NULL, NULL, 3600::bigint, '$future'::timestamp,\ 1::bigint, 'f'::boolean, 'f'::boolean, NULL,\ 2::bigint, NULL, NULL, NULL, 0::bigint)"; @@ -3622,7 +3622,7 @@ pgsql_sflqUpdateLease4() { run_statement "check free_lease4 3" "$sql" "1" # Update requires expirations to match. In order to test expiration - # logic, need to get an expried time stamp and then update the lease + # logic, need to get an expired time stamp and then update the lease # directly setting expire. sql="select (current_timestamp - make_interval(secs => 3600))" run_statement "get expired time stamp" "$sql" @@ -3900,7 +3900,7 @@ pgsql_sflqUpdateLease6() { sql="select count(address) from free_lease6 where bin_address = $bin_address;" run_statement "check free_lease6 2" "$sql" "0" - # Update the lease to be reclalmed. + # Update the lease to be reclaimed. state="2" sql="call sflqUpdateLease6($in_address::inet, $duid, 3600::bigint, '$future'::timestamp,\ $subnet_id::bigint, 3600::bigint, $ltype::smallint, \ diff --git a/src/share/database/scripts/mysql/dhcpdb_create.mysql b/src/share/database/scripts/mysql/dhcpdb_create.mysql index b65ffc62a3..fcae8ebaab 100644 --- a/src/share/database/scripts/mysql/dhcpdb_create.mysql +++ b/src/share/database/scripts/mysql/dhcpdb_create.mysql @@ -6685,7 +6685,7 @@ BEGIN LEAVE SP; END IF; - -- Try Mariab variable + -- Try Mariadb variable SET @sqlv = "select @@max_recursive_iterations INTO @kea_recursion_limit"; PREPARE stmt FROM @sqlv; EXECUTE stmt; diff --git a/src/share/database/scripts/mysql/upgrade_033_to_034.sh.in b/src/share/database/scripts/mysql/upgrade_033_to_034.sh.in index 8d6cbbe56b..e9d0ce957e 100755 --- a/src/share/database/scripts/mysql/upgrade_033_to_034.sh.in +++ b/src/share/database/scripts/mysql/upgrade_033_to_034.sh.in @@ -265,7 +265,7 @@ BEGIN LEAVE SP; END IF; - -- Try Mariab variable + -- Try Mariadb variable SET @sqlv = "select @@max_recursive_iterations INTO @kea_recursion_limit"; PREPARE stmt FROM @sqlv; EXECUTE stmt; diff --git a/src/share/database/scripts/pgsql/dhcpdb_create.pgsql b/src/share/database/scripts/pgsql/dhcpdb_create.pgsql index 79d91abbd3..e8a0cec313 100644 --- a/src/share/database/scripts/pgsql/dhcpdb_create.pgsql +++ b/src/share/database/scripts/pgsql/dhcpdb_create.pgsql @@ -7165,7 +7165,7 @@ $$ LANGUAGE plpgsql; CREATE OR REPLACE PROCEDURE sflqCreateFlqPool6(p_start_address INET, p_end_address INET, p_lease_type SMALLINT, - p_delegated_len SMALLiNT, + p_delegated_len SMALLINT, p_subnet_id BIGINT, p_recreate BOOLEAN) LANGUAGE plpgsql AS $$ diff --git a/src/share/database/scripts/pgsql/upgrade_032_to_033.sh.in b/src/share/database/scripts/pgsql/upgrade_032_to_033.sh.in index 5c9572bcfc..6805c531cf 100755 --- a/src/share/database/scripts/pgsql/upgrade_032_to_033.sh.in +++ b/src/share/database/scripts/pgsql/upgrade_032_to_033.sh.in @@ -451,7 +451,7 @@ END; CREATE OR REPLACE PROCEDURE sflqCreateFlqPool6(p_start_address INET, p_end_address INET, p_lease_type SMALLINT, - p_delegated_len SMALLiNT, + p_delegated_len SMALLINT, p_subnet_id BIGINT, p_recreate BOOLEAN) LANGUAGE plpgsql AS \$\$