Im surprised that HeidiSQL dont know newer things like Windows Function, without hints totally. See short video: https://bit.ly/3Tkv66h
older stuff (features etc) it suggests well.
Same problem with Routines, dont know eg REPEAT loop? https://bit.ly/49YxiHx
Thx for further info.