When upgrading magento via ssh, it upgrades to the same version... Here is an example:
./mage list-upgrades
returns 'Mage_All_Latest: 1.8.1.0 => 1.9.1.1' then I do:
./mage install http://connect20.magentocommerce.com/community Mage_All_Latest --force
which returns 'Package community/Mage_All_Latest 1.8.1.0 installed successfully'
TL;DR: Magento packages upgrade to the version they are already on, instead of upgrading to the newest version available.