db: fix slow down caused by recursive function calls
If you build the database over and over then it builds longer and longer
call trees. The problem is that if you have a recursive call then it
starts storing stuff like:
$$->parent->parent->parent->parent->parent->foo
And pretty soon the number of states is unmanageable. I stop this by
limitting the state name size to 80. 80 is from testing and everything
larger than that was garbage. Probably that's too generous already...
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>