Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

1 Answer
1

THING #1

Expand all VARCHAR(1024) to VARCHAR(10240) in all Stored Procedures. This will accommodate longer Family Tree Listings. This is vital because queue_children can grow longer and longer if you have a lopsided tree structure. It also possible that when queue_children was 1024 in length and did not delimit properly, it probably went into some infinite loop trying to terminate properly and never reached the condition when the LENGTH(queue_children) would be 0.