@@ -428,6 +428,7 @@ reconfigure:
428428 fi
429429
430430 applied_count= 0
431+ skipped_count= 0
431432 while IFS= read -r assignment; do
432433 [ -n " ${assignment}" ] || continue
433434 case " ${assignment}" in
@@ -453,12 +454,28 @@ reconfigure:
453454 echo " Set parameter ${param_name} to value ${param_value}"
454455 applied_count= $ ((applied_count + 1))
455456 else
456- echo " Failed to set parameter ${param_name}=${param_value}: ${output}" >&2
457- exit 1
457+ # Classify MariaDB SQL errors that are caused by bad user input.
458+ # These should not be retried indefinitely by the controller.
459+ error_code= $ (printf '%s' " ${output}" | grep -oE 'ERROR [0-9]+' | head -1 | awk '{print $2 }')
460+ case " ${error_code}" in
461+ 1231| 1232| 1193| 1064)
462+ echo " [REJECT] parameter ${param_name}=${param_value} rejected by engine (error ${error_code}): ${output}"
463+ echo " [REJECT] parameter ${param_name}=${param_value} rejected by engine (error ${error_code}): ${output}" >&2
464+ skipped_count= $ ((skipped_count + 1))
465+ ;;
466+ *)
467+ echo " Failed to set parameter ${param_name}=${param_value}: ${output}" >&2
468+ exit 1
469+ ;;
470+ esac
458471 fi
459472 done < " ${parameter_file}"
460473
461- if [ " ${applied_count}" -eq 0 ]; then
474+ if [ " ${skipped_count}" -gt 0 ]; then
475+ echo " ${skipped_count} parameter(s) were rejected by engine and skipped"
476+ echo " ${skipped_count} parameter(s) were rejected by engine and skipped" >&2
477+ fi
478+ if [ " ${applied_count}" -eq 0 ] && [ " ${skipped_count}" -eq 0 ]; then
462479 echo " No parameters were applied during reconfigure action" >&2
463480 exit 1
464481 fi
@@ -846,6 +863,7 @@ reconfigure:
846863 }
847864
848865 applied_count= 0
866+ skipped_count= 0
849867 while IFS= read -r assignment; do
850868 [ -n " ${assignment}" ] || continue
851869 case " ${assignment}" in
@@ -892,8 +910,20 @@ reconfigure:
892910 echo " Set parameter ${param_name} to value ${param_value}"
893911 applied_count= $ ((applied_count + 1))
894912 else
895- echo " Failed to set parameter ${param_name}=${param_value}: ${output}" >&2
896- exit 1
913+ # Classify MariaDB SQL errors that are caused by bad user input.
914+ error_code= $ (printf '%s' " ${output}" | grep -oE 'ERROR [0-9]+' | head -1 | awk '{print $2 }')
915+ case " ${error_code}" in
916+ 1231| 1232| 1193| 1064)
917+ echo " [REJECT] parameter ${param_name}=${param_value} rejected by engine (error ${error_code}): ${output}"
918+ echo " [REJECT] parameter ${param_name}=${param_value} rejected by engine (error ${error_code}): ${output}" >&2
919+ skipped_count= $ ((skipped_count + 1))
920+ continue
921+ ;;
922+ *)
923+ echo " Failed to set parameter ${param_name}=${param_value}: ${output}" >&2
924+ exit 1
925+ ;;
926+ esac
897927 fi
898928
899929 # alpha.86 v1 — persist the override AFTER SET GLOBAL succeeds.
@@ -956,7 +986,11 @@ reconfigure:
956986 # than catching the same issue at write time.
957987 done < " ${parameter_file}"
958988
959- if [ " ${applied_count}" -eq 0 ]; then
989+ if [ " ${skipped_count}" -gt 0 ]; then
990+ echo " ${skipped_count} parameter(s) were rejected by engine and skipped"
991+ echo " ${skipped_count} parameter(s) were rejected by engine and skipped" >&2
992+ fi
993+ if [ " ${applied_count}" -eq 0 ] && [ " ${skipped_count}" -eq 0 ]; then
960994 echo " No parameters were applied during reconfigure action" >&2
961995 exit 1
962996 fi
0 commit comments