A child, in the olden days, always got the name of the father.
If the father is unknown, the child would be without a surname, as long as it is not required. The then given name was uncertain, mostly the one, the mother said (not the mothers one), but I know a child, who got a new created name.
If the child dies young, the record may be, like
"1789, 11.11 dies Johann Joachim Xstian, son of the horlet Johanna Irgendwie, his name is only known to god".
Helmuth Gienke
www.gienke.net