I wrote a Perl script and I've been trying to print its own PID, which works fine when it's 32767 or lower. However, it is always shown as 32767 whenever the real PID is above this number. It seems like it's a size/signing limitation for the variable. In MySQL, that would be equivalent to SMALLINT being signed (-32768 to +32767) as opposed to being unsigned (0 to 65535).
Any ideas on how to solve this?
Just to explain my stupidity: the problem was exactly what I said in my original post: MySQL INT column being signed instead of unsigned. The value I was seeing came from a select, not from a print. MySQL was limiting this value, not Perl.